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

Warehouse for storing initial conditions. More...

#include <InitialConditionWarehouse.h>

Inheritance diagram for InitialConditionWarehouse:
[legend]

Public Member Functions

 InitialConditionWarehouse (THREAD_ID num_threads=libMesh::n_threads())
 
void initialSetup (THREAD_ID tid)
 Initial setup.
 
void addObject (std::shared_ptr< InitialConditionBase > object, THREAD_ID tid, bool recurse=true)
 Add object to the warehouse.
 
std::set< std::string > getDependObjects () const
 Get a list of dependent UserObjects for this exec type.
 
virtual void addObject (std::shared_ptr< InitialConditionBase > object, THREAD_ID tid=0, bool recurse=true)
 Adds an object to the storage structure.
 
unsigned int size (THREAD_ID tid=0) const
 Return how many kernels we store in the current warehouse.
 
bool hasObjectsForVariableAndBlocks (const VariableName &var_name, const std::set< SubdomainID > &blocks, std::set< SubdomainID > &blocks_covered, THREAD_ID tid) const
 Whether there are objects for this variable and the set of blocks passed.
 
std::set< SubdomainID > getActiveBlocks (THREAD_ID tid=0) const
 Return a set of active SubdomainsIDs.
 
const std::vector< std::shared_ptr< InitialConditionBase > > & getObjectsForVariable (const VariableName &var_name, THREAD_ID tid) const
 Getter for objects that have the 'variable' set to a particular variable Note that users should check whether there are objects using 'hasObjectsForVariable' before calling this routine, because it will throw if there are no objects for this variable.
 
virtual void updateActive (THREAD_ID tid=0)
 Updates the active objects storage.
 
void sort (THREAD_ID tid=0)
 Sort the objects using the DependencyResolver.
 
void subdomainsCovered (std::set< SubdomainID > &subdomains_covered, std::set< std::string > &unique_variables, THREAD_ID tid=0) const
 Populates a set of covered subdomains and the associated variable names.
 
THREAD_ID numThreads () const
 Return the number of threads.
 
std::string activeObjectsToFormattedString (THREAD_ID tid=0, const std::string &prefix="[DBG]") const
 Output the active content of the warehouse to a string, meant to be output to the console.
 
const std::vector< std::shared_ptr< InitialConditionBase > > & getObjects (THREAD_ID tid=0) const
 Retrieve complete vector to the all/block/boundary restricted objects for a given thread.
 
const std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > & getBlockObjects (THREAD_ID tid=0) const
 
const std::vector< std::shared_ptr< InitialConditionBase > > & getBlockObjects (SubdomainID id, THREAD_ID tid=0) const
 
const std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > & getBoundaryObjects (THREAD_ID tid=0) const
 
const std::vector< std::shared_ptr< InitialConditionBase > > & getBoundaryObjects (BoundaryID id, THREAD_ID tid=0) const
 
const std::vector< std::shared_ptr< InitialConditionBase > > & getActiveObjects (THREAD_ID tid=0) const
 Retrieve complete vector to the active all/block/boundary restricted objects for a given thread.
 
const std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > & getActiveBlockObjects (THREAD_ID tid=0) const
 
const std::vector< std::shared_ptr< InitialConditionBase > > & getActiveBlockObjects (SubdomainID id, THREAD_ID tid=0) const
 
const std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > & getActiveBoundaryObjects (THREAD_ID tid=0) const
 
const std::vector< std::shared_ptr< InitialConditionBase > > & getActiveBoundaryObjects (BoundaryID id, THREAD_ID tid=0) const
 
bool hasObjects (THREAD_ID tid=0) const
 Convenience functions for determining if objects exist.
 
bool hasActiveObjects (THREAD_ID tid=0) const
 
bool hasObjectsForVariable (const VariableName &var_name, THREAD_ID tid) const
 
bool hasActiveBlockObjects (THREAD_ID tid=0) const
 
bool hasActiveBlockObjects (SubdomainID id, THREAD_ID tid=0) const
 
bool hasActiveBoundaryObjects (THREAD_ID tid=0) const
 
bool hasActiveBoundaryObjects (BoundaryID id, THREAD_ID tid=0) const
 
bool hasBoundaryObjects (THREAD_ID tid=0) const
 
bool hasBoundaryObjects (BoundaryID id, THREAD_ID tid=0) const
 
bool hasActiveObject (const std::string &name, THREAD_ID tid=0) const
 Convenience functions for checking/getting specific objects.
 
std::shared_ptr< InitialConditionBase > getObject (const std::string &name, THREAD_ID tid=0) const
 
std::shared_ptr< InitialConditionBase > getActiveObject (const std::string &name, THREAD_ID tid=0) const
 
void updateVariableDependency (std::set< MooseVariableFieldBase * > &needed_moose_vars, THREAD_ID tid=0) const
 Update variable dependency vector.
 
void updateBlockVariableDependency (SubdomainID id, std::set< MooseVariableFieldBase * > &needed_moose_vars, THREAD_ID tid=0) const
 
void updateBoundaryVariableDependency (std::set< MooseVariableFieldBase * > &needed_moose_vars, THREAD_ID tid=0) const
 
void updateBoundaryVariableDependency (BoundaryID id, std::set< MooseVariableFieldBase * > &needed_moose_vars, THREAD_ID tid=0) const
 
void updateFEVariableCoupledVectorTagDependency (std::set< TagID > &needed_fe_var_vector_tags, THREAD_ID tid=0) const
 Update FE variable coupleable vector tag vector for all objects, block-restricted objects, and boundary-restricted objects.
 
void updateBlockFEVariableCoupledVectorTagDependency (SubdomainID id, std::set< TagID > &needed_fe_var_vector_tags, THREAD_ID tid=0) const
 
void updateBoundaryFEVariableCoupledVectorTagDependency (BoundaryID id, std::set< TagID > &needed_fe_var_vector_tags, THREAD_ID tid=0) const
 
void updateMatPropDependency (std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0, const bool producer_only=false) const
 Update material property dependency vector.
 
void updateBlockMatPropDependency (SubdomainID id, std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0, const bool producer_only=false) const
 
void updateBoundaryMatPropDependency (std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0, const bool producer_only=false) const
 
