20 #ifndef GEOS_FIELDSPECIFICATION_FIELDSPECIFICATIONMANAGER_HPP_
21 #define GEOS_FIELDSPECIFICATION_FIELDSPECIFICATIONMANAGER_HPP_
31 namespace dataRepository
72 virtual Group *
createChild(
string const & childKey,
string const & childName )
override;
96 template<
typename POLICY=parallelHostPolicy >
99 string const & fieldName )
const
103 applyFieldValue< POLICY >( time, mesh, fieldName,
132 template<
typename POLICY=parallelHostPolicy,
typename LAMBDA=
void >
135 string const & fieldName,
136 LAMBDA && lambda )
const;
167 template<
typename POLICY=parallelHostPolicy,
typename PRELAMBDA=
void,
typename POSTLAMBDA=
void >
170 string const & fieldName,
171 PRELAMBDA && preLambda,
172 POSTLAMBDA && postLambda )
const;
212 string const & fieldName,
213 LAMBDA && lambda )
const
218 string const meshLevelName = mesh.
getName();
221 this->forSubGroups< BCTYPE >( [&] ( BCTYPE
const & fs )
223 integer const isInitialCondition = fs.initialCondition();
224 if( ( isInitialCondition && fieldName==
"") ||
225 ( !isInitialCondition && time >= fs.getStartTime() && time < fs.getEndTime() && fieldName == fs.getFieldName() ) )
227 fs.template apply< OBJECT_TYPE, BCTYPE, LAMBDA >( mesh, std::forward< LAMBDA >( lambda ) );
237 template<
typename POLICY,
typename LAMBDA >
242 string const & fieldName,
243 LAMBDA && lambda )
const
247 apply( time, mesh, fieldName,
252 string const & targetField )
255 lambda( fs, targetSet );
259 template<
typename POLICY,
typename PRELAMBDA,
typename POSTLAMBDA >
264 string const & fieldName,
265 PRELAMBDA && preLambda,
266 POSTLAMBDA && postLambda )
const
270 apply( time, mesh, fieldName,
275 string const & targetField )
277 preLambda( fs, targetSet );
279 postLambda( fs, targetSet );
string const boundaryConditionManager("BoundaryConditionManager")
The key for BoundaryConditionManager.
#define GEOS_MARK_FUNCTION
Mark function with both Caliper and NVTX if enabled.
void applyFieldValue(SortedArrayView< localIndex const > const &targetSet, real64 const time, dataRepository::Group &dataGroup, string const &fieldname) const
void apply(real64 const time, MeshLevel &mesh, string const &fieldName, LAMBDA &&lambda) const
This function is the main driver for the field applications.
virtual Group * createChild(string const &childKey, string const &childName) override
Create a new FieldSpecificationBase object as a child of this group.
void applyInitialConditions(MeshLevel &mesh) const
function to apply initial conditions
void applyFieldValue(real64 const time, MeshLevel &mesh, string const &fieldName) const
Function to apply a value directly to a field variable.
virtual void expandObjectCatalogs() override
This function is used to expand any catalogs in the data structure.
FieldSpecificationManager(string const &name, dataRepository::Group *const parent)
private constructor for the singleton BoundaryConditionManager.
void validateBoundaryConditions(MeshLevel &mesh) const
function to validate the application of boundary conditions
static FieldSpecificationManager & getInstance()
Class facilitating the representation of a multi-level discretization of a MeshBody.
string const & getName() const
Get group name.
Group & getParent()
Access the group's parent.
double real64
64-bit floating point type.
std::int32_t integer
Signed integer type.
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.