https://mooseframework.inl.gov
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. More...
 

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.

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 {
28  ParallelUniqueId puid;
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 }
bool hasActiveBlockObjects(THREAD_ID tid=0) const
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
Warehouse for storing finite volume initial conditions.
void printGeneralExecutionInformation() const
Print information about the loop, mostly order of execution of objects.
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse() const
Return FVInitialCondition storage.

◆ 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.

Referenced by operator()().

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 FVInitialConditionWarehouse & getFVInitialConditionWarehouse() const
Return FVInitialCondition storage.
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48

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: