https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ComputeUserObjectsThread Class Reference

Class for threaded computation of UserObjects. More...

#include <ComputeUserObjectsThread.h>

Inheritance diagram for ComputeUserObjectsThread:
[legend]

Public Member Functions

 ComputeUserObjectsThread (FEProblemBase &problem, const TheWarehouse::Query &query)
 
 ComputeUserObjectsThread (ComputeUserObjectsThread &x, Threads::split)
 
virtual ~ComputeUserObjectsThread ()
 
virtual void onElement (const Elem *elem) override
 Assembly of the element (not including surface assembly) More...
 
virtual void onBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
 Called when doing boundary assembling. More...
 
virtual void onInternalSide (const Elem *elem, unsigned int side) override
 Called when doing internal edge assembling. More...
 
virtual void onExternalSide (const Elem *elem, unsigned int side) override
 Called when iterating over external sides (no side neighbor) More...
 
virtual void onInterface (const Elem *elem, unsigned int side, BoundaryID bnd_id) override
 Called when doing interface assembling. More...
 
virtual void post () override
 Called after the element range loop. More...
 
virtual void subdomainChanged () override
 Called every time the current subdomain changes (i.e. More...
 
void join (const ComputeUserObjectsThread &)
 
virtual void caughtMooseException (MooseException &e) override
 Called if a MooseException is caught anywhere during the computation. More...
 
virtual bool keepGoing () override
 Whether or not the loop should continue. More...
 
virtual void preElement (const Elem *elem) override
 Called before the element assembly. More...
 
virtual void preInternalSide (const Elem *elem, unsigned int side) override
 Called before evaluations on an element internal side. More...
 
virtual void preBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
 Called before the boundary assembly. More...
 
virtual void neighborSubdomainChanged () override
 Called every time the neighbor subdomain changes (i.e. More...
 
virtual void operator() (const ConstElemRange &range, bool bypass_threading=false)
 
virtual void pre ()
 Called before the element range loop. More...
 
virtual void postElement (const Elem *elem)
 Called after the element assembly is done (including surface assembling) More...
 
virtual void postInternalSide (const Elem *elem, unsigned int side)
 Called after evaluations on an element internal side. More...
 

Protected Member Functions

void printGeneralExecutionInformation () const override
 Print general information about the loop, like the ordering of class of objects. More...
 
void printBlockExecutionInformation () const override
 Print information about the loop, mostly order of execution of particular objects. More...
 
template<typename T >
void printVectorOrdering (std::vector< T *> uos, const std::string &name) const
 Format output of vector of UOs. More...
 
void prepareElement (const Elem *elem)
 
void clearVarsAndMaterials ()
 
void printExecutionOrdering (const std::vector< T * > &objs, const bool print_header=true, const std::string &line_prefix="[DBG]") const
 Routine to output the ordering of objects within a vector of pointers to these objects. More...
 
void printExecutionOrdering (const std::vector< std::shared_ptr< T >> &objs_ptrs, const bool print_header=true, const std::string &line_prefix="[DBG]") const
 
virtual void printBoundaryExecutionInformation (const unsigned int) const
 Print information about the particular ordering of objects on each boundary. More...
 
void resetExecPrintedSets () const
 Resets the set of blocks and boundaries visited. More...
 
virtual bool shouldComputeInternalSide (const Elem &elem, const Elem &neighbor) const
 Whether to compute the internal side for the provided element-neighbor pair. More...
 

Protected Attributes

FEProblemBase_fe_problem
 
MooseMesh_mesh
 
THREAD_ID _tid
 
SubdomainID _subdomain
 The subdomain for the current element. More...
 
SubdomainID _old_subdomain
 The subdomain for the last element. More...
 
SubdomainID _neighbor_subdomain
 The subdomain for the current neighbor. More...
 
SubdomainID _old_neighbor_subdomain
 The subdomain for the last neighbor. More...
 
std::set< SubdomainID_blocks_exec_printed
 Keep track of which blocks were visited. More...
 
std::set< BoundaryID_boundaries_exec_printed
 Keep track of which boundaries were visited. More...
 

Private Member Functions

template<typename T >
void querySubdomain (Interfaces iface, std::vector< T > &results)
 
template<typename T >
void queryBoundary (Interfaces iface, BoundaryID bnd, std::vector< T > &results)
 

Private Attributes

const TheWarehouse::Query _query
 
TheWarehouse::QueryCache< AttribThread, AttribSubdomains, AttribInterfaces_query_subdomain
 
TheWarehouse::QueryCache< AttribThread, AttribBoundaries, AttribInterfaces_query_boundary
 
std::vector< InternalSideUserObject * > _internal_side_objs
 
std::vector< InterfaceUserObject * > _interface_user_objects
 
std::vector< ElementUserObject * > _element_objs
 
std::vector< ShapeElementUserObject * > _shape_element_objs
 
std::vector< DomainUserObject * > _domain_objs
 
std::vector< DomainUserObject * > _all_domain_objs
 
AuxiliarySystem_aux_sys
 

Detailed Description

Class for threaded computation of UserObjects.

Definition at line 37 of file ComputeUserObjectsThread.h.

Constructor & Destructor Documentation

◆ ComputeUserObjectsThread() [1/2]

ComputeUserObjectsThread::ComputeUserObjectsThread ( FEProblemBase problem,
const TheWarehouse::Query query 
)

Definition at line 29 of file ComputeUserObjectsThread.C.

32  _query(query),
35  _aux_sys(problem.getAuxiliarySystem())
36 {
37 }
TheWarehouse::QueryCache< AttribThread, AttribSubdomains, AttribInterfaces > _query_subdomain
TheWarehouse::QueryCache< AttribThread, AttribBoundaries, AttribInterfaces > _query_boundary
const TheWarehouse::Query _query
AuxiliarySystem & getAuxiliarySystem()

◆ ComputeUserObjectsThread() [2/2]

ComputeUserObjectsThread::ComputeUserObjectsThread ( ComputeUserObjectsThread x,
Threads::split   
)

Definition at line 40 of file ComputeUserObjectsThread.C.

42  _query(x._query),
46 {
47 }
TheWarehouse::QueryCache< AttribThread, AttribSubdomains, AttribInterfaces > _query_subdomain
TheWarehouse::QueryCache< AttribThread, AttribBoundaries, AttribInterfaces > _query_boundary
FEProblemBase & _fe_problem
const TheWarehouse::Query _query

◆ ~ComputeUserObjectsThread()

ComputeUserObjectsThread::~ComputeUserObjectsThread ( )
virtual

Definition at line 49 of file ComputeUserObjectsThread.C.

49 {}

Member Function Documentation

◆ caughtMooseException()

void ThreadedElementLoop< ConstElemRange >::caughtMooseException ( MooseException e)
overridevirtualinherited

Called if a MooseException is caught anywhere during the computation.

The single input parameter taken is a MooseException object.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 105 of file ThreadedElementLoop.h.

Referenced by ComputeJacobianForScalingThread::operator()().

106 {
107  Threads::spin_mutex::scoped_lock lock(threaded_element_mutex);
108 
109  std::string what(e.what());
111 }
virtual const char * what() const
Get out the error message.
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
static Threads::spin_mutex threaded_element_mutex
This mutex is used by all derived classes of the ThreadedElementLoop.

◆ clearVarsAndMaterials()

void ThreadedElementLoop< ConstElemRange >::clearVarsAndMaterials ( )
protectedinherited

Definition at line 195 of file ThreadedElementLoop.h.

Referenced by NonlinearThread::post().

196 {
199 }
void clearActiveMaterialProperties(const THREAD_ID tid)
Clear the active material properties.
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid) override
Clear the active elemental MooseVariableFEBase.

◆ join()

void ComputeUserObjectsThread::join ( const ComputeUserObjectsThread )

Definition at line 325 of file ComputeUserObjectsThread.C.

326 {
327 }

◆ keepGoing()

virtual bool ThreadedElementLoop< ConstElemRange >::keepGoing ( )
inlineoverridevirtualinherited

Whether or not the loop should continue.

Returns
true to keep going, false to stop.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 45 of file ThreadedElementLoop.h.

Referenced by ComputeJacobianForScalingThread::operator()().

45 { return !_fe_problem.hasException(); }
virtual bool hasException()
Whether or not an exception has occurred.

◆ neighborSubdomainChanged()

void ThreadedElementLoop< ConstElemRange >::neighborSubdomainChanged ( )
overridevirtualinherited

Called every time the neighbor subdomain changes (i.e.

the subdomain of this neighbor is not the same as the subdomain of the last neighbor). Beware of over-using this! You might think that you can do some expensive stuff in here and get away with it... but there are applications that have TONS of subdomains....

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 139 of file ThreadedElementLoop.h.

140 {
143 }
Base class for assembly-like calculations.
virtual void neighborSubdomainSetup(SubdomainID subdomain, const THREAD_ID tid)

◆ onBoundary()

void ComputeUserObjectsThread::onBoundary ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id,
const Elem *  lower_d_elem = nullptr 
)
overridevirtual

