IFEM  90A354
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
SIMSemi3D< PlaneSolver > Class Template Reference

Driver class for plane-decoupled 3D problems. More...

#include <SIMSemi3D.h>

Inheritance diagram for SIMSemi3D< PlaneSolver >:
Inheritance graph
[legend]
Collaboration diagram for SIMSemi3D< PlaneSolver >:
Collaboration graph
[legend]

Public Types

enum  { dimension = 2 }
 Enum announcing the dimensionality.
 
typedef PlaneSolver::SetupProps SetupProps
 Convenience type.
 
- Public Types inherited from SIMdependency
typedef std::vector< ASMbase * > PatchVec
 Spline patch container.
 

Public Member Functions

 SIMSemi3D (const SetupProps &props_)
 The constructor initializes the setup properties.
 
virtual ~SIMSemi3D ()
 The destructor deletes the plane-wise sub-step solvers.
 
bool advanceStep (TimeStep &tp)
 Advances the time step one step forward.
 
int getBDForder () const
 Returns the order of the BDF scheme.
 
int getDumpInterval () const
 Returns the visualization dump interval.
 
void printFinalNorms (const TimeStep &)
 Dummy method.
 
bool preprocess (const std::vector< int > &={}, bool=false) override
 Performs some pre-processing tasks on the FE model.
 
void grabPlaneNodes ()
 Get FSI nodes for all planes.
 
std::string getName () const override
 Returns the name of this simulator (for use in the HDF5 export).
 
void registerFields (const DataExporter &exporter)
 Adds fields to a data exporter.
 
bool init (const TimeStep &tp)
 Initializes for time-dependent simulation.
 
bool saveModel (char *, int &, int &)
 Dummy method (VTF export is not supported).
 
bool saveStep (const TimeStep &tp, int &)
 Dumps all registered fields for each plane.
 
bool serialize (std::map< std::string, std::string > &)
 Dummy method, no serialization support.
 
bool deSerialize (const std::map< std::string, std::string > &)
 Dummy method, no deserialization support.
 
bool solveStep (TimeStep &tp)
 Solves the nonlinear equations by Newton-Raphson iterations.
 
bool setInitialConditions ()
 Sets the initial conditions.
 
void initSystem ()
 Initialize the FEM system.
 
bool read (const char *fileName) override
 Reads model data from the specified input file. More...
 
bool parse (const tinyxml2::XMLElement *elem) override
 Parses a data section from an XML element. More...
 
template<class T >
void registerDependency (SIMSemi3D< T > *sim, const std::string &name, short int nvc, const PatchVec &patches, char diffBasis=0, int component=0)
 Registers a dependency on a field from another SIM object. More...
 
size_t getNoSpaceDim () const override
 Returns the spatial dimension of plane solvers.
 
size_t getNoPlanes () const
 Returns the number of plane solvers.
 
PlaneSolver * getPlane (size_t i)
 Returns a pointer to a given plane solver.
 
const std::vector< PlaneSolver * > & getPlanes () const
 Returns a const reference to the plane solvers.
 
size_t getStartContext () const
 Returns the context of the first plane on this process.
 
size_t getProcsPerPlane () const
 Returns the number or processes participating in each planar solve.
 
int getPlaneNodes (int plane) const
 Returns the number of FSI nodes for a plane.
 
char getDirection () const
 Returns the (unoriented) normal direction of the planes.
 
VTFgetVTF ()
 Dummy method.
 
void setVTF (VTF *)
 Dummy method.
 
Vec3 getForce (int) const
 Dummy method.
 
const PatchVecgetFEModel ()
 Dummy method.
 
void setupDependencies ()
 Setup inter-SIM dependencies.
 
bool updateALE ()
 Updating the grid in an ALE solver.
 
int getLocalNode (int) const
 Dummy method.
 
int getGlobalNode (int) const
 Dummy method.
 
int getNoBasis () const
 Returns the number of bases in the model.
 
size_t getNoSolutions () const
 Returns the number of solution vectors.
 
virtual bool parse (char *keyWord, std::istream &is)
 Parses a data section from an input stream.
 
virtual bool parse (const tinyxml2::XMLElement *elem)
 Parses a data section from an XML document.
 
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...
 
