14 #ifndef _SIM_DEPENDENCY_H
15 #define _SIM_DEPENDENCY_H
56 typedef std::map<std::string,const std::vector<double>*>
FieldMap;
79 short int nvc,
const PatchVec& patches,
80 char diffBasis = 0,
int component = 1);
88 short int nvc,
const PatchVec& patches,
98 bool fillField(
const std::string& name,
const std::vector<double>& values);
100 virtual std::vector<double>*
getField(
const std::string& name);
102 virtual const std::vector<double>*
getField(
const std::string& name)
const;
108 void registerField(
const std::string& name,
const std::vector<double>& vec);
110 virtual bool hasIC(
const std::string&)
const {
return false; }
114 DepVector::const_iterator
getDependency(
const std::string& name)
const;
122 const PatchVec& model,
size_t pindx)
const;
Base class for spline-based finite element (FE) assembly drivers.
Definition: ASMbase.h:70
Base class representing a system level integrated quantity.
Definition: IntegrandBase.h:42
Class administering inter-SIM field dependencies.
Definition: SIMdependency.h:30
bool fillField(const std::string &name, const std::vector< double > &values)
Initializes the nodal vector of named field in this SIM.
Definition: SIMdependency.C:56
void registerField(const std::string &name, const std::vector< double > &vec)
Registers a named field with associated nodal vector in this SIM.
Definition: SIMdependency.C:121
ASMbase * getDependentPatch(const std::string &name, int pindx) const
Returns a spline patch associated with a dependent field.
Definition: SIMdependency.C:107
const std::vector< double > * getDependentField(const std::string &name) const
Returns the nodal vector of named field in a dependent SIM.
Definition: SIMdependency.C:97
std::map< std::string, const std::vector< double > * > FieldMap
Field name to nodal values map.
Definition: SIMdependency.h:56
SIMdependency()
The constructor is protected to allow sub-class instances only.
Definition: SIMdependency.h:60
virtual ~SIMdependency()
Empty destructor.
Definition: SIMdependency.h:64
std::vector< Dependency > DepVector
SIM dependency container.
Definition: SIMdependency.h:54
virtual std::string getName() const =0
Returns the given name of this simulator.
virtual std::vector< double > * getField(const std::string &name)
Returns the nodal vector of named field in this SIM.
Definition: SIMdependency.C:68
FieldMap myFields
The named fields of this SIM object.
Definition: SIMdependency.h:125
bool extractPatchDependencies(IntegrandBase *problem, const PatchVec &model, size_t pindx) const
Extracts local solution vector(s) for all dependent fields.
Definition: SIMdependency.C:128
std::vector< ASMbase * > PatchVec
Spline patch container.
Definition: SIMdependency.h:33
DepVector depFields
Other fields this SIM objecy depends on.
Definition: SIMdependency.h:126
virtual void registerDependency(SIMdependency *sim, const std::string &name, short int nvc, const PatchVec &patches, char diffBasis=0, int component=1)
Registers a dependency on a field from another SIM object.
Definition: SIMdependency.C:21
DepVector::const_iterator getDependency(const std::string &name) const
Returns an iterator pointing to a named dependency.
Definition: SIMdependency.C:86
virtual size_t getNoSpaceDim() const =0
Returns the number of spatial dimensions in the model.
virtual bool hasIC(const std::string &) const
Checks whether a named initial condition is present.
Definition: SIMdependency.h:110
Struct holding information about an inter-SIM dependency.
Definition: SIMdependency.h:38
short int comp_use
Component to use from field.
Definition: SIMdependency.h:43
PatchVec patches
Patch geometry the field is defined over.
Definition: SIMdependency.h:40
short int components
Number of field components per node.
Definition: SIMdependency.h:42
Dependency(SIMdependency *s=nullptr, const std::string &f="", short int n=1)
Default constructor.
Definition: SIMdependency.h:48
SIMdependency * sim
SIM object holding the dependent field.
Definition: SIMdependency.h:39
char differentBasis
Toggle usage of an independent basis.
Definition: SIMdependency.h:44
const int * MADOF
The MADOF array to associate with field.
Definition: SIMdependency.h:45
std::string name
Field name.
Definition: SIMdependency.h:41