Called when doing boundary assembling.

Parameters
elem- The element we are checking is on the boundary.
side- The side of the element in question.
bnd_id- ID of the boundary we are at
lower_d_elem- Lower dimensional element (e.g. Mortar)

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 162 of file ComputeUserObjectsThread.C.

166 {
167  std::vector<UserObject *> userobjs;
168  queryBoundary(Interfaces::SideUserObject, bnd_id, userobjs);
169  if (userobjs.size() == 0 && _domain_objs.size() == 0)
170  return;
171 
172  _fe_problem.reinitElemFace(elem, side, _tid);
173 
174  // Reinitialize lower-dimensional variables for use in boundary Materials
175  if (lower_d_elem)
176  _fe_problem.reinitLowerDElem(lower_d_elem, _tid);
177 
178  // Set up Sentinel class so that, even if reinitMaterialsFace() throws, we
179  // still remember to swap back during stack unwinding.
181  _fe_problem.reinitMaterialsFaceOnBoundary(bnd_id, elem->subdomain_id(), _tid);
183 
184  for (const auto & uo : userobjs)
185  uo->execute();
186 
187  for (auto & uo : _domain_objs)
188  {
189  uo->preExecuteOnBoundary();
190  uo->executeOnBoundary();
191  }
192 
193  // UserObject Jacobians
194  std::vector<ShapeSideUserObject *> shapers;
196  if (_fe_problem.currentlyComputingJacobian() && shapers.size() > 0)
197  {
198  // Prepare shape functions for ShapeSideUserObjects
199  const auto & jacobian_moose_vars = _fe_problem.getUserObjectJacobianVariables(_tid);
200  for (const auto & jvar : jacobian_moose_vars)
201  {
202  unsigned int jvar_id = jvar->number();
203  auto && dof_indices = jvar->dofIndices();
204 
206 
207  for (const auto & uo : shapers)
208  uo->executeJacobianWrapper(jvar_id, dof_indices);
209  }
210  }
211 }
void reinitMaterialsFaceOnBoundary(const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase *> *const reinit_mats=nullptr)
reinit materials on element faces on a boundary (internal or external) This specific routine helps us...
void reinitMaterialsBoundary(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on a boundary
void queryBoundary(Interfaces iface, BoundaryID bnd, std::vector< T > &results)
virtual void swapBackMaterialsFace(const THREAD_ID tid)
virtual void prepareFaceShapes(unsigned int var, const THREAD_ID tid) override
const std::vector< const MooseVariableFEBase * > & getUserObjectJacobianVariables(const THREAD_ID tid) const
virtual void reinitLowerDElem(const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
void reinitElemFace(const Elem *elem, unsigned int side, BoundaryID, const THREAD_ID tid)
std::vector< DomainUserObject * > _domain_objs
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:684
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ onElement()

void ComputeUserObjectsThread::onElement ( const Elem *  elem)
overridevirtual

Assembly of the element (not including surface assembly)

Parameters
elem- active element

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 118 of file ComputeUserObjectsThread.C.

119 {
120  _fe_problem.prepare(elem, _tid);
121  _fe_problem.reinitElem(elem, _tid);
122 
123  // Set up Sentinel class so that, even if reinitMaterials() throws, we
124  // still remember to swap back during stack unwinding.
127 
128  for (const auto & uo : _element_objs)
129  {
130  uo->execute();
131 
132  // update the aux solution vector if writable coupled variables are used
133  if (uo->hasWritableCoupledVariables())
134  for (auto * var : uo->getWritableCoupledVariables())
135  var->insert(_aux_sys.solution());
136  }
137 
138  for (auto & uo : _domain_objs)
139  {
140  uo->preExecuteOnElement();
141  uo->executeOnElement();
142  }
143 
144  // UserObject Jacobians
146  {
147  // Prepare shape functions for ShapeElementUserObjects
148  const auto & jacobian_moose_vars = _fe_problem.getUserObjectJacobianVariables(_tid);
149  for (const auto & jvar : jacobian_moose_vars)
150  {
151  unsigned int jvar_id = jvar->number();
152  auto && dof_indices = jvar->dofIndices();
153 
154  _fe_problem.prepareShapes(jvar_id, _tid);
155  for (const auto uo : _shape_element_objs)
156  uo->executeJacobianWrapper(jvar_id, dof_indices);
157  }
158  }
159 }
std::vector< ElementUserObject * > _element_objs
std::vector< ShapeElementUserObject * > _shape_element_objs
virtual void prepare(const Elem *elem, const THREAD_ID tid) override
NumericVector< Number > & solution()
Definition: SystemBase.h:196
const std::vector< const MooseVariableFEBase * > & getUserObjectJacobianVariables(const THREAD_ID tid) const
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
virtual void swapBackMaterials(const THREAD_ID tid)
void reinitMaterials(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true)
SubdomainID _subdomain
The subdomain for the current element.
std::vector< DomainUserObject * > _domain_objs
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:684
virtual void prepareShapes(unsigned int var, const THREAD_ID tid) override
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ onExternalSide()

void ComputeUserObjectsThread::onExternalSide ( const Elem *  elem,
unsigned int  side 
)
overridevirtual

Called when iterating over external sides (no side neighbor)

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 252 of file ComputeUserObjectsThread.C.

253 {
254  // We are not initializing any materials here because objects that perform calculations should
255  // run onBoundary. onExternalSide should be used for mesh updates (e.g. adding/removing
256  // boundaries). Note that _current_elem / _current_side are not getting updated either.
257  for (auto & uo : _domain_objs)
258  uo->executeOnExternalSide(elem, side);
259 }
std::vector< DomainUserObject * > _domain_objs

◆ onInterface()

void ComputeUserObjectsThread::onInterface ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id 
)
overridevirtual

Called when doing interface assembling.

Parameters
elem- Element we are on
side- local side number of the element 'elem'
bnd_id- ID of the interface we are at

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 262 of file ComputeUserObjectsThread.C.

263 {
264  // Pointer to the neighbor we are currently working on.
265  const Elem * neighbor = elem->neighbor_ptr(side);
266  if (!(neighbor->active()))
267  return;
268 
269  std::vector<UserObject *> interface_objs;
270  queryBoundary(Interfaces::InterfaceUserObject, bnd_id, interface_objs);
271 
272  bool has_domain_objs = false;
273  // we need to check all domain user objects because a domain user object may not be active
274  // on the current subdomain but should be executed on the interface that it attaches to
275  for (const auto * const domain_uo : _all_domain_objs)
276  if (domain_uo->shouldExecuteOnInterface())
277  {
278  has_domain_objs = true;
279  break;
280  }
281 
282  // if we do not have any interface user objects and domain user objects on the current
283  // interface
284  if (interface_objs.empty() && !has_domain_objs)
285  return;
286 
288  _fe_problem.reinitNeighbor(elem, side, _tid);
289 
290  // Set up Sentinels so that, even if one of the reinitMaterialsXXX() calls throws, we
291  // still remember to swap back during stack unwinding.
292 
294  _fe_problem.reinitMaterialsFaceOnBoundary(bnd_id, elem->subdomain_id(), _tid);
296 
298  _fe_problem.reinitMaterialsNeighbor(neighbor->subdomain_id(), _tid);
299 
300  // Has to happen after face and neighbor properties have been computed. Note that we don't use
301  // a sentinel here because FEProblem::swapBackMaterialsFace is going to handle face materials,
302  // boundary materials, and interface materials (e.g. it queries the boundary material data
303  // with the current element and side
305 
306  for (const auto & uo : interface_objs)
307  uo->execute();
308 
309  for (auto & uo : _all_domain_objs)
310  if (uo->shouldExecuteOnInterface())
311  {
312  uo->preExecuteOnInterface();
313  uo->executeOnInterface();
314  }
315 }
virtual void prepareFace(const Elem *elem, const THREAD_ID tid) override
void reinitMaterialsFaceOnBoundary(const BoundaryID boundary_id, const SubdomainID blk_id, const THREAD_ID tid, const bool swap_stateful=true, const std::deque< MaterialBase *> *const reinit_mats=nullptr)
reinit materials on element faces on a boundary (internal or external) This specific routine helps us...
void reinitMaterialsBoundary(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on a boundary
void queryBoundary(Interfaces iface, BoundaryID bnd, std::vector< T > &results)
virtual void swapBackMaterialsFace(const THREAD_ID tid)
void reinitMaterialsNeighbor(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on the neighboring element face
virtual void swapBackMaterialsNeighbor(const THREAD_ID tid)
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
void reinitMaterialsInterface(BoundaryID boundary_id, const THREAD_ID tid, bool swap_stateful=true)
std::vector< DomainUserObject * > _all_domain_objs
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ onInternalSide()

void ComputeUserObjectsThread::onInternalSide ( const Elem *  elem,
unsigned int  side 
)
overridevirtual

Called when doing internal edge assembling.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 214 of file ComputeUserObjectsThread.C.

215 {
216  // Pointer to the neighbor we are currently working on.
217  const Elem * neighbor = elem->neighbor_ptr(side);
218 
219  // Get the global id of the element and the neighbor
220  const dof_id_type elem_id = elem->id(), neighbor_id = neighbor->id();
221 
222  if (_internal_side_objs.size() == 0 && _domain_objs.size() == 0)
223  return;
224  if (!((neighbor->active() && (neighbor->level() == elem->level()) && (elem_id < neighbor_id)) ||
225  (neighbor->level() < elem->level())))
226  return;
227 
229  _fe_problem.reinitNeighbor(elem, side, _tid);
230 
231  // Set up Sentinels so that, even if one of the reinitMaterialsXXX() calls throws, we
232  // still remember to swap back during stack unwinding.
234  _fe_problem.reinitMaterialsFace(elem->subdomain_id(), _tid);
235 
237  _fe_problem.reinitMaterialsNeighbor(neighbor->subdomain_id(), _tid);
238 
239  for (const auto & uo : _internal_side_objs)
240  if (!uo->blockRestricted() || uo->hasBlocks(neighbor->subdomain_id()))
241  uo->execute();
242 
243  for (auto & uo : _domain_objs)
244  if (!uo->blockRestricted() || uo->hasBlocks(neighbor->subdomain_id()))
245  {
246  uo->preExecuteOnInternalSide();
247  uo->executeOnInternalSide();
248  }
249 }
virtual void prepareFace(const Elem *elem, const THREAD_ID tid) override
void reinitMaterialsFace(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on element faces
virtual void swapBackMaterialsFace(const THREAD_ID tid)
void reinitMaterialsNeighbor(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true, const std::deque< MaterialBase *> *reinit_mats=nullptr)
reinit materials on the neighboring element face
virtual void swapBackMaterialsNeighbor(const THREAD_ID tid)
std::vector< InternalSideUserObject * > _internal_side_objs
std::vector< DomainUserObject * > _domain_objs
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
uint8_t dof_id_type
The "SwapBackSentinel" class&#39;s destructor guarantees that FEProblemBase::swapBackMaterials{Face,Neighbor}() is called even when an exception is thrown from FEProblemBase::reinitMaterials{Face,Neighbor}.

◆ operator()()

void ThreadedElementLoopBase< ConstElemRange >::operator() ( const ConstElemRange range,
bool  bypass_threading = false 
)
virtualinherited

Reimplemented in NonlinearThread, and ComputeJacobianForScalingThread.

Definition at line 226 of file ThreadedElementLoopBase.h.

227 {
228  try
229  {
230  try
231  {
232  ParallelUniqueId puid;
233  _tid = bypass_threading ? 0 : puid.id;
234 
235  pre();
237 
240  typename RangeType::const_iterator el = range.begin();
241  for (el = range.begin(); el != range.end(); ++el)
242  {
243  if (!keepGoing())
244  break;
245 
246  const Elem * elem = *el;
247 
248  preElement(elem);
249 
251  _subdomain = elem->subdomain_id();
252  if (_subdomain != _old_subdomain)
253  {
256  }
257 
258  onElement(elem);
259 
260  if (_mesh.interiorLowerDBlocks().count(elem->subdomain_id()) > 0 ||
261  _mesh.boundaryLowerDBlocks().count(elem->subdomain_id()) > 0)
262  {
263  postElement(elem);
264  continue;
265  }
266 
267  for (unsigned int side = 0; side < elem->n_sides(); side++)
268  {
269  std::vector<BoundaryID> boundary_ids = _mesh.getBoundaryIDs(elem, side);
270  const Elem * lower_d_elem = _mesh.getLowerDElem(elem, side);
271 
272  if (boundary_ids.size() > 0)
273  for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
274  it != boundary_ids.end();
275  ++it)
276  {
277  preBoundary(elem, side, *it, lower_d_elem);
279  onBoundary(elem, side, *it, lower_d_elem);
280  }
281 
282  const Elem * neighbor = elem->neighbor_ptr(side);
283  if (neighbor)
284  {
285  preInternalSide(elem, side);
286 
288  _neighbor_subdomain = neighbor->subdomain_id();
291 
292  if (shouldComputeInternalSide(*elem, *neighbor))
293  onInternalSide(elem, side);
294 
295  if (boundary_ids.size() > 0)
296  for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
297  it != boundary_ids.end();
298  ++it)
299  onInterface(elem, side, *it);
300 
301  postInternalSide(elem, side);
302  }
303  else
304  onExternalSide(elem, side);
305  } // sides
306 
307  postElement(elem);
308  } // range
309 
310  post();
312  }
313  catch (MetaPhysicL::LogicError & e)
314  {
316  }
317  catch (std::exception & e)
318  {
319  // Continue if we find a libMesh degenerate map exception, but
320  // just re-throw for any real error
321  if (!strstr(e.what(), "Jacobian") && !strstr(e.what(), "singular") &&
322  !strstr(e.what(), "det != 0"))
323  throw; // not "throw e;" - that destroys type info!
324 
325  mooseException("We caught a libMesh degeneracy exception in ThreadedElementLoopBase:\n",
326  e.what());
327  }
328  }
329  catch (MooseException & e)
330  {
332  }
333 }
virtual void onExternalSide(const Elem *elem, unsigned int side)
Called when iterating over external sides (no side neighbor)
virtual bool keepGoing()
Whether or not the loop should continue.
void resetExecPrintedSets() const
Resets the set of blocks and boundaries visited.
virtual bool shouldComputeInternalSide(const Elem &elem, const Elem &neighbor) const
Whether to compute the internal side for the provided element-neighbor pair.
virtual void onElement(const Elem *elem)
Assembly of the element (not including surface assembly)
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1421
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
Definition: MooseError.C:141
virtual void printBoundaryExecutionInformation(const unsigned int) const
Print information about the particular ordering of objects on each boundary.
virtual void pre()
Called before the element range loop.
const Elem * getLowerDElem(const Elem *, unsigned short int) const
Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensi...
Definition: MooseMesh.C:1751
virtual void subdomainChanged()
Called every time the current subdomain changes (i.e.
virtual void neighborSubdomainChanged()
Called every time the neighbor subdomain changes (i.e.
virtual void preInternalSide(const Elem *elem, unsigned int side)
Called before evaluations on an element internal side.
virtual void postInternalSide(const Elem *elem, unsigned int side)
Called after evaluations on an element internal side.
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.C:20
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr)
Called when doing boundary assembling.
virtual void postElement(const Elem *elem)
Called after the element assembly is done (including surface assembling)
virtual void printGeneralExecutionInformation() const
Print information about the loop ordering.
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id)
Called when doing interface assembling.
SubdomainID _old_neighbor_subdomain
The subdomain for the last neighbor.
const std::set< SubdomainID > & boundaryLowerDBlocks() const
Definition: MooseMesh.h:1425
virtual void onInternalSide(const Elem *elem, unsigned int side)
Called when doing internal edge assembling.
const_iterator end() const
Provides a way for users to bail out of the current solve.
virtual void caughtMooseException(MooseException &)
Called if a MooseException is caught anywhere during the computation.
const_iterator begin() const
SubdomainID _subdomain
The subdomain for the current element.
std::vector< BoundaryID > getBoundaryIDs(const Elem *const elem, const unsigned short int side) const
Returns a vector of boundary IDs for the requested element on the requested side. ...
SubdomainID _old_subdomain
The subdomain for the last element.
virtual void post()
Called after the element range loop.
virtual void printBlockExecutionInformation() const
Print information about the particular ordering of objects on each block.
virtual void preElement(const Elem *elem)
Called before the element assembly.
virtual void preBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr)
Called before the boundary assembly.
SubdomainID _neighbor_subdomain
The subdomain for the current neighbor.

◆ post()

void ComputeUserObjectsThread::post ( )
overridevirtual

Called after the element range loop.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 318 of file ComputeUserObjectsThread.C.

319 {
322 }
void clearActiveMaterialProperties(const THREAD_ID tid)
Clear the active material properties.
virtual void clearActiveElementalMooseVariables(const THREAD_ID tid) override
Clear the active elemental MooseVariableFEBase.

◆ postElement()

void ThreadedElementLoopBase< ConstElemRange >::postElement ( const Elem *  elem)
virtualinherited

Called after the element assembly is done (including surface assembling)

Parameters
elem- active element

Reimplemented in ComputeJacobianBlocksThread, NonlinearThread, ComputeIndicatorThread, ComputeJacobianThread, and ComputeMarkerThread.

Definition at line 361 of file ThreadedElementLoopBase.h.

362 {
363 }

◆ postInternalSide()

void ThreadedElementLoopBase< ConstElemRange >::postInternalSide ( const Elem *  elem,
unsigned int  side 
)
virtualinherited

Called after evaluations on an element internal side.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented in ComputeJacobianBlocksThread.

Definition at line 391 of file ThreadedElementLoopBase.h.

392 {
393 }

◆ pre()

void ThreadedElementLoopBase< ConstElemRange >::pre ( )
virtualinherited

Called before the element range loop.

Definition at line 337 of file ThreadedElementLoopBase.h.

Referenced by ComputeJacobianForScalingThread::operator()().

338 {
339 }

◆ preBoundary()

void ThreadedElementLoop< ConstElemRange >::preBoundary ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id,
const Elem *  lower_d_elem = nullptr 
)
overridevirtualinherited

