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 21 of file ComputeInitialConditionThread.h.

Constructor & Destructor Documentation

◆ ComputeInitialConditionThread() [1/2]

ComputeInitialConditionThread::ComputeInitialConditionThread ( FEProblemBase fe_problem)

Definition at line 16 of file ComputeInitialConditionThread.C.

17  : _fe_problem(fe_problem)
18 {
19 }

◆ ComputeInitialConditionThread() [2/2]

ComputeInitialConditionThread::ComputeInitialConditionThread ( ComputeInitialConditionThread x,
Threads::split  split 
)

Definition at line 21 of file ComputeInitialConditionThread.C.

23  : _fe_problem(x._fe_problem)
24 {
25 }
static PetscErrorCode Vec x

Member Function Documentation

◆ join()

void ComputeInitialConditionThread::join ( const ComputeInitialConditionThread )

Definition at line 52 of file ComputeInitialConditionThread.C.

53 {
54 }

◆ operator()()

void ComputeInitialConditionThread::operator() ( const ConstElemRange &  range)

Definition at line 28 of file ComputeInitialConditionThread.C.

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

Member Data Documentation

◆ _fe_problem

FEProblemBase& ComputeInitialConditionThread::_fe_problem
protected

Definition at line 32 of file ComputeInitialConditionThread.h.

Referenced by operator()().

◆ _tid

THREAD_ID ComputeInitialConditionThread::_tid
protected

Definition at line 33 of file ComputeInitialConditionThread.h.

Referenced by operator()().


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