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

Adaptive simulator driver using the ISolver interface. More...

#include <SIMSolverAdap.h>

Inheritance diagram for AdaptiveISolver< T1, SolutionTransfer >:
Inheritance graph
[legend]
Collaboration diagram for AdaptiveISolver< T1, SolutionTransfer >:
Collaboration graph
[legend]

Public Member Functions

 AdaptiveISolver (T1 &sim, bool sa)
 The constructor forwards to the parent class constructor.
 
bool adaptMesh (int iStep, std::streamsize outPrec=0)
 Refines the current mesh based on the element norms. More...
 
- Public Member Functions inherited from AdaptiveSIM
 AdaptiveSIM (SIMoutput &sim, bool sa=true)
 The constructor initializes default adaptation parameters. More...
 
virtual ~AdaptiveSIM ()
 Empty destructor.
 
bool initAdaptor (size_t normGroup=0)
 Initializes the projs and prefix arrays. More...
 
bool solveStep (const char *inputfile, int iStep, bool withRF=false, std::streamsize precision=6)
 Assembles and solves the linear FE equations on current mesh. More...
 
bool adaptMesh (int iStep, std::streamsize outPrec=0)
 Refines the current mesh based on the element norms. More...
 
bool adaptMesh (int iStep, Vectors &sol, std::streamsize outPrec=0)
 Refines the current mesh based on the element norms. More...
 
bool writeGlv (const char *infile, int iStep)
 Writes current mesh and results to the VTF-file. More...
 
const VectorgetSolution (size_t idx=0) const
 Accesses the solution of the linear system.
 
const VectorgetProjection (size_t idx=0) const
 Accesses the projections.
 
const VectorsgetProjections () const
 Access all the projections.
 
const MatrixgetEnorm () const
 Access the calculated element-wise norms.
 
virtual bool parse (char *keyWord, std::istream &is)
 Parses a data section from an input stream. More...
 
virtual bool parse (const tinyxml2::XMLElement *elem)
 Parses a data section from an XML document. More...
 
virtual bool preprocessC (const IntVec &ignored, bool fixDup, double time0)
 Performs some pre-processing tasks on the FE model. More...
 
- Public Member Functions inherited from SIMadmin
virtual ~SIMadmin ()
 Empty destructor.
 
virtual bool read (const char *fileName)
 Reads model data from the specified input file *fileName.
 
virtual bool preprocess (const IntVec &ignored={}, bool fixDup=false)
 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 AdaptiveSetup
 AdaptiveSetup (SIMoutput &sim, bool sa=true)
 The constructor initializes default adaptation parameters. More...
 
virtual ~AdaptiveSetup ()
 Empty destructor.
 
void setAdaptationNorm (size_t g, size_t i=0)
 Sets the norm group/index of the norm to base mesh adaptation on.
 
bool initPrm (size_t normGroup)
 Initializes the norm group parameters. More...
 
int calcRefinement (LR::RefineData &prm, int iStep, const Vectors &gNorm, const Vector &refIn, int currDofs=-1) const
 Calculates mesh refinement control data based on error estimates. More...
 
bool parse (char *keyWord, std::istream &is)
 Parses a data section from an input stream. More...
 
bool parse (const tinyxml2::XMLElement *elem)
 Parses a data section from an XML document. More...
 
void printNorms (const Vectors &gNorm, const Vectors &dNorm, const Matrix &eNorm, size_t w=36, bool printModelNorms=true) const
 Prints out global norms to the log stream. More...
 
bool writeMesh (int iStep) const
 Dumps current mesh to external file(s) for inspection. More...
 
size_t eIdx () const
 Returns the row-index of the element norm to use for adaptation.
 

Protected Member Functions

virtual void prepareAdapt ()
 Hook for preparation steps before mesh adaptation.
 
virtual void prepareSolutionTransfer ()
 Hook for preparation steps before solution transfer.
 
bool assembleAndSolveSystem () override
 Assembles and solves the linearized FE equation system.
 
bool savePoints (int iStep) const override
 Saves point results to output file for a given refinement step. More...
 
- 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 Attributes

T1model
 Reference to the actual sim.
 
Vectors transfered
 Transfered solutions.
 
- Protected Attributes inherited from AdaptiveSIM
Vectors solution
 All solutions (including Galerkin projections)
 
- 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.
 
- Protected Attributes inherited from AdaptiveSetup
SIMoutputmodel
 The isogeometric FE model.
 
size_t adaptor
 Norm group to base the mesh adaptation on.
 
size_t adNorm
 Which norm to base the mesh adaptation on.
 
size_t eRow
 Row-index in eNorm of the norm to use for adaptation.
 
double rCond
 Actual reciprocal condition number of the last mesh.
 

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.
 

Detailed Description

template<class T1, bool SolutionTransfer = false>
class AdaptiveISolver< T1, SolutionTransfer >

Adaptive simulator driver using the ISolver interface.

Member Function Documentation

◆ adaptMesh()

template<class T1 , bool SolutionTransfer = false>
bool AdaptiveISolver< T1, SolutionTransfer >::adaptMesh ( int  iStep,
std::streamsize  outPrec = 0 
)
inline

Refines the current mesh based on the element norms.

Parameters
[in]iStepRefinement step counter
[in]outPrecNumber of digits after the decimal point in norm print

References AdaptiveSIM::adaptMesh(), AdaptiveISolver< T1, SolutionTransfer >::prepareAdapt(), AdaptiveSIM::solution, and AdaptiveISolver< T1, SolutionTransfer >::transfered.

◆ savePoints()

template<class T1 , bool SolutionTransfer = false>
bool AdaptiveISolver< T1, SolutionTransfer >::savePoints ( int  iStep) const
inlineoverrideprotectedvirtual

Saves point results to output file for a given refinement step.

Parameters
[in]iStepRefinement step counter

Reimplemented from AdaptiveSIM.

References AdaptiveISolver< T1, SolutionTransfer >::model.


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