Called before the boundary assembly.

Parameters
elem- The element we are checking is on the boundary.
side- The side of the element in question.
bnd_id- ID of the boundary we are at
lower_d_elem- Lower dimensional element (e.g. Mortar)

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 129 of file ThreadedElementLoop.h.

133 {
135 }
virtual void setCurrentBoundaryID(BoundaryID bid, const THREAD_ID tid) override
sets the current boundary ID in assembly
Base class for assembly-like calculations.

◆ preElement()

void ThreadedElementLoop< ConstElemRange >::preElement ( const Elem *  elem)
overridevirtualinherited

Called before the element assembly.

Parameters
elem- active element

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 115 of file ThreadedElementLoop.h.

Referenced by ComputeJacobianForScalingThread::operator()().

116 {
118 }
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid) override
Base class for assembly-like calculations.

◆ preInternalSide()

void ThreadedElementLoop< ConstElemRange >::preInternalSide ( const Elem *  elem,
unsigned int  side 
)
overridevirtualinherited

Called before evaluations on an element internal side.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 122 of file ThreadedElementLoop.h.

123 {
125 }
Base class for assembly-like calculations.
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override

◆ prepareElement()

void ThreadedElementLoop< ConstElemRange >::prepareElement ( const Elem *  elem)
protectedinherited