void updateBoundaryMatPropDependency (BoundaryID id, std::unordered_set< unsigned int > &needed_mat_props, THREAD_ID tid=0, const bool producer_only=false) const
 

Protected Member Functions

virtual void updateMatPropDependencyHelper (std::unordered_set< unsigned int > &needed_mat_props, const std::vector< std::shared_ptr< InitialConditionBase > > &objects, const bool producer_only) const
 Helper method for updating material property dependency vector.
 
void checkThreadID (THREAD_ID tid) const
 Calls assert on thread id.
 
bool hasBoundaryObjectsHelper (const std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > > &boundary_objects, const THREAD_ID tid=0) const
 Helper for determining whether we have boundary objects.
 

Static Protected Member Functions

static void updateActiveHelper (std::vector< std::shared_ptr< InitialConditionBase > > &active, const std::vector< std::shared_ptr< InitialConditionBase > > &all)
 Helper method for updating active vectors.
 
static void sortHelper (std::vector< std::shared_ptr< InitialConditionBase > > &objects)
 Helper method for sorting vectors of objects.
 
static void updateVariableDependencyHelper (std::set< MooseVariableFieldBase * > &needed_moose_vars, const std::vector< std::shared_ptr< InitialConditionBase > > &objects)
 Helper method for updating variable dependency vector.
 
static void updateFEVariableCoupledVectorTagDependencyHelper (std::set< TagID > &needed_fe_var_vector_tags, const std::vector< std::shared_ptr< InitialConditionBase > > &objects)
 Helper method for updating FE variable coupleable vector tag vector.
 

Protected Attributes

const THREAD_ID _num_threads
 Convenience member storing the number of threads used for storage (1 or libMesh::n_threads)
 
std::vector< std::vector< std::shared_ptr< InitialConditionBase > > > _all_objects
 Storage container for the ALL pointers (THREAD_ID on outer vector)
 
std::vector< std::vector< std::shared_ptr< InitialConditionBase > > > _active_objects
 All active objects (THREAD_ID on outer vector)
 
std::vector< std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > > _all_block_objects
 
std::vector< std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > > _active_block_objects
 Active block restricted objects (THREAD_ID on outer vector)
 
std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > > _all_boundary_objects
 
std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > > _active_boundary_objects
 Active boundary restricted objects (THREAD_ID on outer vector)
 
std::vector< std::map< VariableName, std::vector< std::shared_ptr< InitialConditionBase > > > > _all_variable_objects
 All objects with a certain variable selected, as the 'variable' parameter.
 
using ic_key_type = std::tuple< VariableName, unsigned short >
 
std::vector< std::map< ic_key_type, std::set< BoundaryID > > > _boundary_ics
 
std::vector< std::map< ic_key_type, std::set< SubdomainID > > > _block_ics
 

Detailed Description

Warehouse for storing initial conditions.

Definition at line 20 of file InitialConditionWarehouse.h.

Member Typedef Documentation

◆ ic_key_type

using InitialConditionWarehouse::ic_key_type = std::tuple<VariableName, unsigned short>
protected

Maps used to check if multiple ICs define the same variable on the same block/boundary for the same state (e.g CURRENT, OLD, OLDER). They are vectors of maps because each map is repeated for each thread. Each map relates string-int tuples to a set of block/boundary IDs. The string-int tuple is a unique identifier for a specific variable and state. The string-int tuple is renamed to ic_key_type for clarity. The algorithm then makes sure that a new IC object does not overlap with a previous IC object (i.e. same block/boundary).

Definition at line 48 of file InitialConditionWarehouse.h.

Constructor & Destructor Documentation

◆ InitialConditionWarehouse()

InitialConditionWarehouse::InitialConditionWarehouse ( THREAD_ID  num_threads = libMesh::n_threads())

Definition at line 16 of file InitialConditionWarehouse.C.

18 _boundary_ics(num_threads),
19 _block_ics(num_threads)
20{
21}
std::vector< std::map< ic_key_type, std::set< SubdomainID > > > _block_ics
std::vector< std::map< ic_key_type, std::set< BoundaryID > > > _boundary_ics
A base storage container for MooseObjects.

Member Function Documentation

◆ activeObjectsToFormattedString()

std::string MooseObjectWarehouseBase< InitialConditionBase >::activeObjectsToFormattedString ( THREAD_ID  tid = 0,
const std::string &  prefix = "[DBG]" 
) const
inherited

Output the active content of the warehouse to a string, meant to be output to the console.

Parameters
tidthe thread id
prefixa string to prepend to the string

Definition at line 211 of file MooseObjectWarehouseBase.h.

899{
900 std::vector<std::string> output;
901 for (const auto & object : _active_objects[tid])
902 output.push_back(object->name());
903 return ConsoleUtils::formatString(MooseUtils::join(output, " "), prefix);
904}
std::vector< std::vector< std::shared_ptr< InitialConditionBase > > > _active_objects
All active objects (THREAD_ID on outer vector)
std::string formatString(std::string message, const std::string &prefix)
Add new lines and prefixes to a string for pretty display in output NOTE: This makes a copy of the st...
std::string name(const ElemQuality q)

◆ addObject() [1/2]

void InitialConditionWarehouse::addObject ( std::shared_ptr< InitialConditionBase >  object,
THREAD_ID  tid,
bool  recurse = true 
)

Add object to the warehouse.

Definition at line 32 of file InitialConditionWarehouse.C.

