https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeFVInitialConditionThread Class Reference

#include <ComputeFVInitialConditionThread.h>

Public Types

using ElemInfoRange = StoredRange< MooseMesh::const_elem_info_iterator, const ElemInfo * >
 

Public Member Functions

 ComputeFVInitialConditionThread (FEProblemBase &fe_problem)
 
 ComputeFVInitialConditionThread (ComputeFVInitialConditionThread &x, Threads::split split)
 
void operator() (const ElemInfoRange &range)
 
void join (const ComputeFVInitialConditionThread &)
 

Protected Member Functions

void printGeneralExecutionInformation () const
 Print information about the loop, mostly order of execution of objects.
 

Protected Attributes

FEProblemBase_fe_problem
 
THREAD_ID _tid
 

Detailed Description

Definition at line 21 of file ComputeFVInitialConditionThread.h.

Member Typedef Documentation

◆ ElemInfoRange

Definition at line 27 of file ComputeFVInitialConditionThread.h.

Constructor & Destructor Documentation

◆ ComputeFVInitialConditionThread() [1/2]

ComputeFVInitialConditionThread::ComputeFVInitialConditionThread ( FEProblemBase fe_problem)

Definition at line 14 of file ComputeFVInitialConditionThread.C.

15 : _fe_problem(fe_problem)
16{
17}

◆ ComputeFVInitialConditionThread() [2/2]

ComputeFVInitialConditionThread::ComputeFVInitialConditionThread ( ComputeFVInitialConditionThread x,
Threads::split  split 
)

Definition at line 19 of file ComputeFVInitialConditionThread.C.

22{
23}

Member Function Documentation

◆ join()

void ComputeFVInitialConditionThread::join ( const ComputeFVInitialConditionThread )

Definition at line 42 of file ComputeFVInitialConditionThread.C.

43{
44}

◆ operator()()

void ComputeFVInitialConditionThread::operator() ( const ElemInfoRange range)

Definition at line 26 of file ComputeFVInitialConditionThread.C.

27{
29 _tid = puid.id;
30
33
34 // Iterate over all the elements in the range
35 for (const auto & elem_info : range)
36 if (warehouse.hasActiveBlockObjects(elem_info->subdomain_id(), _tid))
37 for (auto ic : warehouse.getActiveBlockObjects(elem_info->subdomain_id(), _tid))
38 ic->computeElement(*elem_info);
39}
for(PetscInt i=0;i< nvars;++i)
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
void printGeneralExecutionInformation() const
Print information about the loop, mostly order of execution of objects.
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse() const
Return FVInitialCondition storage.
Warehouse for storing finite volume initial conditions.

◆ printGeneralExecutionInformation()

void ComputeFVInitialConditionThread::printGeneralExecutionInformation ( ) const
protected

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

Definition at line 47 of file ComputeFVInitialConditionThread.C.

48{
49 const auto & ic_wh = _fe_problem.getFVInitialConditionWarehouse();
50 if (_fe_problem.shouldPrintExecution(_tid) && ic_wh.hasActiveObjects())
51 {
52 const auto & console = _fe_problem.console();
53 const auto & execute_on = _fe_problem.getCurrentExecuteOnFlag();
54 console << "[DBG] Executing initial conditions on elements on " << execute_on << std::endl;
55 console << "[DBG] Unordered list:" << std::endl;
56 console << ic_wh.activeObjectsToFormattedString() << std::endl;
57 console << "[DBG] The order of execution is defined by dependency resolution on every element"
58 << std::endl;
59 }
60}
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

Referenced by operator()().

Member Data Documentation

◆ _fe_problem

FEProblemBase& ComputeFVInitialConditionThread::_fe_problem
protected

◆ _tid

THREAD_ID ComputeFVInitialConditionThread::_tid
protected

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