Definition at line 186 of file ThreadedElementLoop.h.

Referenced by NonlinearThread::onElement().

187 {
188  _fe_problem.prepare(elem, this->_tid);
189  _fe_problem.reinitElem(elem, this->_tid);
191 }
virtual void prepare(const Elem *elem, const THREAD_ID tid) override
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
void reinitMaterials(SubdomainID blk_id, const THREAD_ID tid, bool swap_stateful=true)
SubdomainID _subdomain
The subdomain for the current element.

◆ printBlockExecutionInformation()

void ComputeUserObjectsThread::printBlockExecutionInformation ( ) const
overrideprotectedvirtual

Print information about the loop, mostly order of execution of particular objects.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 360 of file ComputeUserObjectsThread.C.

361 {
363  return;
364 
365  // Gather all user objects that may execute
366  // TODO: restrict this gathering of boundary objects to boundaries that are present
367  // in the current block
368  std::vector<ShapeSideUserObject *> shapers;
369  const_cast<ComputeUserObjectsThread *>(this)->queryBoundary(
371 
372  std::vector<SideUserObject *> side_uos;
373  const_cast<ComputeUserObjectsThread *>(this)->queryBoundary(
375 
376  std::vector<InterfaceUserObject *> interface_objs;
377  const_cast<ComputeUserObjectsThread *>(this)->queryBoundary(
379 
380  std::vector<const DomainUserObject *> domain_interface_uos;
381  for (const auto * const domain_uo : _domain_objs)
382  if (domain_uo->shouldExecuteOnInterface())
383  domain_interface_uos.push_back(domain_uo);
384 
385  // Approximation of the number of user objects currently executing
386  const auto num_objects = _element_objs.size() + _domain_objs.size() + _shape_element_objs.size() +
387  side_uos.size() + shapers.size() + _internal_side_objs.size() +
388  interface_objs.size() + domain_interface_uos.size();
389 
390  const auto & console = _fe_problem.console();
391  const auto & execute_on = _fe_problem.getCurrentExecuteOnFlag();
392 
393  if (num_objects > 0)
394  {
395  if (_blocks_exec_printed.count(_subdomain))
396  return;
397 
398  console << "[DBG] Ordering of User Objects on block " << _subdomain << std::endl;
399  // Output specific ordering of objects
400  printExecutionOrdering<ElementUserObject>(_element_objs, "element user objects");
401  printExecutionOrdering<DomainUserObject>(_domain_objs, "domain user objects");
403  printExecutionOrdering<ShapeElementUserObject>(
404  _shape_element_objs, "element user objects contributing to the Jacobian");
405  printExecutionOrdering<SideUserObject>(side_uos, "side user objects");
407  printExecutionOrdering<ShapeSideUserObject>(shapers,
408  "side user objects contributing to the Jacobian");
409  printExecutionOrdering<InternalSideUserObject>(_internal_side_objs,
410  "internal side user objects");
411  printExecutionOrdering<InterfaceUserObject>(interface_objs, "interface user objects");
412  console << "[DBG] Only user objects active on local element/sides are executed" << std::endl;
413  }
414  else if (num_objects == 0 && !_blocks_exec_printed.count(_subdomain))
415  console << "[DBG] No User Objects on block " << _subdomain << " on " << execute_on.name()
416  << std::endl;
417 
418  // Mark subdomain as having printed to avoid printing again
420 }
std::vector< ElementUserObject * > _element_objs
std::vector< ShapeElementUserObject * > _shape_element_objs
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
void queryBoundary(Interfaces iface, BoundaryID bnd, std::vector< T > &results)
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
std::set< SubdomainID > _blocks_exec_printed
Keep track of which blocks were visited.
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48
Class for threaded computation of UserObjects.
std::vector< InternalSideUserObject * > _internal_side_objs
SubdomainID _subdomain
The subdomain for the current element.
std::vector< DomainUserObject * > _domain_objs
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:684
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:21

◆ printBoundaryExecutionInformation()

virtual void ThreadedElementLoopBase< ConstElemRange >::printBoundaryExecutionInformation ( const unsigned int  ) const
inlineprotectedvirtualinherited

Print information about the particular ordering of objects on each boundary.

Reimplemented in NonlinearThread.

Definition at line 187 of file ThreadedElementLoopBase.h.

187 {}

◆ printExecutionOrdering() [1/2]

void ThreadedElementLoop< ConstElemRange >::printExecutionOrdering ( const std::vector< T *> &  objs,
const bool  print_header = true,
const std::string &  line_prefix = "[DBG]" 
) const
protectedinherited

Routine to output the ordering of objects within a vector of pointers to these objects.

These objects must implement the name() routine, and it must return a string or compatible type.

Template Parameters
Tthe object type
Parameters
objsthe vector with all the objects (should be pointers)
objects_typethe name of the type of objects. Defaults to the CPP object name
print_headerwhether to print a header about the timing of execution and the type of objects

Definition at line 148 of file ThreadedElementLoop.h.

151 {
152  if (!objs.size())
153  return;
154 
155  auto & console = _fe_problem.console();
156  const auto objects_type = MooseUtils::prettyCppType(objs[0]);
157  std::vector<MooseObject *> moose_objs;
158  for (auto obj_ptr : objs)
159  moose_objs.push_back(dynamic_cast<MooseObject *>(obj_ptr));
160  const auto names = ConsoleUtils::mooseObjectVectorToString(moose_objs);
161 
162  // Print string with a DBG prefix and with sufficient line breaks
163  std::string message = print_header ? "Executing " + objects_type + " on " +
165  : "";
166  message += (print_header ? "Order of execution:\n" : "") + names;
167  console << ConsoleUtils::formatString(message, line_prefix) << std::endl;
168 }
std::string mooseObjectVectorToString(const std::vector< MooseObject *> &objs, const std::string &sep=" ")
Routine to output the name of MooseObjects in a string.
Definition: ConsoleUtils.C:597
const std::string & name() const
Definition: MooseEnumItem.h:35
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
std::string formatString(std::string message, const std::string &prefix)
Add new lines and prefixes to a string for pretty display in output NOTE: This makes a copy of the st...
Definition: ConsoleUtils.C:581
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48
std::string prettyCppType(const std::string &cpp_type)
Definition: MooseUtils.C:1151

◆ printExecutionOrdering() [2/2]

void ThreadedElementLoop< ConstElemRange >::printExecutionOrdering ( const std::vector< std::shared_ptr< T >> &  objs_ptrs,
const bool  print_header = true,
const std::string &  line_prefix = "[DBG]" 
) const
protectedinherited

Definition at line 173 of file ThreadedElementLoop.h.

177 {
178  std::vector<T *> regular_ptrs;
179  for (auto shared_ptr : objs_ptrs)
180  regular_ptrs.push_back(shared_ptr.get());
181  printExecutionOrdering<T>(regular_ptrs, print_header, line_prefix);
182 }

◆ printGeneralExecutionInformation()

void ComputeUserObjectsThread::printGeneralExecutionInformation ( ) const
overrideprotectedvirtual

Print general information about the loop, like the ordering of class of objects.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 330 of file ComputeUserObjectsThread.C.

331 {
333  {
334  const auto & console = _fe_problem.console();
335  const auto & execute_on = _fe_problem.getCurrentExecuteOnFlag();
336  console << "[DBG] Computing elemental user objects on " << execute_on << std::endl;
337  mooseDoOnce(console << "[DBG] Execution order of objects types on each element then its sides:"
338  << std::endl;
339  // onElement
340  console << "[DBG] - element user objects" << std::endl;
341  console << "[DBG] - domain user objects" << std::endl;
342  console << "[DBG] - element user objects contributing to the Jacobian" << std::endl;
343 
344  // onBoundary
345  console << "[DBG] - side user objects" << std::endl;
346  console << "[DBG] - domain user objects executing on sides" << std::endl;
347  console << "[DBG] - side user objects contributing to the Jacobian" << std::endl;
348 
349  // onInternalSide
350  console << "[DBG] - internal side user objects" << std::endl;
351  console << "[DBG] - domain user objects executing on internal sides" << std::endl;
352 
353  // onInterface
354  console << "[DBG] - interface user objects" << std::endl;
355  console << "[DBG] - domain user objects executing at interfaces" << std::endl;);
356  }
357 }
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48

◆ printVectorOrdering()

template<typename T >
void ComputeUserObjectsThread::printVectorOrdering ( std::vector< T *>  uos,
const std::string &  name 
) const
protected

Format output of vector of UOs.

◆ queryBoundary()

template<typename T >
void ComputeUserObjectsThread::queryBoundary ( Interfaces  iface,
BoundaryID  bnd,
std::vector< T > &  results 
)
inlineprivate

Definition at line 77 of file ComputeUserObjectsThread.h.

Referenced by onBoundary(), onInterface(), and printBlockExecutionInformation().

78  {
79  _query_boundary.queryInto(results, _tid, std::make_tuple(bnd, false), iface);
80  }
TheWarehouse::QueryCache< AttribThread, AttribBoundaries, AttribInterfaces > _query_boundary
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
Definition: TheWarehouse.h:311

◆ querySubdomain()

template<typename T >
void ComputeUserObjectsThread::querySubdomain ( Interfaces  iface,
std::vector< T > &  results 
)
inlineprivate

Definition at line 72 of file ComputeUserObjectsThread.h.

Referenced by subdomainChanged().

73  {
74  _query_subdomain.queryInto(results, _tid, _subdomain, iface);
75  }
TheWarehouse::QueryCache< AttribThread, AttribSubdomains, AttribInterfaces > _query_subdomain
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
Definition: TheWarehouse.h:311
SubdomainID _subdomain
The subdomain for the current element.

◆ resetExecPrintedSets()

void ThreadedElementLoopBase< ConstElemRange >::resetExecPrintedSets ( ) const
protectedinherited

Resets the set of blocks and boundaries visited.

Definition at line 454 of file ThreadedElementLoopBase.h.

455 {
456  _blocks_exec_printed.clear();
457  _boundaries_exec_printed.clear();
458 }
std::set< SubdomainID > _blocks_exec_printed
Keep track of which blocks were visited.
std::set< BoundaryID > _boundaries_exec_printed
Keep track of which boundaries were visited.

◆ shouldComputeInternalSide()

bool ThreadedElementLoopBase< ConstElemRange >::shouldComputeInternalSide ( const Elem &  elem,
const Elem &  neighbor 
) const
protectedvirtualinherited

Whether to compute the internal side for the provided element-neighbor pair.

Typically this will return true if the element id is less than the neighbor id when the elements are equal level, or when the element is more refined than the neighbor, and then false otherwise. One type of loop where the logic will be different is when projecting stateful material properties

Reimplemented in NonlinearThread, and FlagElementsThread.

Definition at line 429 of file ThreadedElementLoopBase.h.

431 {
432  auto level = [this](const auto & elem_arg)
433  {
434  if (_mesh.doingPRefinement())
435  return elem_arg.p_level();
436  else
437  return elem_arg.level();
438  };
439  const auto elem_id = elem.id(), neighbor_id = neighbor.id();
440  const auto elem_level = level(elem), neighbor_level = level(neighbor);
441 
442  // When looping over elements and then sides, we need to make sure that we do not duplicate
443  // effort, e.g. if a face is shared by element 1 and element 2, then we do not want to do compute
444  // work both when we are visiting element 1 *and* then later when visiting element 2. Our rule is
445  // to only compute when we are visiting the element that has the lower element id when element and
446  // neighbor are of the same adaptivity level, and then if they are not of the same level, then
447  // we only compute when we are visiting the finer element
448  return (neighbor.active() && (neighbor_level == elem_level) && (elem_id < neighbor_id)) ||
449  (neighbor_level < elem_level);
450 }
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing is p-refinement.
Definition: MooseMesh.h:1365

◆ subdomainChanged()

void ComputeUserObjectsThread::subdomainChanged ( )
overridevirtual

Called every time the current subdomain changes (i.e.

the subdomain of this element is not the same as the subdomain of the last element). Beware of over-using this! You might think that you can do some expensive stuff in here and get away with it... but there are applications that have TONS of subdomains....

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 52 of file ComputeUserObjectsThread.C.

53 {
54  // for the current thread get block objects for the current subdomain and *all* side objects
55  std::vector<UserObject *> objs;
58  objs);
59 
60  _query.clone()
62  .condition<AttribInterfaces>(Interfaces::DomainUserObject)
63  .queryInto(_all_domain_objs);
64 
65  std::vector<UserObject *> side_objs;
66  _query.clone()
68  .condition<AttribInterfaces>(Interfaces::SideUserObject)
69  .queryInto(side_objs);
70 
71  objs.insert(objs.begin(), side_objs.begin(), side_objs.end());
72 
73  // collect dependencies and run subdomain setup
75 
76  std::set<MooseVariableFEBase *> needed_moose_vars;
77  std::unordered_set<unsigned int> needed_mat_props;
78  std::set<TagID> needed_fe_var_vector_tags;
79  for (const auto obj : objs)
80  {
81  auto v_obj = dynamic_cast<MooseVariableDependencyInterface *>(obj);
82  if (v_obj)
83  {
84  const auto & v_deps = v_obj->getMooseVariableDependencies();
85  needed_moose_vars.insert(v_deps.begin(), v_deps.end());
86  }
87 
88  auto m_obj = dynamic_cast<MaterialPropertyInterface *>(obj);
89  if (m_obj)
90  {
91  auto & m_deps = m_obj->getMatPropDependencies();
92  needed_mat_props.insert(m_deps.begin(), m_deps.end());
93  }
94 
95  auto c_obj = dynamic_cast<Coupleable *>(obj);
96  if (c_obj)
97  {
98  const auto & tag_deps = c_obj->getFEVariableCoupleableVectorTags();
99  needed_fe_var_vector_tags.insert(tag_deps.begin(), tag_deps.end());
100  }
101 
102  obj->subdomainSetup();
103  }
105  _subdomain, needed_fe_var_vector_tags, _tid);
106 
108  _fe_problem.setActiveFEVariableCoupleableVectorTags(needed_fe_var_vector_tags, _tid);
109  _fe_problem.prepareMaterials(needed_mat_props, _subdomain, _tid);
110 
115 }
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const
Retrieve the set of material properties that this object depends on.
const std::set< MooseVariableFieldBase * > & getMooseVariableDependencies() const
Retrieve the set of MooseVariableFieldBase that this object depends on.
std::vector< ElementUserObject * > _element_objs
std::vector< ShapeElementUserObject * > _shape_element_objs
void querySubdomain(Interfaces iface, std::vector< T > &results)
const MaterialWarehouse & getMaterialWarehouse() const
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase *> &moose_vars, const THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
const TheWarehouse::Query _query
QueryCache clone() const
clone creates and returns an independent copy of the query in its current state.
Definition: TheWarehouse.h:292
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:52
void updateBlockFEVariableCoupledVectorTagDependency(SubdomainID id, std::set< TagID > &needed_fe_var_vector_tags, THREAD_ID tid=0) const
Update FE variable coupleable vector tag vector.
virtual void subdomainSetup(SubdomainID subdomain, const THREAD_ID tid)
An interface for accessing Materials.
std::vector< InternalSideUserObject * > _internal_side_objs
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Definition: TheWarehouse.h:284
SubdomainID _subdomain
The subdomain for the current element.
std::vector< DomainUserObject * > _domain_objs
virtual void setActiveFEVariableCoupleableVectorTags(std::set< TagID > &vtags, const THREAD_ID tid) override
void prepareMaterials(const std::unordered_set< unsigned int > &consumer_needed_mat_props, const SubdomainID blk_id, const THREAD_ID tid)
Add the MooseVariables and the material properties that the current materials depend on to the depend...
std::set< TagID > & getFEVariableCoupleableVectorTags()
Definition: Coupleable.h:120
std::vector< DomainUserObject * > _all_domain_objs

Member Data Documentation

◆ _all_domain_objs

std::vector<DomainUserObject *> ComputeUserObjectsThread::_all_domain_objs
private

Definition at line 90 of file ComputeUserObjectsThread.h.

Referenced by onInterface(), and subdomainChanged().

◆ _aux_sys

AuxiliarySystem& ComputeUserObjectsThread::_aux_sys
private

Definition at line 92 of file ComputeUserObjectsThread.h.

Referenced by onElement().

◆ _blocks_exec_printed

std::set<SubdomainID> ThreadedElementLoopBase< ConstElemRange >::_blocks_exec_printed
mutableprotectedinherited

◆ _boundaries_exec_printed

std::set<BoundaryID> ThreadedElementLoopBase< ConstElemRange >::_boundaries_exec_printed
mutableprotectedinherited

Keep track of which boundaries were visited.

Definition at line 193 of file ThreadedElementLoopBase.h.

Referenced by NonlinearThread::printBoundaryExecutionInformation().

◆ _domain_objs

std::vector<DomainUserObject *> ComputeUserObjectsThread::_domain_objs
private

◆ _element_objs

std::vector<ElementUserObject *> ComputeUserObjectsThread::_element_objs
private

◆ _fe_problem

FEProblemBase& ThreadedElementLoop< ConstElemRange >::_fe_problem
protectedinherited

Definition at line 62 of file ThreadedElementLoop.h.

Referenced by ComputeResidualThread::accumulate(), ComputeResidualAndJacobianThread::accumulate(), ComputeResidualThread::accumulateLower(), ComputeResidualAndJacobianThread::accumulateLower(), ComputeJacobianThread::accumulateLower(), ComputeResidualThread::accumulateNeighbor(), ComputeResidualAndJacobianThread::accumulateNeighbor(), ComputeJacobianThread::accumulateNeighbor(), ComputeResidualThread::accumulateNeighborLower(), ComputeResidualAndJacobianThread::accumulateNeighborLower(), ComputeJacobianThread::accumulateNeighborLower(), ComputeJacobianThread::compute(), ComputeFullJacobianThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnElement(), NonlinearThread::computeOnElement(), ComputeFullJacobianThread::computeOnInterface(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeResidualThread::determineObjectWarehouses(), ComputeJacobianThread::determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), NonlinearThread::onBoundary(), onBoundary(), ComputeElemDampingThread::onElement(), NonlinearThread::onElement(), onElement(), NonlinearThread::onInterface(), onInterface(), NonlinearThread::onInternalSide(), onInternalSide(), post(), ComputeJacobianThread::postElement(), ComputeJacobianBlocksThread::postElement(), ComputeJacobianBlocksThread::postInternalSide(), NonlinearThread::prepareFace(), printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), NonlinearThread::subdomainChanged(), and subdomainChanged().