- Public Member Functions inherited from SIMadmin
virtual ~SIMadmin ()
 Empty destructor.
 
virtual bool parse (char *keyWord, std::istream &is)
 Parses a data section from an input stream.
 
virtual bool preprocessC (const IntVec &, bool, double=0.0)
 Performs some pre-processing tasks on the FE model.
 
const ProcessAdmgetProcessAdm () const
 Returns the parallel process administrator.
 
int getGlobalProcessID () const
 Returns the global process ID. More...
 
const std::string & getHeading () const
 Returns the simulator heading.
 
void setHeading (const std::string &heading)
 Defines the simulator heading.
 
void printHeading (int &supStep) const
 Prints the heading of this simulator, if any, to IFEM::cout.
 
- Public Member Functions inherited from XMLInputBase
bool readXML (const char *fileName, bool verbose=true)
 Reads an XML input file. More...
 
bool loadXML (const char *xml)
 Loads data from an XML-formatted text string. More...
 
- Public Member Functions inherited from SIMdependency
virtual ~SIMdependency ()
 Empty destructor.
 
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 Attributes

std::vector< PlaneSolver * > m_planes
 Planar solvers.
 
- Protected Attributes inherited from SIMadmin
ProcessAdm adm
 Parallel administrator.
 
int myPid
 Processor ID in parallel simulations.
 
int nProc
 Number of processors in parallel simulations.
 
std::string myHeading
 Heading written before reading the input file.
 

Private Attributes

size_t startCtx
 Context for first plane on this process.
 
size_t planes
 Total number of planes.
 
size_t procs_per_plane
 Number of processes per plane.
 
int output_plane
 Plane to print to screen for (-1 for all)
 
char direction
 (Unoriented) normal direction of plane
 
std::string log_files
 Log file prefix for planes.
 
std::vector< int > planeNodes
 FSI nodes for all planes.
 
SetupProps props
 Setup properties to configure planar solvers.
 

Additional Inherited Members

- Public Attributes inherited from SIMadmin
SIMoptionsopt
 Simulation control parameters.
 
- Static Public Attributes inherited from SIMadmin
static int msgLevel = 2
 Controls the console output amount during solving.
 
- Protected Types inherited from SIMadmin
using IntVec = std::vector< int >
 Convenience alias.
 
- Protected Member Functions inherited from SIMadmin
 SIMadmin (const char *heading=nullptr)
 The default constructor initializes the process administrator.
 
 SIMadmin (SIMadmin &anotherSIM)
 Copy constructor.
 
- Protected Member Functions inherited from XMLInputBase
const tinyxml2::XMLElement * loadFile (tinyxml2::XMLDocument &doc, const char *fileName, bool verbose=false)
 Loads an XML input file into a tinyxml2::XMLDocument object. More...
 
virtual const char ** getPrioritizedTags () const
 Returns a list of prioritized XML-tags.
 
- Protected Member Functions inherited from SIMdependency
 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...
 

Detailed Description

template<class PlaneSolver>
class SIMSemi3D< PlaneSolver >

Driver class for plane-decoupled 3D problems.

Member Function Documentation

◆ parse()

template<class PlaneSolver >
bool SIMSemi3D< PlaneSolver >::parse ( const tinyxml2::XMLElement *  elem)
inlineoverridevirtual

◆ read()

template<class PlaneSolver >
bool SIMSemi3D< PlaneSolver >::read ( const char *  fileName)
inlineoverridevirtual

◆ registerDependency() [1/4]

template<class PlaneSolver >
void SIMdependency::registerDependency

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

◆ registerDependency() [2/4]

template<class PlaneSolver >
void SIMdependency::registerDependency

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

◆ registerDependency() [3/4]

template<class PlaneSolver >
void SIMdependency::registerDependency

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

◆ registerDependency() [4/4]

template<class PlaneSolver >
template<class T >
void SIMSemi3D< PlaneSolver >::registerDependency ( SIMSemi3D< T > *  sim,
const std::string &  name,
short int  nvc,
const PatchVec patches,
char  diffBasis = 0,
int  component = 0 
)
inline

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]diffBasisDifferent basis for the SIM class and the field
[in]componentComponent to use from field

References SIMSemi3D< PlaneSolver >::getPlane(), and SIMSemi3D< PlaneSolver >::m_planes.


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