IFEM  90A354
Public Member Functions | Protected Attributes | List of all members
SIMCoupled< T1, T2 > Class Template Reference

Template class for coupled simulators. More...

#include <SIMCoupled.h>

Inheritance diagram for SIMCoupled< T1, T2 >:
Inheritance graph
[legend]

Public Member Functions

 SIMCoupled (T1 &s1, T2 &s2)
 The constructor initializes the references to the two simulators.
 
virtual ~SIMCoupled ()
 The destructor nullifies the VTF pointer for the second simulator.
 
virtual void setupDependencies ()
 Sets up field dependencies.
 
bool preprocess ()
 Performs some pre-processing tasks on the FE model.
 
const ProcessAdmgetProcessAdm () const
 Returns the parallel process administrator.
 
int getRefined () const
 Returns current refinement status.
 
std::string getName (int substep=1) const
 Returns the name of this (or a substep) simulator.
 
virtual bool advanceStep (TimeStep &tp)
 Advances the time step one step forward.
 
virtual void enableStaggering (bool=true)
 Enables/disables staggering iteration cycles.
 
virtual bool solveStep (TimeStep &tp, bool firstS1=true)
 Computes the solution for the current time step.
 
virtual bool saveStep (const TimeStep &tp, int &nBlock)
 Saves the converged results to VTF-file of a given time step.
 
virtual bool saveModel (char *fileName, int &geoBlk, int &nBlock)
 Opens a new VTF-file and writes the model geometry to it.
 
VTFgetVTF () const
 Returns the current VTF-file object.
 
virtual bool init (const TimeStep &tp)
 Initializes for time-dependent simulation.
 
virtual void registerDependency (SIMdependency *sim, const std::string &name, short int nvc, const std::vector< ASMbase * > &patches, char diffBasis=0, int component=1)
 Registers a dependency on a field from another SIM object.
 
virtual void registerDependency (SIMdependency *sim, const std::string &name, short int nvc=1)
 Registers a dependency on a field from another SIM object.
 
int getUniquePropertyCode (const std::string &setName, int comp=0)
 Returns a unique integer code for a Property set.
 
bool createPropertySet (const std::string &setName, int pc)
 Creates a set of Property objects.
 
size_t setVecProperty (int code, Property::Type ptype, VecFunc *field=nullptr, int pflag=-1)
 Defines a vector field property.
 
void registerFields (DataExporter &exporter)
 Registers the field vectors for storage on HDF5 output.
 
bool setInitialConditions ()
 Sets the initial conditions for the simulators.
 
bool hasIC (const std::string &name) const
 Checks whether a named initial condition is present.
 
utl::vector< double > * getField (const std::string &name)
 Returns the nodal vector of named field in this SIM.
 
bool serialize (std::map< std::string, std::string > &data)
 Serialize internal state for restarting purposes. More...
 
bool deSerialize (const std::map< std::string, std::string > &data)
 Set internal state from a serialized state. More...
 

Protected Attributes

T1S1
 First substep.
 
T2 & S2
 Second substep.
 

Detailed Description

template<class T1, class T2>
class SIMCoupled< T1, T2 >

Template class for coupled simulators.

Member Function Documentation

◆ deSerialize()

template<class T1 , class T2 >
bool SIMCoupled< T1, T2 >::deSerialize ( const std::map< std::string, std::string > &  data)
inline

Set internal state from a serialized state.

Parameters
[in]dataContainer for serialized data

References SIMCoupled< T1, T2 >::S1, and SIMCoupled< T1, T2 >::S2.

◆ serialize()

template<class T1 , class T2 >
bool SIMCoupled< T1, T2 >::serialize ( std::map< std::string, std::string > &  data)
inline

Serialize internal state for restarting purposes.

Parameters
dataContainer for serialized data

References SIMCoupled< T1, T2 >::S1, and SIMCoupled< T1, T2 >::S2.


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