◆ _interface_user_objects

std::vector<InterfaceUserObject *> ComputeUserObjectsThread::_interface_user_objects
private

Definition at line 86 of file ComputeUserObjectsThread.h.

◆ _internal_side_objs

std::vector<InternalSideUserObject *> ComputeUserObjectsThread::_internal_side_objs
private

◆ _mesh

MooseMesh& ThreadedElementLoopBase< ConstElemRange >::_mesh
protectedinherited

◆ _neighbor_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_neighbor_subdomain
protectedinherited

◆ _old_neighbor_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_old_neighbor_subdomain
protectedinherited

The subdomain for the last neighbor.

Definition at line 178 of file ThreadedElementLoopBase.h.

◆ _old_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_old_subdomain
protectedinherited

The subdomain for the last element.

Definition at line 172 of file ThreadedElementLoopBase.h.

Referenced by ComputeJacobianForScalingThread::operator()().

◆ _query

const TheWarehouse::Query ComputeUserObjectsThread::_query
private

Definition at line 82 of file ComputeUserObjectsThread.h.

Referenced by subdomainChanged().

◆ _query_boundary

TheWarehouse::QueryCache<AttribThread, AttribBoundaries, AttribInterfaces> ComputeUserObjectsThread::_query_boundary
private

Definition at line 84 of file ComputeUserObjectsThread.h.