35{
36 // Check that when object is boundary restricted that the variable is nodal
37 const MooseVariableFEBase & var = object->variable();
38 const auto ic_key = std::tuple(var.name(), object->getState());
39
40 // Boundary Restricted
41 if (object->boundaryRestricted())
42 {
43 if (!var.isNodal())
44 mooseError("You are trying to set a boundary restricted variable on non-nodal variable. That "
45 "is not allowed.");
46
47 const auto iter = _boundary_ics[tid].find(ic_key);
48 if (iter != _boundary_ics[tid].end() && object->hasBoundary(iter->second))
49 mooseError("The initial condition '",
50 object->name(),
51 "' is being defined on a boundary that already has an initial condition defined "
52 "with the same variable and state.");
53 else
54 _boundary_ics[tid][ic_key].insert(object->boundaryIDs().begin(), object->boundaryIDs().end());
55 }
56
57 // Block Restricted
58 else if (object->blockRestricted())
59 {
60 auto iter = _block_ics[tid].find(ic_key);
61 if (iter != _block_ics[tid].end() &&
62 (object->hasBlocks(iter->second) ||
63 (iter->second.find(Moose::ANY_BLOCK_ID) != iter->second.end())))
64 mooseError("The initial condition '",
65 object->name(),
66 "' is being defined on a block that already has an initial condition defined "
67 "with the same variable and state.");
68 else
69 _block_ics[tid][ic_key].insert(object->blockIDs().begin(), object->blockIDs().end());
70 }
71
72 // Non-restricted
73 else
74 {
75 auto iter = _block_ics[tid].find(ic_key);
76 if (iter != _block_ics[tid].end())
77 mooseError("The initial condition '",
78 object->name(),
79 "' is being defined on a block that already has an initial condition defined "
80 "with the same variable and state.");
81 else
82 _block_ics[tid][ic_key].insert(Moose::ANY_BLOCK_ID);
83 }
84
85 // Add the IC to the storage
87}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true)
Adds an object to the storage structure.
virtual bool isNodal() const
Is this variable nodal.
This class provides an interface for common operations on field variables of both FE and FV types wit...
const SubdomainID ANY_BLOCK_ID
Definition MooseTypes.C:19

Referenced by FEProblemBase::addInitialCondition().

◆ addObject() [2/2]

void MooseObjectWarehouseBase< InitialConditionBase >::addObject ( std::shared_ptr< InitialConditionBase >  object,
THREAD_ID  tid = 0,
bool  recurse = true 
)
virtualinherited

Adds an object to the storage structure.

Parameters
tidThe thread ID (default is 0)
recurseWhether or not to build recusive warehouses (typically for Kernels)

Definition at line 48 of file MooseObjectWarehouseBase.h.

