www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
ComputeInitialConditionThread Class Reference

#include <ComputeInitialConditionThread.h>

Public Member Functions

 ComputeInitialConditionThread (FEProblemBase &fe_problem)
 
 ComputeInitialConditionThread (ComputeInitialConditionThread &x, Threads::split split)
 
void operator() (const ConstElemRange &range)
 
void join (const ComputeInitialConditionThread &)
 

Protected Attributes

FEProblemBase_fe_problem
 
THREAD_ID _tid
 

Detailed Description

Definition at line 26 of file ComputeInitialConditionThread.h.

Constructor & Destructor Documentation

ComputeInitialConditionThread::ComputeInitialConditionThread ( FEProblemBase fe_problem)

Definition at line 21 of file ComputeInitialConditionThread.C.

22  : _fe_problem(fe_problem)
23 {
24 }
ComputeInitialConditionThread::ComputeInitialConditionThread ( ComputeInitialConditionThread x,
Threads::split  split 
)

Definition at line 26 of file ComputeInitialConditionThread.C.

Member Function Documentation

void ComputeInitialConditionThread::join ( const ComputeInitialConditionThread )

Definition at line 57 of file ComputeInitialConditionThread.C.

58 {
59 }
void ComputeInitialConditionThread::operator() ( const ConstElemRange &  range)

Definition at line 33 of file ComputeInitialConditionThread.C.

34 {
35  ParallelUniqueId puid;
36  _tid = puid.id;
37 
39 
40  // Iterate over all the elements in the range
41  for (const auto & elem : range)
42  {
43  SubdomainID subdomain = elem->subdomain_id();
45  _fe_problem.prepare(elem, _tid);
46 
47  if (warehouse.hasActiveBlockObjects(subdomain, _tid))
48  {
49  const auto & ics = warehouse.getActiveBlockObjects(subdomain, _tid);
50  for (const auto & ic : ics)
51  ic->compute();
52  }
53  }
54 }
virtual void prepare(const Elem *elem, THREAD_ID tid) override
subdomain_id_type SubdomainID
Definition: MooseTypes.h:77
Warehouse for storing initial conditions.
const InitialConditionWarehouse & getInitialConditionWarehouse() const
Return InitialCondition storage.
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
virtual void setCurrentSubdomainID(const Elem *elem, THREAD_ID tid) override
bool hasActiveBlockObjects(THREAD_ID tid=0) const

Member Data Documentation

FEProblemBase& ComputeInitialConditionThread::_fe_problem
protected

Definition at line 37 of file ComputeInitialConditionThread.h.

Referenced by operator()().

THREAD_ID ComputeInitialConditionThread::_tid
protected

Definition at line 38 of file ComputeInitialConditionThread.h.

Referenced by operator()().


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