Referenced by queryBoundary().

◆ _query_subdomain

TheWarehouse::QueryCache<AttribThread, AttribSubdomains, AttribInterfaces> ComputeUserObjectsThread::_query_subdomain
private

Definition at line 83 of file ComputeUserObjectsThread.h.

Referenced by querySubdomain().

◆ _shape_element_objs

std::vector<ShapeElementUserObject *> ComputeUserObjectsThread::_shape_element_objs
private

◆ _subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_subdomain
protectedinherited

◆ _tid

THREAD_ID ThreadedElementLoopBase< ConstElemRange >::_tid
protectedinherited

Definition at line 166 of file ThreadedElementLoopBase.h.

Referenced by ComputeResidualThread::accumulate(), ComputeResidualAndJacobianThread::accumulate(), ComputeResidualThread::accumulateLower(), ComputeResidualAndJacobianThread::accumulateLower(), ComputeJacobianThread::accumulateLower(), ComputeResidualThread::accumulateNeighbor(), ComputeResidualAndJacobianThread::accumulateNeighbor(), ComputeJacobianThread::accumulateNeighbor(), ComputeResidualThread::accumulateNeighborLower(), ComputeResidualAndJacobianThread::accumulateNeighborLower(), ComputeJacobianThread::accumulateNeighborLower(), ComputeFullJacobianThread::computeOnBoundary(), NonlinearThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnElement(), NonlinearThread::computeOnElement(), ComputeFullJacobianThread::computeOnInterface(), NonlinearThread::computeOnInterface(), ComputeResidualThread::computeOnInternalFace(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeResidualAndJacobianThread::computeOnInternalFace(), ComputeJacobianThread::computeOnInternalFace(), NonlinearThread::computeOnInternalFace(), ComputeResidualThread::determineObjectWarehouses(), ComputeJacobianThread::determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), ComputeMaterialsObjectThread::onBoundary(), NonlinearThread::onBoundary(), onBoundary(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeMaterialsObjectThread::onElement(), ComputeIndicatorThread::onElement(), NonlinearThread::onElement(), onElement(), ComputeMaterialsObjectThread::onInterface(), NonlinearThread::onInterface(), onInterface(), ComputeMaterialsObjectThread::onInternalSide(), ComputeIndicatorThread::onInternalSide(), NonlinearThread::onInternalSide(), onInternalSide(), ComputeJacobianForScalingThread::operator()(), ComputeMaterialsObjectThread::post(), ComputeMarkerThread::post(), ComputeIndicatorThread::post(), post(), ComputeJacobianThread::postElement(), ComputeJacobianBlocksThread::postElement(), ComputeJacobianBlocksThread::postInternalSide(), NonlinearThread::prepareFace(), ComputeMarkerThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), queryBoundary(), querySubdomain(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), NonlinearThread::subdomainChanged(), and subdomainChanged().


The documentation for this class was generated from the following files: