Class for threaded computation of UserObjects. More...
#include <ComputeUserObjectsThread.h>
Classes | |
| struct | BoundaryMaterialReinitCache |
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) | |
| virtual void | onBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override |
| Called when doing boundary assembling. | |
| virtual void | onInternalSide (const Elem *elem, unsigned int side) override |
| Called when doing internal edge assembling. | |
| virtual void | onExternalSide (const Elem *elem, unsigned int side) override |
| Called when iterating over external sides (no side neighbor) | |
| virtual void | onInterface (const Elem *elem, unsigned int side, BoundaryID bnd_id) override |
| Called when doing interface assembling. | |
| virtual void | post () override |
| Called after the element range loop. | |
| virtual void | subdomainChanged () override |
| Called every time the current subdomain changes (i.e. | |
| void | join (const ComputeUserObjectsThread &) |
| virtual void | caughtMooseException (MooseException &e) override |
| Called if a MooseException is caught anywhere during the computation. | |
| virtual bool | keepGoing () override |
| Whether or not the loop should continue. | |
| virtual void | preElement (const Elem *elem) override |
| Called before the element assembly. | |
| virtual void | preInternalSide (const Elem *elem, unsigned int side) override |
| Called before evaluations on an element internal side. | |
| virtual void | preBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override |
| Called before the boundary assembly. | |
| virtual void | neighborSubdomainChanged () override |
| Called every time the neighbor subdomain changes (i.e. | |
| virtual void | operator() (const RangeType &range, bool bypass_threading=false) |
| virtual void | pre () |
| Called before the element range loop. | |
| virtual void | postElement (const Elem *elem) |
| Called after the element assembly is done (including surface assembling) | |
| virtual void | postInternalSide (const Elem *elem, unsigned int side) |
| Called after evaluations on an element internal side. | |
Protected Member Functions | |
| void | printGeneralExecutionInformation () const override |
| Print general information about the loop, like the ordering of class of objects. | |
| void | printBlockExecutionInformation () const override |
| Print information about the loop, mostly order of execution of particular objects. | |
| template<typename T > | |
| void | printVectorOrdering (std::vector< T * > uos, const std::string &name) const |
| Format output of vector of UOs. | |
| void | prepareElement (const Elem *elem) |
| void | clearVarsAndMaterials () |
| void | getRequiredBoundaryMaterials (const std::vector< const MaterialPropertyInterface * > &material_consumers, BoundaryID bnd_id, SubdomainID subdomain_id, std::deque< MaterialBase * > &required_face_materials, std::deque< MaterialBase * > &required_boundary_materials) const |
| Determine the face and boundary materials required by material property consumers. | |
| 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. | |
| 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. | |
| 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. | |
Protected Attributes | |
| FEProblemBase & | _fe_problem |
| MooseMesh & | _mesh |
| THREAD_ID | _tid |
| SubdomainID | _subdomain |
| The subdomain for the current element. | |
| SubdomainID | _old_subdomain |
| The subdomain for the last element. | |
| SubdomainID | _neighbor_subdomain |
| The subdomain for the current neighbor. | |
| SubdomainID | _old_neighbor_subdomain |
| The subdomain for the last neighbor. | |
| 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. | |
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) |
| const BoundaryMaterialReinitCache & | getBoundaryMaterialReinitCache (BoundaryID bnd_id, SubdomainID subdomain_id) |
| Return the exact face and boundary materials required while executing on this boundary. | |
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 |
| std::map< std::pair< BoundaryID, SubdomainID >, BoundaryMaterialReinitCache > | _boundary_material_reinit_cache |
Class for threaded computation of UserObjects.
Definition at line 37 of file ComputeUserObjectsThread.h.
| ComputeUserObjectsThread::ComputeUserObjectsThread | ( | FEProblemBase & | problem, |
| const TheWarehouse::Query & | query | ||
| ) |
Definition at line 29 of file ComputeUserObjectsThread.C.
| ComputeUserObjectsThread::ComputeUserObjectsThread | ( | ComputeUserObjectsThread & | x, |
| Threads::split | |||
| ) |
Definition at line 40 of file ComputeUserObjectsThread.C.
|
virtual |
Definition at line 49 of file ComputeUserObjectsThread.C.
|
overridevirtualinherited |
Called if a MooseException is caught anywhere during the computation.
The single input parameter taken is a MooseException object.
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 44 of file ThreadedElementLoop.h.
|
protectedinherited |
Definition at line 61 of file ThreadedElementLoop.h.
|
private |
Return the exact face and boundary materials required while executing on this boundary.
Definition at line 162 of file ComputeUserObjectsThread.C.
Referenced by onBoundary().
|
protectedinherited |
Determine the face and boundary materials required by material property consumers.
Definition at line 63 of file ThreadedElementLoop.h.
| void ComputeUserObjectsThread::join | ( | const ComputeUserObjectsThread & | ) |
Definition at line 358 of file ComputeUserObjectsThread.C.
|
inlineoverridevirtualinherited |
Whether or not the loop should continue.
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 46 of file ThreadedElementLoop.h.
|
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< RangeType >.
Definition at line 57 of file ThreadedElementLoop.h.
|
overridevirtual |
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 from ThreadedElementLoopBase< RangeType >.
Definition at line 195 of file ComputeUserObjectsThread.C.
|
overridevirtual |
Assembly of the element (not including surface assembly)
| elem | - active element |
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 118 of file ComputeUserObjectsThread.C.
|
overridevirtual |
Called when iterating over external sides (no side neighbor)
| elem | - Element we are on |
| side | - local side number of the element 'elem' |
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 285 of file ComputeUserObjectsThread.C.
|
overridevirtual |
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 from ThreadedElementLoopBase< RangeType >.
Definition at line 295 of file ComputeUserObjectsThread.C.
|
overridevirtual |
Called when doing internal edge assembling.
| elem | - Element we are on |
| side | - local side number of the element 'elem' |
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 253 of file ComputeUserObjectsThread.C.
|
virtualinherited |
Definition at line 226 of file ThreadedElementLoopBase.h.
Referenced by NonlinearThread::operator()().
|
overridevirtual |
Called after the element range loop.
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 351 of file ComputeUserObjectsThread.C.
|
virtualinherited |
Called after the element assembly is done (including surface assembling)
| elem | - active element |
Reimplemented in ComputeDiracThread, ComputeIndicatorThread, ComputeJacobianThread, ComputeMarkerThread, NonlinearThread, and ComputeJacobianBlocksThread.
Definition at line 356 of file ThreadedElementLoopBase.h.
|
virtualinherited |
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 386 of file ThreadedElementLoopBase.h.
|
virtualinherited |
Called before the element range loop.
Reimplemented in ComputeDiracThread.
Definition at line 332 of file ThreadedElementLoopBase.h.
Referenced by ComputeJacobianForScalingThread::operator()().
|
overridevirtualinherited |
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 from ThreadedElementLoopBase< RangeType >.
Definition at line 52 of file ThreadedElementLoop.h.
|
overridevirtualinherited |
Called before the element assembly.
| elem | - active element |
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 48 of file ThreadedElementLoop.h.
|
overridevirtualinherited |
Called before evaluations on an element internal side.
| elem | - Element we are on |
| side | - local side number of the element 'elem' |
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 50 of file ThreadedElementLoop.h.
|
protectedinherited |
Definition at line 60 of file ThreadedElementLoop.h.
|
overrideprotectedvirtual |
Print information about the loop, mostly order of execution of particular objects.
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 393 of file ComputeUserObjectsThread.C.
|
inlineprotectedvirtualinherited |
Print information about the particular ordering of objects on each boundary.
Reimplemented in NonlinearThread.
Definition at line 187 of file ThreadedElementLoopBase.h.
|
protectedinherited |
Definition at line 87 of file ThreadedElementLoop.h.
|
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.
| T | the object type |
| objs | the vector with all the objects (should be pointers) |
| objects_type | the name of the type of objects. Defaults to the CPP object name |
| print_header | whether to print a header about the timing of execution and the type of objects |
Definition at line 83 of file ThreadedElementLoop.h.
|
overrideprotectedvirtual |
Print general information about the loop, like the ordering of class of objects.
Reimplemented from ThreadedElementLoopBase< RangeType >.
Definition at line 363 of file ComputeUserObjectsThread.C.
|
protected |
Format output of vector of UOs.
|
inlineprivate |
Definition at line 77 of file ComputeUserObjectsThread.h.
Referenced by getBoundaryMaterialReinitCache(), onBoundary(), onInterface(), and printBlockExecutionInformation().
|
inlineprivate |
Definition at line 72 of file ComputeUserObjectsThread.h.
Referenced by subdomainChanged().
|
protectedinherited |
Resets the set of blocks and boundaries visited.
Definition at line 454 of file ThreadedElementLoopBase.h.
|
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 FlagElementsThread, ProjectMaterialProperties, CacheChangedListsThread, and NonlinearThread.
Definition at line 424 of file ThreadedElementLoopBase.h.
Referenced by NonlinearThread::shouldComputeInternalSide().
|
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< RangeType >.
Definition at line 52 of file ComputeUserObjectsThread.C.
|
private |
Definition at line 100 of file ComputeUserObjectsThread.h.
Referenced by onInterface(), and subdomainChanged().
|
private |
Definition at line 102 of file ComputeUserObjectsThread.h.
Referenced by onElement().
|
mutableprotectedinherited |
Keep track of which blocks were visited.
Definition at line 190 of file ThreadedElementLoopBase.h.
Referenced by ComputeDiracThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), ComputeMarkerThread::printBlockExecutionInformation(), printBlockExecutionInformation(), and NonlinearThread::printBlockExecutionInformation().
|
mutableprotectedinherited |
Keep track of which boundaries were visited.
Definition at line 193 of file ThreadedElementLoopBase.h.
Referenced by NonlinearThread::printBoundaryExecutionInformation().
|
private |
Definition at line 108 of file ComputeUserObjectsThread.h.
Referenced by getBoundaryMaterialReinitCache().
|
private |
Definition at line 99 of file ComputeUserObjectsThread.h.
Referenced by getBoundaryMaterialReinitCache(), onBoundary(), onElement(), onExternalSide(), onInternalSide(), printBlockExecutionInformation(), and subdomainChanged().
|
private |
Definition at line 97 of file ComputeUserObjectsThread.h.
Referenced by onElement(), printBlockExecutionInformation(), and subdomainChanged().
|
protectedinherited |
Definition at line 69 of file ThreadedElementLoop.h.
|
private |
Definition at line 96 of file ComputeUserObjectsThread.h.
|
private |
Definition at line 95 of file ComputeUserObjectsThread.h.
Referenced by onInternalSide(), printBlockExecutionInformation(), and subdomainChanged().
|
protectedinherited |
Definition at line 165 of file ThreadedElementLoopBase.h.
Referenced by ProjectMaterialProperties::onBoundary(), ProjectMaterialProperties::onElement(), NonlinearThread::onExternalSide(), ProjectMaterialProperties::onInternalSide(), NonlinearThread::printBlockExecutionInformation(), and NonlinearThread::printBoundaryExecutionInformation().
|
protectedinherited |
The subdomain for the current neighbor.
Definition at line 175 of file ThreadedElementLoopBase.h.
Referenced by ComputeFullJacobianThread::computeOnInternalFace(), ComputeResidualThread::computeOnInternalFace(), and ComputeJacobianForScalingThread::operator()().
|
protectedinherited |
The subdomain for the last neighbor.
Definition at line 178 of file ThreadedElementLoopBase.h.
|
protectedinherited |
The subdomain for the last element.
Definition at line 172 of file ThreadedElementLoopBase.h.
Referenced by ComputeJacobianForScalingThread::operator()().
|
private |
Definition at line 92 of file ComputeUserObjectsThread.h.
Referenced by subdomainChanged().
|
private |
Definition at line 94 of file ComputeUserObjectsThread.h.
Referenced by queryBoundary().
|
private |
Definition at line 93 of file ComputeUserObjectsThread.h.
Referenced by querySubdomain().
|
private |
Definition at line 98 of file ComputeUserObjectsThread.h.
Referenced by onElement(), printBlockExecutionInformation(), and subdomainChanged().
|
protectedinherited |
The subdomain for the current element.
Definition at line 169 of file ThreadedElementLoopBase.h.
Referenced by ComputeResidualAndJacobianThread::compute(), ComputeFullJacobianThread::computeOnBoundary(), NonlinearThread::computeOnElement(), ComputeFullJacobianThread::computeOnElement(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeJacobianThread::computeOnInternalFace(), ComputeResidualAndJacobianThread::computeOnInternalFace(), ComputeResidualThread::computeOnInternalFace(), NonlinearThread::computeOnInternalFace(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), ComputeResidualThread::determineObjectWarehouses(), ComputeMaterialsObjectThread::onBoundary(), ComputeDiracThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMarkerThread::onElement(), ComputeMaterialsObjectThread::onElement(), onElement(), ComputeMaterialsObjectThread::onInterface(), ComputeMaterialsObjectThread::onInternalSide(), ComputeJacobianForScalingThread::operator()(), ComputeJacobianBlocksThread::postInternalSide(), ComputeDiracThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), ComputeMarkerThread::printBlockExecutionInformation(), printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), querySubdomain(), ComputeDiracThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), subdomainChanged(), NonlinearThread::subdomainChanged(), and ProjectMaterialProperties::subdomainChanged().
|
protectedinherited |
Definition at line 166 of file ThreadedElementLoopBase.h.
Referenced by ComputeResidualAndJacobianThread::accumulate(), ComputeResidualThread::accumulate(), ComputeJacobianThread::accumulateLower(), ComputeResidualAndJacobianThread::accumulateLower(), ComputeResidualThread::accumulateLower(), ComputeJacobianThread::accumulateNeighbor(), ComputeResidualAndJacobianThread::accumulateNeighbor(), ComputeResidualThread::accumulateNeighbor(), ComputeJacobianThread::accumulateNeighborLower(), ComputeResidualAndJacobianThread::accumulateNeighborLower(), ComputeResidualThread::accumulateNeighborLower(), ComputeResidualAndJacobianThread::compute(), NonlinearThread::computeOnBoundary(), ComputeFullJacobianThread::computeOnBoundary(), NonlinearThread::computeOnElement(), ComputeFullJacobianThread::computeOnElement(), NonlinearThread::computeOnInterface(), ComputeFullJacobianThread::computeOnInterface(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeJacobianThread::computeOnInternalFace(), ComputeResidualAndJacobianThread::computeOnInternalFace(), ComputeResidualThread::computeOnInternalFace(), NonlinearThread::computeOnInternalFace(), ComputeFullJacobianThread::computeOnInternalFace(), ComputeJacobianThread::determineObjectWarehouses(), ComputeResidualAndJacobianThread::determineObjectWarehouses(), ComputeResidualThread::determineObjectWarehouses(), ComputeMaterialsObjectThread::onBoundary(), onBoundary(), NonlinearThread::onBoundary(), ProjectMaterialProperties::onBoundary(), ComputeDiracThread::onElement(), ComputeElemDampingThread::onElement(), ComputeIndicatorThread::onElement(), ComputeMarkerThread::onElement(), ComputeMaterialsObjectThread::onElement(), onElement(), NonlinearThread::onElement(), ProjectMaterialProperties::onElement(), UpdateErrorVectorsThread::onElement(), NonlinearThread::onExternalSide(), ComputeMaterialsObjectThread::onInterface(), onInterface(), NonlinearThread::onInterface(), ComputeIndicatorThread::onInternalSide(), ComputeMaterialsObjectThread::onInternalSide(), onInternalSide(), NonlinearThread::onInternalSide(), ProjectMaterialProperties::onInternalSide(), ComputeJacobianForScalingThread::operator()(), ComputeDiracThread::post(), ComputeIndicatorThread::post(), ComputeMarkerThread::post(), ComputeMaterialsObjectThread::post(), post(), ComputeDiracThread::postElement(), ComputeJacobianThread::postElement(), ComputeJacobianBlocksThread::postElement(), ComputeJacobianBlocksThread::postInternalSide(), ComputeDiracThread::pre(), NonlinearThread::prepareFace(), ComputeDiracThread::printBlockExecutionInformation(), ComputeIndicatorThread::printBlockExecutionInformation(), ComputeMarkerThread::printBlockExecutionInformation(), printBlockExecutionInformation(), NonlinearThread::printBlockExecutionInformation(), NonlinearThread::printBoundaryExecutionInformation(), ComputeDiracThread::printGeneralExecutionInformation(), ComputeElemDampingThread::printGeneralExecutionInformation(), ComputeIndicatorThread::printGeneralExecutionInformation(), ComputeMarkerThread::printGeneralExecutionInformation(), printGeneralExecutionInformation(), NonlinearThread::printGeneralExecutionInformation(), queryBoundary(), querySubdomain(), ComputeDiracThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeMarkerThread::subdomainChanged(), ComputeMaterialsObjectThread::subdomainChanged(), subdomainChanged(), NonlinearThread::subdomainChanged(), and ProjectMaterialProperties::subdomainChanged().