Warehouse for storing scalar initial conditions. More...
#include <ScalarInitialConditionWarehouse.h>
Public Member Functions | |
| ScalarInitialConditionWarehouse () | |
| void | initialSetup () |
| Initial setup. | |
| virtual void | addObject (std::shared_ptr< ScalarInitialCondition > 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< ScalarInitialCondition > > & | 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< ScalarInitialCondition > > & | 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< ScalarInitialCondition > > > & | getBlockObjects (THREAD_ID tid=0) const |
| const std::vector< std::shared_ptr< ScalarInitialCondition > > & | getBlockObjects (SubdomainID id, THREAD_ID tid=0) const |
| const std::map< BoundaryID, std::vector< std::shared_ptr< ScalarInitialCondition > > > & | getBoundaryObjects (THREAD_ID tid=0) const |
| const std::vector< std::shared_ptr< ScalarInitialCondition > > & | getBoundaryObjects (BoundaryID id, THREAD_ID tid=0) const |
| const std::vector< std::shared_ptr< ScalarInitialCondition > > & | 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< ScalarInitialCondition > > > & | getActiveBlockObjects (THREAD_ID tid=0) const |
| const std::vector< std::shared_ptr< ScalarInitialCondition > > & | getActiveBlockObjects (SubdomainID id, THREAD_ID tid=0) const |
| const std::map< BoundaryID, std::vector< std::shared_ptr< ScalarInitialCondition > > > & | getActiveBoundaryObjects (THREAD_ID tid=0) const |
| const std::vector< std::shared_ptr< ScalarInitialCondition > > & | 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< ScalarInitialCondition > | getObject (const std::string &name, THREAD_ID tid=0) const |
| std::shared_ptr< ScalarInitialCondition > | 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< ScalarInitialCondition > > &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< ScalarInitialCondition > > > > &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< ScalarInitialCondition > > &active, const std::vector< std::shared_ptr< ScalarInitialCondition > > &all) |
| Helper method for updating active vectors. | |
| static void | sortHelper (std::vector< std::shared_ptr< ScalarInitialCondition > > &objects) |
| Helper method for sorting vectors of objects. | |
| static void | updateVariableDependencyHelper (std::set< MooseVariableFieldBase * > &needed_moose_vars, const std::vector< std::shared_ptr< ScalarInitialCondition > > &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< ScalarInitialCondition > > &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< ScalarInitialCondition > > > | _all_objects |
| Storage container for the ALL pointers (THREAD_ID on outer vector) | |
| std::vector< std::vector< std::shared_ptr< ScalarInitialCondition > > > | _active_objects |
| All active objects (THREAD_ID on outer vector) | |
| std::vector< std::map< SubdomainID, std::vector< std::shared_ptr< ScalarInitialCondition > > > > | _all_block_objects |
| std::vector< std::map< SubdomainID, std::vector< std::shared_ptr< ScalarInitialCondition > > > > | _active_block_objects |
| Active block restricted objects (THREAD_ID on outer vector) | |
| std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< ScalarInitialCondition > > > > | _all_boundary_objects |
| std::vector< std::map< BoundaryID, std::vector< std::shared_ptr< ScalarInitialCondition > > > > | _active_boundary_objects |
| Active boundary restricted objects (THREAD_ID on outer vector) | |
| std::vector< std::map< VariableName, std::vector< std::shared_ptr< ScalarInitialCondition > > > > | _all_variable_objects |
| All objects with a certain variable selected, as the 'variable' parameter. | |
Warehouse for storing scalar initial conditions.
Definition at line 20 of file ScalarInitialConditionWarehouse.h.
| ScalarInitialConditionWarehouse::ScalarInitialConditionWarehouse | ( | ) |
Definition at line 13 of file ScalarInitialConditionWarehouse.C.
|
inherited |
Output the active content of the warehouse to a string, meant to be output to the console.
| tid | the thread id |
| prefix | a string to prepend to the string |
Definition at line 211 of file MooseObjectWarehouseBase.h.
|
virtualinherited |
Adds an object to the storage structure.
| tid | The thread ID (default is 0) |
| recurse | Whether or not to build recusive warehouses (typically for Kernels) |
Definition at line 48 of file MooseObjectWarehouseBase.h.
|
inlineprotectedinherited |
Calls assert on thread id.
Definition at line 273 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 79 of file MooseObjectWarehouseBase.h.
|
inlineinherited |
Definition at line 78 of file MooseObjectWarehouseBase.h.
|
inherited |
Return a set of active SubdomainsIDs.
Definition at line 116 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 83 of file MooseObjectWarehouseBase.h.
|
inlineinherited |
Definition at line 82 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 124 of file MooseObjectWarehouseBase.h.
|
inlineinherited |
Retrieve complete vector to the active all/block/boundary restricted objects for a given thread.
| tid | The thread id to retrieve objects from |
Definition at line 76 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 63 of file MooseObjectWarehouseBase.h.
|
inlineinherited |
Definition at line 62 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 66 of file MooseObjectWarehouseBase.h.
|
inlineinherited |
Definition at line 65 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 123 of file MooseObjectWarehouseBase.h.
|
inlineinherited |
Retrieve complete vector to the all/block/boundary restricted objects for a given thread.
| tid | The thread id to retrieve objects from |
Definition at line 60 of file MooseObjectWarehouseBase.h.
|
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.
|
inherited |
Definition at line 95 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 94 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 97 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 96 of file MooseObjectWarehouseBase.h.
|
inherited |
Convenience functions for checking/getting specific objects.
Definition at line 122 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 92 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 99 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 98 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
Helper for determining whether we have boundary objects.
Definition at line 278 of file MooseObjectWarehouseBase.h.
|
inherited |
Convenience functions for determining if objects exist.
Definition at line 91 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 93 of file MooseObjectWarehouseBase.h.
|
inherited |
Whether there are objects for this variable and the set of blocks passed.
| var_name | name of the variable |
| blocks | blocks to consider |
| blocks_covered | subset of blocks for which there is an object |
Definition at line 108 of file MooseObjectWarehouseBase.h.
| void ScalarInitialConditionWarehouse::initialSetup | ( | ) |
Initial setup.
Definition at line 19 of file ScalarInitialConditionWarehouse.C.
|
inlineinherited |
|
inherited |
Return how many kernels we store in the current warehouse.
Definition at line 53 of file MooseObjectWarehouseBase.h.
|
inherited |
Sort the objects using the DependencyResolver.
Definition at line 141 of file MooseObjectWarehouseBase.h.
|
staticprotectedinherited |
Helper method for sorting vectors of objects.
Definition at line 248 of file MooseObjectWarehouseBase.h.
|
inherited |
Populates a set of covered subdomains and the associated variable names.
Definition at line 197 of file MooseObjectWarehouseBase.h.
|
virtualinherited |
Updates the active objects storage.
Definition at line 136 of file MooseObjectWarehouseBase.h.
|
staticprotectedinherited |
Helper method for updating active vectors.
Definition at line 242 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 166 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 181 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 149 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 169 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 188 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 185 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 154 of file MooseObjectWarehouseBase.h.
|
inherited |
Definition at line 152 of file MooseObjectWarehouseBase.h.
|
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.
|
staticprotectedinherited |
Helper method for updating FE variable coupleable vector tag vector.
Definition at line 260 of file MooseObjectWarehouseBase.h.
|
inherited |
Update material property dependency vector.
| producer_only | Only append dependencies of materials producing the needed_mat_props |
Definition at line 178 of file MooseObjectWarehouseBase.h.
|
protectedvirtualinherited |
Helper method for updating material property dependency vector.
Definition at line 266 of file MooseObjectWarehouseBase.h.
|
inherited |
Update variable dependency vector.
Definition at line 147 of file MooseObjectWarehouseBase.h.
|
staticprotectedinherited |
Helper method for updating variable dependency vector.
Definition at line 253 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
Active block restricted objects (THREAD_ID on outer vector)
Definition at line 228 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
Active boundary restricted objects (THREAD_ID on outer vector)
Definition at line 234 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
All active objects (THREAD_ID on outer vector)
Definition at line 222 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
Definition at line 225 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
Definition at line 231 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
Storage container for the ALL pointers (THREAD_ID on outer vector)
Definition at line 219 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
All objects with a certain variable selected, as the 'variable' parameter.
Definition at line 237 of file MooseObjectWarehouseBase.h.
|
protectedinherited |
Convenience member storing the number of threads used for storage (1 or libMesh::n_threads)
Definition at line 216 of file MooseObjectWarehouseBase.h.