Base class for assembly-like calculations. More...
#include <ThreadedElementLoopBase.h>
Public Member Functions | |
ThreadedElementLoopBase (MooseMesh &mesh) | |
ThreadedElementLoopBase (ThreadedElementLoopBase &x, Threads::split split) | |
virtual | ~ThreadedElementLoopBase () |
virtual void | operator() (const RangeType &range, bool bypass_threading=false) |
virtual void | pre () |
Called before the element range loop. More... | |
virtual void | post () |
Called after the element range loop. More... | |
virtual void | onElement (const Elem *elem) |
Assembly of the element (not including surface assembly) More... | |
virtual void | preElement (const Elem *elem) |
Called before the element assembly. More... | |
virtual void | postElement (const Elem *elem) |
Called after the element assembly is done (including surface assembling) More... | |
virtual void | preBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) |
Called before the boundary assembly. More... | |
virtual void | onBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) |
Called when doing boundary assembling. More... | |
virtual void | preInternalSide (const Elem *elem, unsigned int side) |
Called before evaluations on an element internal side. More... | |
virtual void | postInternalSide (const Elem *elem, unsigned int side) |
Called after evaluations on an element internal side. More... | |
virtual void | onInternalSide (const Elem *elem, unsigned int side) |
Called when doing internal edge assembling. More... | |
virtual void | onInterface (const Elem *elem, unsigned int side, BoundaryID bnd_id) |
Called when doing interface assembling. More... | |
virtual void | subdomainChanged () |
Called every time the current subdomain changes (i.e. More... | |
virtual void | neighborSubdomainChanged () |
Called every time the neighbor subdomain changes (i.e. More... | |
virtual void | caughtMooseException (MooseException &) |
Called if a MooseException is caught anywhere during the computation. More... | |
virtual bool | keepGoing () |
Whether or not the loop should continue. More... | |
Protected Member Functions | |
virtual void | printGeneralExecutionInformation () const |
Print information about the loop ordering. More... | |
virtual void | printBlockExecutionInformation () const |
Print information about the particular ordering of objects on each block. More... | |
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... | |
Protected Attributes | |
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 | |
virtual bool | shouldComputeInternalSide (const Elem &elem, const Elem &neighbor) const |
Whether to compute the internal side for the provided element-neighbor pair. More... | |
Base class for assembly-like calculations.
Definition at line 23 of file ThreadedElementLoopBase.h.
ThreadedElementLoopBase< RangeType >::ThreadedElementLoopBase | ( | MooseMesh & | mesh | ) |
Definition at line 198 of file ThreadedElementLoopBase.h.
ThreadedElementLoopBase< RangeType >::ThreadedElementLoopBase | ( | ThreadedElementLoopBase< RangeType > & | x, |
Threads::split | split | ||
) |
Definition at line 203 of file ThreadedElementLoopBase.h.
|
virtual |
Definition at line 210 of file ThreadedElementLoopBase.h.
|
inlinevirtual |
Called if a MooseException is caught anywhere during the computation.
The single input parameter taken is a MooseException object.
Reimplemented in ThreadedElementLoop< RangeType >, ThreadedElementLoop< ConstElemRange >, ThreadedElementLoop< DistElemRange >, and ThreadedElementLoop< ConstElemPointerRange >.
Definition at line 144 of file ThreadedElementLoopBase.h.
|
inlinevirtual |
Whether or not the loop should continue.
Reimplemented in ThreadedElementLoop< RangeType >, ThreadedElementLoop< ConstElemRange >, ThreadedElementLoop< DistElemRange >, and ThreadedElementLoop< ConstElemPointerRange >.
Definition at line 151 of file ThreadedElementLoopBase.h.
|
virtual |
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 in ThreadedElementLoop< RangeType >, ThreadedElementLoop< ConstElemRange >, ThreadedElementLoop< DistElemRange >, and ThreadedElementLoop< ConstElemPointerRange >.
Definition at line 398 of file ThreadedElementLoopBase.h.
|
virtual |
Called when doing boundary assembling.
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 in ComputeUserObjectsThread, NonlinearThread, ProjectMaterialProperties, ComputeIndicatorThread, ComputeMaterialsObjectThread, and ComputeMarkerThread.
Definition at line 357 of file ThreadedElementLoopBase.h.
|
virtual |
Assembly of the element (not including surface assembly)
elem | - active element |
Reimplemented in ComputeUserObjectsThread, NonlinearThread, ComputeDiracThread, ProjectMaterialProperties, ComputeIndicatorThread, ComputeMaterialsObjectThread, ComputeElemAuxVarsThread< AuxKernelType >, ComputeElemDampingThread, FlagElementsThread, ComputeMarkerThread, UpdateErrorVectorsThread, MaxVarNDofsPerElem, and CacheChangedListsThread.
Definition at line 330 of file ThreadedElementLoopBase.h.
|
virtual |
Called when doing interface assembling.
elem | - Element we are on |
side | - local side number of the element 'elem' |
bnd_id | - ID of the interface we are at |
Reimplemented in ComputeUserObjectsThread, NonlinearThread, and ComputeMaterialsObjectThread.
Definition at line 384 of file ThreadedElementLoopBase.h.
|
virtual |
Called when doing internal edge assembling.
elem | - Element we are on |
side | - local side number of the element 'elem' |
Reimplemented in ComputeUserObjectsThread, NonlinearThread, ProjectMaterialProperties, ComputeIndicatorThread, ComputeMaterialsObjectThread, and ComputeMarkerThread.
Definition at line 378 of file ThreadedElementLoopBase.h.
|
virtual |
Reimplemented in NonlinearThread, and ComputeJacobianForScalingThread.
Definition at line 216 of file ThreadedElementLoopBase.h.
Referenced by NonlinearThread::operator()().
|
virtual |
Called after the element range loop.
Reimplemented in ComputeUserObjectsThread, NonlinearThread, ComputeIndicatorThread, ComputeDiracThread, ComputeElemAuxVarsThread< AuxKernelType >, ComputeMarkerThread, and ComputeMaterialsObjectThread.
Definition at line 324 of file ThreadedElementLoopBase.h.
|
virtual |
Called after the element assembly is done (including surface assembling)
elem | - active element |
Reimplemented in ComputeJacobianBlocksThread, NonlinearThread, ComputeIndicatorThread, ComputeDiracThread, ComputeJacobianThread, and ComputeMarkerThread.
Definition at line 342 of file ThreadedElementLoopBase.h.
|
virtual |
Called after evaluations on an element internal side.
elem | - Element we are on |
side | - local side number of the element 'elem' |
Reimplemented in ComputeJacobianBlocksThread.
Definition at line 372 of file ThreadedElementLoopBase.h.
|
virtual |
Called before the element range loop.
Reimplemented in ComputeDiracThread.
Definition at line 318 of file ThreadedElementLoopBase.h.
|
virtual |
Called before the boundary assembly.
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 in ThreadedElementLoop< RangeType >, ThreadedElementLoop< ConstElemRange >, ThreadedElementLoop< DistElemRange >, and ThreadedElementLoop< ConstElemPointerRange >.
Definition at line 348 of file ThreadedElementLoopBase.h.
|
virtual |
Called before the element assembly.
elem | - active element |
Reimplemented in ThreadedElementLoop< RangeType >, ThreadedElementLoop< ConstElemRange >, ThreadedElementLoop< DistElemRange >, and ThreadedElementLoop< ConstElemPointerRange >.
Definition at line 336 of file ThreadedElementLoopBase.h.
|
virtual |
Called before evaluations on an element internal side.
elem | - Element we are on |
side | - local side number of the element 'elem' |
Reimplemented in ThreadedElementLoop< RangeType >, ThreadedElementLoop< ConstElemRange >, ThreadedElementLoop< DistElemRange >, and ThreadedElementLoop< ConstElemPointerRange >.
Definition at line 366 of file ThreadedElementLoopBase.h.
|
inlineprotectedvirtual |
Print information about the particular ordering of objects on each block.
Reimplemented in NonlinearThread, ComputeUserObjectsThread, ComputeIndicatorThread, ComputeDiracThread, ComputeElemAuxVarsThread< AuxKernelType >, and ComputeMarkerThread.
Definition at line 173 of file ThreadedElementLoopBase.h.
|
inlineprotectedvirtual |
Print information about the particular ordering of objects on each boundary.
Reimplemented in NonlinearThread.
Definition at line 176 of file ThreadedElementLoopBase.h.
|
inlineprotectedvirtual |
Print information about the loop ordering.
Reimplemented in NonlinearThread, ComputeUserObjectsThread, ComputeIndicatorThread, ComputeDiracThread, ComputeElemAuxVarsThread< AuxKernelType >, ComputeMarkerThread, and ComputeElemDampingThread.
Definition at line 170 of file ThreadedElementLoopBase.h.
|
protected |
Resets the set of blocks and boundaries visited.
Definition at line 429 of file ThreadedElementLoopBase.h.
|
privatevirtual |
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 ProjectMaterialProperties, and FlagElementsThread.
Definition at line 404 of file ThreadedElementLoopBase.h.
|
virtual |
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 in ComputeUserObjectsThread, NonlinearThread, ComputeDiracThread, ProjectMaterialProperties, ComputeIndicatorThread, ComputeMaterialsObjectThread, ComputeElemAuxVarsThread< AuxKernelType >, and ComputeMarkerThread.
Definition at line 392 of file ThreadedElementLoopBase.h.
|
mutableprotected |
Keep track of which blocks were visited.
Definition at line 179 of file ThreadedElementLoopBase.h.
|
mutableprotected |
Keep track of which boundaries were visited.
Definition at line 182 of file ThreadedElementLoopBase.h.
|
protected |
Definition at line 154 of file ThreadedElementLoopBase.h.
|
protected |
The subdomain for the current neighbor.
Definition at line 164 of file ThreadedElementLoopBase.h.
|
protected |
The subdomain for the last neighbor.
Definition at line 167 of file ThreadedElementLoopBase.h.
|
protected |
The subdomain for the last element.
Definition at line 161 of file ThreadedElementLoopBase.h.
|
protected |
The subdomain for the current element.
Definition at line 158 of file ThreadedElementLoopBase.h.
|
protected |
Definition at line 155 of file ThreadedElementLoopBase.h.