IFEM  90A354
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SIMdependency Class Referenceabstract

Class administering inter-SIM field dependencies. More...

#include <SIMdependency.h>

Inheritance diagram for SIMdependency:
Inheritance graph
[legend]
Collaboration diagram for SIMdependency:
Collaboration graph
[legend]

Classes

struct  Dependency
 Struct holding information about an inter-SIM dependency. More...
 

Public Types

typedef std::vector< ASMbase * > PatchVec
 Spline patch container.
 

Public Member Functions

virtual ~SIMdependency ()
 Empty destructor.
 
virtual size_t getNoSpaceDim () const =0
 Returns the number of spatial dimensions in the model.
 
virtual std::string getName () const =0
 Returns the given name of this simulator.
 
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. More...
 
virtual void registerDependency (SIMdependency *sim, const std::string &name, short int nvc, const PatchVec &patches, const int *MADOF)
 Registers a dependency on a field from another SIM object. More...
 
virtual void registerDependency (SIMdependency *sim, const std::string &name, short int nvc=1)
 Registers a dependency on a field from another SIM object. More...
 
bool fillField (const std::string &name, const std::vector< double > &values)
 Initializes the nodal vector of named field in this SIM.
 
virtual std::vector< double > * getField (const std::string &name)
 Returns the nodal vector of named field in this SIM.
 
virtual const std::vector< double > * getField (const std::string &name) const
 Returns the nodal vector of named field in this SIM.
 
const std::vector< double > * getDependentField (const std::string &name) const
 Returns the nodal vector of named field in a dependent SIM.
 
ASMbasegetDependentPatch (const std::string &name, int pindx) const
 Returns a spline patch associated with a dependent field.
 
void registerField (const std::string &name, const std::vector< double > &vec)
 Registers a named field with associated nodal vector in this SIM.
 
virtual bool hasIC (const std::string &) const
 Checks whether a named initial condition is present.
 

Protected Member Functions

 SIMdependency ()
 The constructor is protected to allow sub-class instances only.
 
bool extractPatchDependencies (IntegrandBase *problem, const PatchVec &model, size_t pindx) const
 Extracts local solution vector(s) for all dependent fields. More...
 

Private Types

typedef std::vector< DependencyDepVector
 SIM dependency container.
 
typedef std::map< std::string, const std::vector< double > * > FieldMap
 Field name to nodal values map.
 

Private Member Functions

DepVector::const_iterator getDependency (const std::string &name) const
 Returns an iterator pointing to a named dependency.
 

Private Attributes

FieldMap myFields
 The named fields of this SIM object.
 
DepVector depFields
 Other fields this SIM objecy depends on.
 

Detailed Description

Class administering inter-SIM field dependencies.

Member Function Documentation

◆ extractPatchDependencies()

bool SIMdependency::extractPatchDependencies ( IntegrandBase problem,
const PatchVec model,
size_t  pindx 
) const
protected

Extracts local solution vector(s) for all dependent fields.

Parameters
problemObject with problem-specific data and methods
[in]modelPatch geometry of this SIM object
[in]pindxLocal patch index to extract solution vectors for

References utl::vector< T >::clear(), Field::create(), Fields::create(), depFields, ASMbase::extractNodalVec(), ASMbase::extractNodeVec(), IntegrandBase::getNamedVector(), ASMbase::getNoFields(), IntegrandBase::setNamedField(), and IntegrandBase::setNamedFields().

Referenced by SIMbase::extractPatchSolution(), and SIMoutput::initPatchForEvaluation().

◆ registerDependency() [1/3]

void SIMdependency::registerDependency ( SIMdependency sim,
const std::string &  name,
short int  nvc,
const PatchVec patches,
char  diffBasis = 0,
int  component = 1 
)
virtual

Registers a dependency on a field from another SIM object.

Parameters
[in]simThe SIM object holding the field we depend on
[in]nameName of field we depend on
[in]nvcNumber of components in field
[in]patchesThe geometry the field is defined over
[in]diffBasisIf non-null, use diffBasis base from patch vector
[in]componentComponent to use from field

References depFields.

Referenced by registerDependency().

◆ registerDependency() [2/3]

void SIMdependency::registerDependency ( SIMdependency sim,
const std::string &  name,
short int  nvc,
const PatchVec patches,
const int *  MADOF 
)
virtual

Registers a dependency on a field from another SIM object.

Parameters
[in]simThe SIM object holding the field we depend on
[in]nameName of field we depend on
[in]nvcNumber of components in field
[in]patchesThe geometry the field is defined over
[in]MADOFThe MADOF array to associate with this field

References depFields, and registerDependency().

◆ registerDependency() [3/3]

void SIMdependency::registerDependency ( SIMdependency sim,
const std::string &  name,
short int  nvc = 1 
)
virtual

Registers a dependency on a field from another SIM object.

Parameters
[in]simThe SIM object holding the field we depend on
[in]nameName of field we depend on
[in]nvcNumber of components in field

References depFields, and getName().


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