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

Template class for semi-implicitly coupled simulators. More...

#include <SIMCoupledSI.h>

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

Public Member Functions

 SIMCoupledSI (T1 &s1, T2 &s2)
 The constructor forwards to the parent class constructor.
 
virtual ~SIMCoupledSI ()
 The destructor deletes the max iteration function.
 
virtual void enableStaggering (bool enable=true)
 Enable/disable the staggering iteration cycles.
 
virtual const VectorgetAitkenResidual () const
 Returns residual to use for aitken acceleration.
 
virtual const VectorgetRelaxationVector () const
 Returns solution to use for relaxation.
 
virtual void setRelaxedSolution (const Vector &)
 Sets the relaxed solution.
 
virtual bool solveStep (TimeStep &tp, bool firstS1=true)
 Computes the solution for the current time step.
 
virtual SIM::ConvStatus checkConvergence (const TimeStep &, SIM::ConvStatus status1, SIM::ConvStatus status2)
 Override this method to add additional convergence criteria.
 
- Public Member Functions inherited from SIMCoupled< T1, T2 >
 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 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 Member Functions

void parseIterations (const tinyxml2::XMLElement *elem)
 Parses sub-iteration setup from an XML tag.
 
int getMaxit (int iStep=0) const
 Returns the maximum number of sub-iteration cycles.
 

Private Attributes

int maxIter
 Maximum number of iterations.
 
ScalarFuncmaxItFunc
 Maximum number of iterations as a function.
 
bool noStg
 If true, sub-iterations is disabled.
 
double omega0
 Initial relaxation parameter.
 
double omega
 Current relaxation parameter.
 
bool aitken
 If true, Aitken-acceleration is enabled.
 
Vector prevSol
 Previous solution for relaxed field.
 
Vector prevRes
 Previous residual used for aitken-acceleration factor.
 

Additional Inherited Members

- Protected Attributes inherited from SIMCoupled< T1, T2 >
T1S1
 First substep.
 
T2 & S2
 Second substep.
 

Detailed Description

template<class T1, class T2>
class SIMCoupledSI< T1, T2 >

Template class for semi-implicitly coupled simulators.


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