316{
317 checkThreadID(tid);
318
319 // Stores object in list of all objects
320 _all_objects[tid].push_back(object);
321
322 // If enabled, store object in a list of all active
323 bool enabled = object->enabled();
324 if (enabled)
325 _active_objects[tid].push_back(object);
326
327 // Perform casts to the Block/BoundaryRestrictable
328 std::shared_ptr<BoundaryRestrictable> bnd =
329 std::dynamic_pointer_cast<BoundaryRestrictable>(object);
330 std::shared_ptr<BlockRestrictable> blk = std::dynamic_pointer_cast<BlockRestrictable>(object);
331
332 // Boundary Restricted
333 if (bnd && bnd->boundaryRestricted())
334 {
335 const std::set<BoundaryID> & ids = bnd->boundaryIDs();
336 for (std::set<BoundaryID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
337 {
338 _all_boundary_objects[tid][*it].push_back(object);
339 if (enabled)
340 _active_boundary_objects[tid][*it].push_back(object);
341 }
342 }
343
344 // Block Restricted
345 else if (blk)
346 {
347 const std::set<SubdomainID> & ids =
348 blk->blockRestricted() ? blk->blockIDs() : blk->meshBlockIDs();
349 for (std::set<SubdomainID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
350 {
351 _all_block_objects[tid][*it].push_back(object);
352 if (enabled)
353 _active_block_objects[tid][*it].push_back(object);
354 }
355
356 // Check variables
357 std::shared_ptr<Coupleable> c_ptr = std::dynamic_pointer_cast<Coupleable>(object);
358 if (c_ptr)
359 for (MooseVariableFieldBase * var : c_ptr->getCoupledMooseVars())
360 blk->checkVariable(*var);
361
362 const InputParameters & parameters = object->parameters();
363
364 SubProblem & problem = *parameters.get<SubProblem *>("_subproblem");
365
366 THREAD_ID tid = parameters.get<THREAD_ID>("_tid");
367
368 if (parameters.isParamValid("variable"))
369 {
370 // Try the scalar version first
371 std::string variable_name = parameters.getMooseType("variable");
372 if (variable_name == "")
373 // When using vector variables, we are only going to use the first one in the list at the
374 // interface level...
375 variable_name = parameters.getVecMooseType("variable")[0];
376
377 blk->checkVariable(problem.getVariable(
379
380 _all_variable_objects[tid][variable_name].push_back(object);
381 }
382 }
383}
unsigned int THREAD_ID
Definition MooseTypes.h:237
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
std::string getMooseType(const std::string &name) const
Utility functions for retrieving one of the MooseTypes variables into the common "string" base class.
std::vector< std::string > getVecMooseType(const std::string &name) const
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...
std::vector< std::vector< std::shared_ptr< InitialConditionBase > > > _all_objects
Storage container for the ALL pointers (THREAD_ID on outer vector)
std::vector< std::map< VariableName, std::vector< std::shared_ptr< InitialConditionBase > > > > _all_variable_objects
All objects with a certain variable selected, as the 'variable' parameter.
std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > > _all_boundary_objects
std::vector< std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > > _active_block_objects
Active block restricted objects (THREAD_ID on outer vector)
std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > > _active_boundary_objects
Active boundary restricted objects (THREAD_ID on outer vector)
std::vector< std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > > _all_block_objects
void checkThreadID(THREAD_ID tid) const
Calls assert on thread id.
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const =0
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
void checkVariable(const Variable &var, bool expect_vector, const std::string &wrapper_name)
@ VAR_FIELD_ANY
Definition MooseTypes.h:781
@ VAR_ANY
Definition MooseTypes.h:772

◆ checkThreadID()

void MooseObjectWarehouseBase< InitialConditionBase >::checkThreadID ( THREAD_ID  tid) const
inlineprotectedinherited

Calls assert on thread id.

Definition at line 273 of file MooseObjectWarehouseBase.h.

929{
930 mooseAssert(tid < _num_threads,
931 "Attempting to access a thread id ("
932 << tid << ") greater than the number allowed by the storage item ("
933 << _num_threads << ")");
934}
const THREAD_ID _num_threads
Convenience member storing the number of threads used for storage (1 or libMesh::n_threads)

◆ getActiveBlockObjects() [1/2]

const std::vector< std::shared_ptr< InitialConditionBase > > & MooseObjectWarehouseBase< InitialConditionBase >::getActiveBlockObjects ( SubdomainID  id,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 79 of file MooseObjectWarehouseBase.h.

477{
478 checkThreadID(tid);
479 const auto iter = _active_block_objects[tid].find(id);
480 mooseAssert(iter != _active_block_objects[tid].end(),
481 "Unable to located active block objects for the given id: " << id << ".");
482 return iter->second;
483}

◆ getActiveBlockObjects() [2/2]

const std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > & MooseObjectWarehouseBase< InitialConditionBase >::getActiveBlockObjects ( THREAD_ID  tid = 0) const
inlineinherited

Definition at line 78 of file MooseObjectWarehouseBase.h.

469{
470 checkThreadID(tid);
471 return _active_block_objects[tid];
472}

◆ getActiveBlocks()

std::set< SubdomainID > MooseObjectWarehouseBase< InitialConditionBase >::getActiveBlocks ( THREAD_ID  tid = 0) const
inherited

Return a set of active SubdomainsIDs.

Definition at line 116 of file MooseObjectWarehouseBase.h.

649{
650 checkThreadID(tid);
651 std::set<SubdomainID> ids;
652 for (const auto & object_pair : _active_block_objects[tid])
653 ids.insert(object_pair.first);
654 return ids;
655}

◆ getActiveBoundaryObjects() [1/2]

const std::vector< std::shared_ptr< InitialConditionBase > > & MooseObjectWarehouseBase< InitialConditionBase >::getActiveBoundaryObjects ( BoundaryID  id,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 83 of file MooseObjectWarehouseBase.h.

458{
459 checkThreadID(tid);
460 const auto iter = _active_boundary_objects[tid].find(id);
461 mooseAssert(iter != _active_boundary_objects[tid].end(),
462 "Unable to located active boundary objects for the given id: " << id << ".");
463 return iter->second;
464}

◆ getActiveBoundaryObjects() [2/2]

const std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > & MooseObjectWarehouseBase< InitialConditionBase >::getActiveBoundaryObjects ( THREAD_ID  tid = 0) const
inlineinherited

Definition at line 82 of file MooseObjectWarehouseBase.h.

450{
451 checkThreadID(tid);
452 return _active_boundary_objects[tid];
453}

◆ getActiveObject()

std::shared_ptr< InitialConditionBase > MooseObjectWarehouseBase< InitialConditionBase >::getActiveObject ( const std::string &  name,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 124 of file MooseObjectWarehouseBase.h.

630{
631 checkThreadID(tid);
632 for (const auto & object : _active_objects[tid])
633 if (object->name() == name)
634 return object;
635 mooseError("Unable to locate active object: ", name, ".");
636}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD

◆ getActiveObjects()

const std::vector< std::shared_ptr< InitialConditionBase > > & MooseObjectWarehouseBase< InitialConditionBase >::getActiveObjects ( THREAD_ID  tid = 0) const
inlineinherited

Retrieve complete vector to the active all/block/boundary restricted objects for a given thread.

Parameters
tidThe thread id to retrieve objects from

Definition at line 76 of file MooseObjectWarehouseBase.h.

442{
443 checkThreadID(tid);
444 return _active_objects[tid];
445}

◆ getBlockObjects() [1/2]

const std::vector< std::shared_ptr< InitialConditionBase > > & MooseObjectWarehouseBase< InitialConditionBase >::getBlockObjects ( SubdomainID  id,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 63 of file MooseObjectWarehouseBase.h.

431{
432 checkThreadID(tid);
433 const auto iter = _all_block_objects[tid].find(id);
434 mooseAssert(iter != _all_block_objects[tid].end(),
435 "Unable to located active block objects for the given id: " << id << ".");
436 return iter->second;
437}

◆ getBlockObjects() [2/2]

const std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > & MooseObjectWarehouseBase< InitialConditionBase >::getBlockObjects ( THREAD_ID  tid = 0) const
inlineinherited

Definition at line 62 of file MooseObjectWarehouseBase.h.

423{
424 checkThreadID(tid);
425 return _all_block_objects[tid];
426}

◆ getBoundaryObjects() [1/2]

const std::vector< std::shared_ptr< InitialConditionBase > > & MooseObjectWarehouseBase< InitialConditionBase >::getBoundaryObjects ( BoundaryID  id,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 66 of file MooseObjectWarehouseBase.h.

412{
413 checkThreadID(tid);
414 const auto iter = _all_boundary_objects[tid].find(id);
415 mooseAssert(iter != _all_boundary_objects[tid].end(),
416 "Unable to located active boundary objects for the given id: " << id << ".");
417 return iter->second;
418}

◆ getBoundaryObjects() [2/2]

const std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > & MooseObjectWarehouseBase< InitialConditionBase >::getBoundaryObjects ( THREAD_ID  tid = 0) const
inlineinherited

Definition at line 65 of file MooseObjectWarehouseBase.h.

396{
397 checkThreadID(tid);
398 return _all_boundary_objects[tid];
399}

◆ getDependObjects()

std::set< std::string > InitialConditionWarehouse::getDependObjects ( ) const

Get a list of dependent UserObjects for this exec type.

Returns
a set of dependent user objects

Definition at line 90 of file InitialConditionWarehouse.C.

91{
92 std::set<std::string> depend_objects;
93
94 const auto & ics = getActiveObjects();
95 for (const auto & ic : ics)
96 {
97 const auto & uo = ic->getDependObjects();
98 depend_objects.insert(uo.begin(), uo.end());
99 }
100
101 return depend_objects;
102}
const std::vector< std::shared_ptr< InitialConditionBase > > & getActiveObjects(THREAD_ID tid=0) const
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread.

◆ getObject()

std::shared_ptr< InitialConditionBase > MooseObjectWarehouseBase< InitialConditionBase >::getObject ( const std::string &  name,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 123 of file MooseObjectWarehouseBase.h.

619{
620 checkThreadID(tid);
621 for (const auto & object : _all_objects[tid])
622 if (object->name() == name)
623 return object;
624 mooseError("Unable to locate object: ", name, ".");
625}

◆ getObjects()

const std::vector< std::shared_ptr< InitialConditionBase > > & MooseObjectWarehouseBase< InitialConditionBase >::getObjects ( THREAD_ID  tid = 0) const
inlineinherited

Retrieve complete vector to the all/block/boundary restricted objects for a given thread.

Parameters
tidThe thread id to retrieve objects from

Definition at line 60 of file MooseObjectWarehouseBase.h.

388{
389 checkThreadID(tid);
390 return _all_objects[tid];
391}

◆ getObjectsForVariable()

const std::vector< std::shared_ptr< InitialConditionBase > > & MooseObjectWarehouseBase< InitialConditionBase >::getObjectsForVariable ( const VariableName &  var_name,
THREAD_ID  tid 
) const
inherited

Getter for objects that have the 'variable' set to a particular variable Note that users should check whether there are objects using 'hasObjectsForVariable' before calling this routine, because it will throw if there are no objects for this variable.

Definition at line 130 of file MooseObjectWarehouseBase.h.

642{
643 return libmesh_map_find(_all_variable_objects[tid], var_name);
644}

◆ hasActiveBlockObjects() [1/2]

bool MooseObjectWarehouseBase< InitialConditionBase >::hasActiveBlockObjects ( SubdomainID  id,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 95 of file MooseObjectWarehouseBase.h.

563{
564 checkThreadID(tid);
565 const auto iter = _active_block_objects[tid].find(id);
566 return iter != _active_block_objects[tid].end();
567}

◆ hasActiveBlockObjects() [2/2]

bool MooseObjectWarehouseBase< InitialConditionBase >::hasActiveBlockObjects ( THREAD_ID  tid = 0) const
inherited

Definition at line 94 of file MooseObjectWarehouseBase.h.

552{
553 checkThreadID(tid);
554 bool has_active_block_objects = false;
555 for (const auto & object_pair : _active_block_objects[tid])
556 has_active_block_objects |= !(object_pair.second.empty());
557 return has_active_block_objects;
558}

◆ hasActiveBoundaryObjects() [1/2]

bool MooseObjectWarehouseBase< InitialConditionBase >::hasActiveBoundaryObjects ( BoundaryID  id,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 97 of file MooseObjectWarehouseBase.h.

599{
600 checkThreadID(tid);
601 const auto iter = _active_boundary_objects[tid].find(id);
602 return iter != _active_boundary_objects[tid].end();
603}

◆ hasActiveBoundaryObjects() [2/2]

bool MooseObjectWarehouseBase< InitialConditionBase >::hasActiveBoundaryObjects ( THREAD_ID  tid = 0) const
inherited

Definition at line 96 of file MooseObjectWarehouseBase.h.

592{
594}
bool hasBoundaryObjectsHelper(const std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > > &boundary_objects, const THREAD_ID tid=0) const
Helper for determining whether we have boundary objects.

◆ hasActiveObject()

bool MooseObjectWarehouseBase< InitialConditionBase >::hasActiveObject ( const std::string &  name,
THREAD_ID  tid = 0 
) const
inherited

Convenience functions for checking/getting specific objects.

Definition at line 122 of file MooseObjectWarehouseBase.h.

608{
609 checkThreadID(tid);
610 for (const auto & object : _active_objects[tid])
611 if (object->name() == name)
612 return true;
613 return false;
614}

◆ hasActiveObjects()

bool MooseObjectWarehouseBase< InitialConditionBase >::hasActiveObjects ( THREAD_ID  tid = 0) const
inherited

Definition at line 92 of file MooseObjectWarehouseBase.h.

496{
497 checkThreadID(tid);
498 return !_active_objects[tid].empty();
499}

◆ hasBoundaryObjects() [1/2]

bool MooseObjectWarehouseBase< InitialConditionBase >::hasBoundaryObjects ( BoundaryID  id,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 99 of file MooseObjectWarehouseBase.h.

404{
405 checkThreadID(tid);
406 return _all_boundary_objects[tid].find(id) != _all_boundary_objects[tid].end();
407}

◆ hasBoundaryObjects() [2/2]

bool MooseObjectWarehouseBase< InitialConditionBase >::hasBoundaryObjects ( THREAD_ID  tid = 0) const
inherited

Definition at line 98 of file MooseObjectWarehouseBase.h.

585{
587}

◆ hasBoundaryObjectsHelper()

bool MooseObjectWarehouseBase< InitialConditionBase >::hasBoundaryObjectsHelper ( const std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > > &  boundary_objects,
const THREAD_ID  tid = 0 
) const
protectedinherited

Helper for determining whether we have boundary objects.

Definition at line 278 of file MooseObjectWarehouseBase.h.

574{
575 checkThreadID(tid);
576 bool has_boundary_objects = false;
577 for (const auto & object_pair : boundary_objects[tid])
578 has_boundary_objects |= !(object_pair.second.empty());
579 return has_boundary_objects;
580}

◆ hasObjects()

bool MooseObjectWarehouseBase< InitialConditionBase >::hasObjects ( THREAD_ID  tid = 0) const
inherited

Convenience functions for determining if objects exist.

Definition at line 91 of file MooseObjectWarehouseBase.h.

488{
489 checkThreadID(tid);
490 return !_all_objects[tid].empty();
491}

◆ hasObjectsForVariable()

bool MooseObjectWarehouseBase< InitialConditionBase >::hasObjectsForVariable ( const VariableName &  var_name,
THREAD_ID  tid 
) const
inherited

Definition at line 93 of file MooseObjectWarehouseBase.h.

505{
506 checkThreadID(tid);
507 return _all_variable_objects[tid].count(var_name);
508}

◆ hasObjectsForVariableAndBlocks()

bool MooseObjectWarehouseBase< InitialConditionBase >::hasObjectsForVariableAndBlocks ( const VariableName &  var_name,
const std::set< SubdomainID > &  blocks,
std::set< SubdomainID > &  blocks_covered,
THREAD_ID  tid 
) const
inherited

Whether there are objects for this variable and the set of blocks passed.

Parameters
var_namename of the variable
blocksblocks to consider
blocks_coveredsubset of blocks for which there is an object

Definition at line 108 of file MooseObjectWarehouseBase.h.

516{
517 checkThreadID(tid);
518 blocks_covered.clear();
519 if (!hasObjectsForVariable(var_name, tid))
520 return false;
521
522 // Check block restriction as a whole
523 for (const auto & object : libmesh_map_find(_all_variable_objects[tid], var_name))
524 {
525 std::shared_ptr<BlockRestrictable> blk = std::dynamic_pointer_cast<BlockRestrictable>(object);
526 if (blk && blk->hasBlocks(blocks))
527 {
528 blocks_covered = blocks;
529 return true;
530 }
531 }
532 // No object has all the blocks, but one might overlap, which could be troublesome.
533 // We'll keep track of which blocks are covered in case several overlap
534 for (const auto & object : libmesh_map_find(_all_variable_objects[tid], var_name))
535 {
536 std::shared_ptr<BlockRestrictable> blk = std::dynamic_pointer_cast<BlockRestrictable>(object);
537 if (blk)
538 for (const auto & block : blocks)
539 if (blk->hasBlocks(block))
540 blocks_covered.insert(block);
541 }
542 // No overlap at all
543 if (blocks_covered.empty())
544 return false;
545
546 return (blocks == blocks_covered);
547}
char ** blocks
bool hasObjectsForVariable(const VariableName &var_name, THREAD_ID tid) const

◆ initialSetup()

void InitialConditionWarehouse::initialSetup ( THREAD_ID  tid)

Initial setup.

Definition at line 24 of file InitialConditionWarehouse.C.

25{
27 for (const auto & ic : _active_objects[tid])
28 ic->initialSetup();
29}
void initialSetup(THREAD_ID tid)
Initial setup.
void sort(THREAD_ID tid=0)
Sort the objects using the DependencyResolver.

◆ numThreads()

THREAD_ID MooseObjectWarehouseBase< InitialConditionBase >::numThreads ( ) const
inlineinherited

Return the number of threads.

Definition at line 204 of file MooseObjectWarehouseBase.h.

204{ return _num_threads; }

◆ size()

unsigned int MooseObjectWarehouseBase< InitialConditionBase >::size ( THREAD_ID  tid = 0) const
inherited

Return how many kernels we store in the current warehouse.

Definition at line 53 of file MooseObjectWarehouseBase.h.

306{
307 checkThreadID(tid);
308 return _all_objects[tid].size();
309}

◆ sort()

void MooseObjectWarehouseBase< InitialConditionBase >::sort ( THREAD_ID  tid = 0)
inherited

Sort the objects using the DependencyResolver.

Definition at line 141 of file MooseObjectWarehouseBase.h.

689{
690 checkThreadID(tid);
691
692 for (auto & object_pair : _all_block_objects[tid])
693 sortHelper(object_pair.second);
694
695 for (auto & object_pair : _all_boundary_objects[tid])
696 sortHelper(object_pair.second);
697
699
700 // The active lists now must be update to reflect the order changes
701 updateActive(tid);
702}
static void sortHelper(std::vector< std::shared_ptr< InitialConditionBase > > &objects)
Helper method for sorting vectors of objects.
virtual void updateActive(THREAD_ID tid=0)
Updates the active objects storage.

◆ sortHelper()

void MooseObjectWarehouseBase< InitialConditionBase >::sortHelper ( std::vector< std::shared_ptr< InitialConditionBase > > &  objects)
staticprotectedinherited

Helper method for sorting vectors of objects.

Definition at line 248 of file MooseObjectWarehouseBase.h.

909{
910 // Do nothing if the vector is empty
911 if (objects.empty())
912 return;
913
914 try
915 {
916 // Sort based on dependencies
917 DependencyResolverInterface::sort<std::shared_ptr<T>>(objects);
918 }
919 catch (CyclicDependencyException<std::shared_ptr<T>> & e)
920 {
921 DependencyResolverInterface::cyclicDependencyError<std::shared_ptr<T>>(
922 e, "Cyclic dependency detected in object ordering");
923 }
924}

◆ subdomainsCovered()

void MooseObjectWarehouseBase< InitialConditionBase >::subdomainsCovered ( std::set< SubdomainID > &  subdomains_covered,
std::set< std::string > &  unique_variables,
THREAD_ID  tid = 0 
) const
inherited

Populates a set of covered subdomains and the associated variable names.

Definition at line 197 of file MooseObjectWarehouseBase.h.

882{
883 for (const auto & object : _active_objects[tid])
884 {
885 unique_variables.insert(object->variable().name());
886 const auto additional_variables_covered = object->additionalROVariables();
887 unique_variables.insert(additional_variables_covered.begin(),
888 additional_variables_covered.end());
889 }
890
891 for (const auto & object_pair : _active_block_objects[tid])
892 subdomains_covered.insert(object_pair.first);
893}

◆ updateActive()

void MooseObjectWarehouseBase< InitialConditionBase >::updateActive ( THREAD_ID  tid = 0)
virtualinherited

Updates the active objects storage.

Definition at line 136 of file MooseObjectWarehouseBase.h.

660{
661 checkThreadID(tid);
662
664
665 for (const auto & object_pair : _all_block_objects[tid])
666 updateActiveHelper(_active_block_objects[tid][object_pair.first], object_pair.second);
667
668 for (const auto & object_pair : _all_boundary_objects[tid])
669 updateActiveHelper(_active_boundary_objects[tid][object_pair.first], object_pair.second);
670}
static void updateActiveHelper(std::vector< std::shared_ptr< InitialConditionBase > > &active, const std::vector< std::shared_ptr< InitialConditionBase > > &all)
Helper method for updating active vectors.

◆ updateActiveHelper()

void MooseObjectWarehouseBase< InitialConditionBase >::updateActiveHelper ( std::vector< std::shared_ptr< InitialConditionBase > > &  active,
const std::vector< std::shared_ptr< InitialConditionBase > > &  all 
)
staticprotectedinherited

Helper method for updating active vectors.

Definition at line 242 of file MooseObjectWarehouseBase.h.

676{
677 // Clear the active list
678 active.clear();
679
680 std::copy_if(all.begin(),
681 all.end(),
682 std::back_inserter(active),
683 [](const std::shared_ptr<T> & object) { return object->enabled(); });
684}

◆ updateBlockFEVariableCoupledVectorTagDependency()

void MooseObjectWarehouseBase< InitialConditionBase >::updateBlockFEVariableCoupledVectorTagDependency ( SubdomainID  id,
std::set< TagID > &  needed_fe_var_vector_tags,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 166 of file MooseObjectWarehouseBase.h.

779{
780 if (hasActiveBlockObjects(id, tid))
781 updateFEVariableCoupledVectorTagDependencyHelper(needed_fe_var_vector_tags,
782 getActiveBlockObjects(id, tid));
783}
const std::map< SubdomainID, std::vector< std::shared_ptr< InitialConditionBase > > > & getActiveBlockObjects(THREAD_ID tid=0) const
static void updateFEVariableCoupledVectorTagDependencyHelper(std::set< TagID > &needed_fe_var_vector_tags, const std::vector< std::shared_ptr< InitialConditionBase > > &objects)
Helper method for updating FE variable coupleable vector tag vector.

◆ updateBlockMatPropDependency()

void MooseObjectWarehouseBase< InitialConditionBase >::updateBlockMatPropDependency ( SubdomainID  id,
std::unordered_set< unsigned int > &  needed_mat_props,
THREAD_ID  tid = 0,
const bool  producer_only = false 
) const
inherited

Definition at line 181 of file MooseObjectWarehouseBase.h.

829{
830 if (hasActiveBlockObjects(id, tid))
831 updateMatPropDependencyHelper(needed_mat_props, getActiveBlockObjects(id, tid), producer_only);
832}
virtual void updateMatPropDependencyHelper(std::unordered_set< unsigned int > &needed_mat_props, const std::vector< std::shared_ptr< InitialConditionBase > > &objects, const bool producer_only) const
Helper method for updating material property dependency vector.

◆ updateBlockVariableDependency()

void MooseObjectWarehouseBase< InitialConditionBase >::updateBlockVariableDependency ( SubdomainID  id,
std::set< MooseVariableFieldBase * > &  needed_moose_vars,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 149 of file MooseObjectWarehouseBase.h.

719{
720 if (hasActiveBlockObjects(id, tid))
721 updateVariableDependencyHelper(needed_moose_vars, getActiveBlockObjects(id, tid));
722}
static void updateVariableDependencyHelper(std::set< MooseVariableFieldBase * > &needed_moose_vars, const std::vector< std::shared_ptr< InitialConditionBase > > &objects)
Helper method for updating variable dependency vector.

◆ updateBoundaryFEVariableCoupledVectorTagDependency()

void MooseObjectWarehouseBase< InitialConditionBase >::updateBoundaryFEVariableCoupledVectorTagDependency ( BoundaryID  id,
std::set< TagID > &  needed_fe_var_vector_tags,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 169 of file MooseObjectWarehouseBase.h.

789{
790 if (hasActiveBoundaryObjects(id, tid))
791 updateFEVariableCoupledVectorTagDependencyHelper(needed_fe_var_vector_tags,
792 getActiveBoundaryObjects(id, tid));
793}
const std::map< BoundaryID, std::vector< std::shared_ptr< InitialConditionBase > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const

◆ updateBoundaryMatPropDependency() [1/2]

void MooseObjectWarehouseBase< InitialConditionBase >::updateBoundaryMatPropDependency ( BoundaryID  id,
std::unordered_set< unsigned int > &  needed_mat_props,
THREAD_ID  tid = 0,
const bool  producer_only = false 
) const
inherited

Definition at line 188 of file MooseObjectWarehouseBase.h.

853{
854 if (hasActiveBoundaryObjects(id, tid))
856 needed_mat_props, getActiveBoundaryObjects(id, tid), producer_only);
857}

◆ updateBoundaryMatPropDependency() [2/2]

void MooseObjectWarehouseBase< InitialConditionBase >::updateBoundaryMatPropDependency ( std::unordered_set< unsigned int > &  needed_mat_props,
THREAD_ID  tid = 0,
const bool  producer_only = false 
) const
inherited

Definition at line 185 of file MooseObjectWarehouseBase.h.

840{
842 for (auto & active_bnd_object : _active_boundary_objects[tid])
843 updateMatPropDependencyHelper(needed_mat_props, active_bnd_object.second, producer_only);
844}

◆ updateBoundaryVariableDependency() [1/2]

void MooseObjectWarehouseBase< InitialConditionBase >::updateBoundaryVariableDependency ( BoundaryID  id,
std::set< MooseVariableFieldBase * > &  needed_moose_vars,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 154 of file MooseObjectWarehouseBase.h.

743{
744 if (hasActiveBoundaryObjects(id, tid))
745 updateVariableDependencyHelper(needed_moose_vars, getActiveBoundaryObjects(id, tid));
746}

◆ updateBoundaryVariableDependency() [2/2]

void MooseObjectWarehouseBase< InitialConditionBase >::updateBoundaryVariableDependency ( std::set< MooseVariableFieldBase * > &  needed_moose_vars,
THREAD_ID  tid = 0 
) const
inherited

Definition at line 152 of file MooseObjectWarehouseBase.h.

728{
730 {
731 typename std::map<BoundaryID, std::vector<std::shared_ptr<T>>>::const_iterator it;
732 for (const auto & object_pair : _active_boundary_objects[tid])
733 updateVariableDependencyHelper(needed_moose_vars, object_pair.second);
734 }
735}

◆ updateFEVariableCoupledVectorTagDependency()

void MooseObjectWarehouseBase< InitialConditionBase >::updateFEVariableCoupledVectorTagDependency ( std::set< TagID > &  needed_fe_var_vector_tags,
THREAD_ID  tid = 0 
) const
inherited

Update FE variable coupleable vector tag vector for all objects, block-restricted objects, and boundary-restricted objects.

Definition at line 164 of file MooseObjectWarehouseBase.h.

769{
770 if (hasActiveObjects(tid))
771 updateFEVariableCoupledVectorTagDependencyHelper(needed_fe_var_vector_tags,
772 _active_objects[tid]);
773}

◆ updateFEVariableCoupledVectorTagDependencyHelper()

void MooseObjectWarehouseBase< InitialConditionBase >::updateFEVariableCoupledVectorTagDependencyHelper ( std::set< TagID > &  needed_fe_var_vector_tags,
const std::vector< std::shared_ptr< InitialConditionBase > > &  objects 
)
staticprotectedinherited

Helper method for updating FE variable coupleable vector tag vector.

Definition at line 260 of file MooseObjectWarehouseBase.h.

799{
800 for (const auto & object : objects)
801 {
802 auto c = dynamic_cast<const Coupleable *>(object.get());
803 if (c)
804 {
805 const auto & tag_deps = c->getFEVariableCoupleableVectorTags();
806 needed_fe_var_vector_tags.insert(tag_deps.begin(), tag_deps.end());
807 }
808 }
809}
Interface for objects that needs coupling capabilities.
Definition Coupleable.h:53
std::set< TagID > & getFEVariableCoupleableVectorTags()
Definition Coupleable.h:120

◆ updateMatPropDependency()

void MooseObjectWarehouseBase< InitialConditionBase >::updateMatPropDependency ( std::unordered_set< unsigned int > &  needed_mat_props,
THREAD_ID  tid = 0,
const bool  producer_only = false 
) const
inherited

Update material property dependency vector.

Parameters
producer_onlyOnly append dependencies of materials producing the needed_mat_props

Definition at line 178 of file MooseObjectWarehouseBase.h.

817{
818 if (hasActiveObjects(tid))
819 updateMatPropDependencyHelper(needed_mat_props, _active_objects[tid], producer_only);
820}

◆ updateMatPropDependencyHelper()

void MooseObjectWarehouseBase< InitialConditionBase >::updateMatPropDependencyHelper ( std::unordered_set< unsigned int > &  needed_mat_props,
const std::vector< std::shared_ptr< InitialConditionBase > > &  objects,
const bool  producer_only 
) const
protectedvirtualinherited

Helper method for updating material property dependency vector.

Definition at line 266 of file MooseObjectWarehouseBase.h.

865{
866 for (auto & object : objects)
867 {
868 auto c = dynamic_cast<const MaterialPropertyInterface *>(object.get());
869 if (c)
870 {
871 auto & mp_deps = c->getMatPropDependencies();
872 needed_mat_props.insert(mp_deps.begin(), mp_deps.end());
873 }
874 }
875}
An interface for accessing Materials.
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const
Retrieve the set of material properties that this object depends on.

◆ updateVariableDependency()

void MooseObjectWarehouseBase< InitialConditionBase >::updateVariableDependency ( std::set< MooseVariableFieldBase * > &  needed_moose_vars,
THREAD_ID  tid = 0 
) const
inherited

Update variable dependency vector.

Definition at line 147 of file MooseObjectWarehouseBase.h.

708{
709 if (hasActiveObjects(tid))
710 updateVariableDependencyHelper(needed_moose_vars, _active_objects[tid]);
711}

◆ updateVariableDependencyHelper()

void MooseObjectWarehouseBase< InitialConditionBase >::updateVariableDependencyHelper ( std::set< MooseVariableFieldBase * > &  needed_moose_vars,
const std::vector< std::shared_ptr< InitialConditionBase > > &  objects 
)
staticprotectedinherited

Helper method for updating variable dependency vector.

Definition at line 253 of file MooseObjectWarehouseBase.h.

753{
754 for (const auto & object : objects)
755 {
756 auto c = dynamic_cast<const MooseVariableDependencyInterface *>(object.get());
757 if (c)
758 {
759 const auto & mv_deps = c->getMooseVariableDependencies();
760 needed_moose_vars.insert(mv_deps.begin(), mv_deps.end());
761 }
762 }
763}
const std::set< MooseVariableFieldBase * > & getMooseVariableDependencies() const
Retrieve the set of MooseVariableFieldBase that this object depends on.

Member Data Documentation

◆ _active_block_objects

std::vector<std::map<SubdomainID, std::vector<std::shared_ptr<InitialConditionBase > > > > MooseObjectWarehouseBase< InitialConditionBase >::_active_block_objects
protectedinherited

Active block restricted objects (THREAD_ID on outer vector)

Definition at line 228 of file MooseObjectWarehouseBase.h.

◆ _active_boundary_objects

std::vector<std::map<BoundaryID, std::vector<std::shared_ptr<InitialConditionBase > > > > MooseObjectWarehouseBase< InitialConditionBase >::_active_boundary_objects
protectedinherited

Active boundary restricted objects (THREAD_ID on outer vector)

Definition at line 234 of file MooseObjectWarehouseBase.h.

◆ _active_objects

std::vector<std::vector<std::shared_ptr<InitialConditionBase > > > MooseObjectWarehouseBase< InitialConditionBase >::_active_objects
protectedinherited

All active objects (THREAD_ID on outer vector)

Definition at line 222 of file MooseObjectWarehouseBase.h.

◆ _all_block_objects

std::vector<std::map<SubdomainID, std::vector<std::shared_ptr<InitialConditionBase > > > > MooseObjectWarehouseBase< InitialConditionBase >::_all_block_objects
protectedinherited

Definition at line 225 of file MooseObjectWarehouseBase.h.

◆ _all_boundary_objects

std::vector<std::map<BoundaryID, std::vector<std::shared_ptr<InitialConditionBase > > > > MooseObjectWarehouseBase< InitialConditionBase >::_all_boundary_objects
protectedinherited

Definition at line 231 of file MooseObjectWarehouseBase.h.

◆ _all_objects

std::vector<std::vector<std::shared_ptr<InitialConditionBase > > > MooseObjectWarehouseBase< InitialConditionBase >::_all_objects
protectedinherited

Storage container for the ALL pointers (THREAD_ID on outer vector)

Definition at line 219 of file MooseObjectWarehouseBase.h.

◆ _all_variable_objects

std::vector<std::map<VariableName, std::vector<std::shared_ptr<InitialConditionBase > > > > MooseObjectWarehouseBase< InitialConditionBase >::_all_variable_objects
protectedinherited

All objects with a certain variable selected, as the 'variable' parameter.

Definition at line 237 of file MooseObjectWarehouseBase.h.

◆ _block_ics

std::vector<std::map<ic_key_type, std::set<SubdomainID> > > InitialConditionWarehouse::_block_ics
protected

Definition at line 50 of file InitialConditionWarehouse.h.

Referenced by addObject().

◆ _boundary_ics

std::vector<std::map<ic_key_type, std::set<BoundaryID> > > InitialConditionWarehouse::_boundary_ics
protected

Definition at line 49 of file InitialConditionWarehouse.h.

Referenced by addObject().

◆ _num_threads

const THREAD_ID MooseObjectWarehouseBase< InitialConditionBase >::_num_threads
protectedinherited

Convenience member storing the number of threads used for storage (1 or libMesh::n_threads)

Definition at line 216 of file MooseObjectWarehouseBase.h.


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