tfel
Loading...
Searching...
No Matches
mtest::SchemeBase Struct Referenceabstract
Inheritance diagram for mtest::SchemeBase:
mtest::Scheme mtest::Study tfel::tests::Test mtest::SingleStructureScheme mtest::MTest mtest::PipeTest tfel::utilities::MTestDocParser

Public Types

enum  OutputFrequency { USERDEFINEDTIMES , EVERYPERIOD }
using ModellingHypothesis = tfel::material::ModellingHypothesis
 a simple alias
using Hypothesis = ModellingHypothesis::Hypothesis
 a simple alias
using EvolutionPtr = std::shared_ptr<Evolution>
 a simple alias
using BehaviourType
 a simple alias
using Kinematic = tfel::material::MechanicalBehaviourBase::Kinematic
 a simple alias
Public Types inherited from mtest::Study
using size_type = tfel::math::vector<real>::size_type
 a simple alias

Public Member Functions

 SchemeBase ()
 constructor
 SchemeBase (SchemeBase &&)=delete
 move constructor
 SchemeBase (const SchemeBase &)=delete
 copy constructor
SchemeBase & operator= (SchemeBase &&)=delete
 move assignement
SchemeBase & operator= (const SchemeBase &)=delete
 standard assignement
void setModellingHypothesis (const std::string &) override
virtual void setTimes (const std::vector< real > &)
virtual void setOutputFileName (const std::string &)
 set the output file
virtual bool isOutputFileNameDefined () const
virtual void setOutputFilePrecision (const unsigned int)
 set the output file precision
virtual void setResidualFileName (const std::string &)
 set the residual file
virtual bool isResidualFileNameDefined () const
virtual void setXMLOutputFileName (const std::string &)
 set the residual file
virtual bool isXMLOutputFileNameDefined () const
virtual std::string getXMLOutputFileName () const
virtual void setResidualFilePrecision (const unsigned int)
 set the residual file precision
const EvolutionManager & getEvolutions () const
virtual void addEvolution (const std::string &, const EvolutionPtr, const bool, const bool)
 add a new evolution
virtual void setEvolutionValue (const std::string &, const real, const real)
 set evolution value for a given time
virtual void setDescription (const std::string &)
 set the description
virtual void setAuthor (const std::string &)
 set the author
virtual void setDate (const std::string &)
 set the date
virtual void setOutputFrequency (const OutputFrequency)
 set the output frequency
virtual void setDynamicTimeStepScaling (const bool)
 set the maximal time step
virtual void setMaximalTimeStep (const real)
 set the maximal time step
virtual void setMinimalTimeStep (const real)
 set the minimal time step
virtual void setMaximalTimeStepScalingFactor (const real)
 set the maximal time step scaling factor
virtual void setMinimalTimeStepScalingFactor (const real)
 set the minimal time step scaling factor
virtual void setMaximumNumberOfIterations (const unsigned int)
virtual void setMaximumNumberOfSubSteps (const unsigned int)
virtual unsigned short getDimension () const
virtual ModellingHypothesis::Hypothesis getModellingHypothesis () const
virtual void setStiffnessUpdatingPolicy (const StiffnessUpdatingPolicy)
 set the stiffness updating policy
virtual void setPredictionPolicy (const PredictionPolicy)
 set the prediction policy
virtual void setStiffnessMatrixType (const StiffnessMatrixType)
 set the stiffness matrix type
virtual void setUseCastemAccelerationAlgorithm (const bool)
 set the use of the castem acceleration algorithm
virtual void setAccelerationAlgorithm (const std::string &)
 set the acceleration algorithm to be used
virtual void setAccelerationAlgorithmParameter (const std::string &, const std::string &)
 set a parameter of the acceleration algorithm
virtual void setCastemAccelerationTrigger (const int)
 set at which iteration the use of the castem acceleration algorithm will begin
virtual void setCastemAccelerationPeriod (const int)
 set at which period the use of the castem acceleration algorithm will take place
virtual void resetOutputFile ()
 close and reopen the output files
virtual void completeInitialisation ()
 ~SchemeBase () override
 destructor
Public Member Functions inherited from mtest::Scheme
 ~Scheme () override
 desctructor
Public Member Functions inherited from tfel::tests::Test
virtual std::string name () const =0
virtual std::string classname () const =0
virtual TestResult execute ()=0
 execute test
virtual ~Test ()
 destructor
Public Member Functions inherited from mtest::Study
virtual size_type getNumberOfUnknowns () const =0
virtual void initializeCurrentState (StudyCurrentState &) const =0
 initialize the current state
virtual void initializeWorkSpace (SolverWorkSpace &) const =0
 initialize the workspace
virtual std::pair< bool, real > prepare (StudyCurrentState &, const real, const real) const =0
 update current state at the beginning of a new time step:
virtual void makeLinearPrediction (StudyCurrentState &, const real) const =0
 make a linear prediction of the unknows and state
virtual bool doPackagingStep (StudyCurrentState &) const =0
 perform the computation of the packaging step
virtual std::pair< bool, real > computePredictionStiffnessAndResidual (StudyCurrentState &, tfel::math::matrix< real > &, tfel::math::vector< real > &, const real &, const real &, const StiffnessMatrixType) const =0
 compute the stiffness matrix and the residual
virtual std::pair< bool, real > computeStiffnessMatrixAndResidual (StudyCurrentState &, tfel::math::matrix< real > &, tfel::math::vector< real > &, const real, const real, const StiffnessMatrixType) const =0
 compute the stiffness matrix and the residual
virtual real getErrorNorm (const tfel::math::vector< real > &) const =0
virtual bool checkConvergence (StudyCurrentState &, const tfel::math::vector< real > &, const tfel::math::vector< real > &, const SolverOptions &, const unsigned int, const real, const real) const =0
virtual std::vector< std::string > getFailedCriteriaDiagnostic (const StudyCurrentState &, const tfel::math::vector< real > &, const tfel::math::vector< real > &, const SolverOptions &, const real, const real) const =0
virtual void computeLoadingCorrection (StudyCurrentState &, SolverWorkSpace &, const SolverOptions &, const real, const real) const =0
virtual bool postConvergence (StudyCurrentState &, const real, const real, const unsigned int) const =0
virtual void printOutput (const real, const StudyCurrentState &, const bool) const =0
 print usefull information in the output file
virtual void setDefaultModellingHypothesis ()=0
 set the modelling hypothesis to the default one
virtual ~Study ()
 destructor

Protected Member Functions

virtual StiffnessMatrixType getDefaultStiffnessMatrixType () const =0
void declareVariable (const std::string &, const bool)
 declare a new variable
void declareVariables (const std::vector< std::string > &, const bool)
 declare a list of new variables
Protected Member Functions inherited from mtest::Study
virtual void setGaussPointPositionForEvolutionsEvaluation (const CurrentState &) const =0
 set the position of the Gauss point in the evolution manager

Protected Attributes

std::vector< std::string > vnames
 declared variable names
bool initialisationFinished = false
 initilisation stage
SolverOptions options
 solver options
std::vector< real > times
 times
std::string description
 description of the test
std::string author
 author
std::string date
 date
ModellingHypothesis::Hypothesis hypothesis
 modelling hypothesis
std::shared_ptr< EvolutionManager > evm
 list of evolutions
std::string output
 output file name
std::ofstream out
 output file
std::string residualFileName
 residual file name
std::string xmlFileName
 xml file name
std::ofstream residual
OutputFrequency output_frequency = USERDEFINEDTIMES
 output frequency
int oprec = -1
 output file precision
int rprec = -1
 residual file precision

Member Typedef Documentation

◆ BehaviourType

Member Function Documentation

◆ addEvolution()

virtual void mtest::SchemeBase::addEvolution ( const std::string & ,
const EvolutionPtr ,
const bool ,
const bool  )
virtual

add a new evolution

Parameters
[in]n: evolution name
[in]p: evolution pointer
[in]b1: declare the variable.
[in]b2: check if the evolution already exists.
Note
if b1 is false, we check that the variable is already declared. Otherwise, an exeception is thrown.
if b2 is true and the evolution already exists, an exeception is thrown.

◆ completeInitialisation()

virtual void mtest::SchemeBase::completeInitialisation ( )
virtual

complete the initialisation. This method must be called once.

Note
this method must be called by the derived class.

Reimplemented in mtest::MTest, mtest::PipeTest, and mtest::SingleStructureScheme.

◆ declareVariable()

void mtest::SchemeBase::declareVariable ( const std::string & ,
const bool  )
protected

declare a new variable

Parameters
[in]v: variable name

◆ declareVariables()

void mtest::SchemeBase::declareVariables ( const std::vector< std::string > & ,
const bool  )
protected

declare a list of new variables

Parameters
[in]v: variable names

◆ getDefaultStiffnessMatrixType()

virtual StiffnessMatrixType mtest::SchemeBase::getDefaultStiffnessMatrixType ( ) const
protectedpure virtual
Returns
the default stiffness matrix type

Implemented in mtest::SingleStructureScheme.

◆ getDimension()

virtual unsigned short mtest::SchemeBase::getDimension ( ) const
virtual
Returns
the dimension

◆ getEvolutions()

const EvolutionManager & mtest::SchemeBase::getEvolutions ( ) const
Returns
the list of evolutions

◆ getModellingHypothesis()

virtual ModellingHypothesis::Hypothesis mtest::SchemeBase::getModellingHypothesis ( ) const
virtual
Returns
the modelling hypothesis

◆ getXMLOutputFileName()

virtual std::string mtest::SchemeBase::getXMLOutputFileName ( ) const
virtual
Returns
true if the residual file name has been defined

◆ isOutputFileNameDefined()

virtual bool mtest::SchemeBase::isOutputFileNameDefined ( ) const
virtual
Returns
true if the output file name has been defined

◆ isResidualFileNameDefined()

virtual bool mtest::SchemeBase::isResidualFileNameDefined ( ) const
virtual
Returns
true if the residual file name has been defined

◆ isXMLOutputFileNameDefined()

virtual bool mtest::SchemeBase::isXMLOutputFileNameDefined ( ) const
virtual
Returns
true if the residual file name has been defined

◆ setAccelerationAlgorithm()

virtual void mtest::SchemeBase::setAccelerationAlgorithm ( const std::string & )
virtual

set the acceleration algorithm to be used

Parameters
[in]a: acceleration algorithm

◆ setAccelerationAlgorithmParameter()

virtual void mtest::SchemeBase::setAccelerationAlgorithmParameter ( const std::string & ,
const std::string &  )
virtual

set a parameter of the acceleration algorithm

Parameters
[in]p: parameter name
[in]v: parameter value

◆ setAuthor()

virtual void mtest::SchemeBase::setAuthor ( const std::string & )
virtual

set the author

Parameters
[in]a: author

◆ setCastemAccelerationPeriod()

virtual void mtest::SchemeBase::setCastemAccelerationPeriod ( const int )
virtual

set at which period the use of the castem acceleration algorithm will take place

Parameters
[in]p: period

◆ setCastemAccelerationTrigger()

virtual void mtest::SchemeBase::setCastemAccelerationTrigger ( const int )
virtual

set at which iteration the use of the castem acceleration algorithm will begin

Parameters
[in]i: iteration number

◆ setDate()

virtual void mtest::SchemeBase::setDate ( const std::string & )
virtual

set the date

Parameters
[in]d: date

◆ setDescription()

virtual void mtest::SchemeBase::setDescription ( const std::string & )
virtual

set the description

Parameters
[in]d: description

◆ setDynamicTimeStepScaling()

virtual void mtest::SchemeBase::setDynamicTimeStepScaling ( const bool )
virtual

set the maximal time step

Parameters
[in]v: value

◆ setEvolutionValue()

virtual void mtest::SchemeBase::setEvolutionValue ( const std::string & ,
const real ,
const real  )
virtual

set evolution value for a given time

Parameters
[in]n: evolution name
[in]t: time
[in]v: value
Note
the evolution must be of type LPIEvolution

◆ setMaximalTimeStep()

virtual void mtest::SchemeBase::setMaximalTimeStep ( const real )
virtual

set the maximal time step

Parameters
[in]v: value

◆ setMaximalTimeStepScalingFactor()

virtual void mtest::SchemeBase::setMaximalTimeStepScalingFactor ( const real )
virtual

set the maximal time step scaling factor

Parameters
[in]v: value

◆ setMinimalTimeStep()

virtual void mtest::SchemeBase::setMinimalTimeStep ( const real )
virtual

set the minimal time step

Parameters
[in]v: value

◆ setMinimalTimeStepScalingFactor()

virtual void mtest::SchemeBase::setMinimalTimeStepScalingFactor ( const real )
virtual

set the minimal time step scaling factor

Parameters
[in]v: value

◆ setModellingHypothesis()

void mtest::SchemeBase::setModellingHypothesis ( const std::string & )
overridevirtual
Parameters
[in]h: modelling hypothesis

Implements mtest::Study.

◆ setOutputFileName()

virtual void mtest::SchemeBase::setOutputFileName ( const std::string & )
virtual

set the output file

Parameters
[in]f: file name

◆ setOutputFilePrecision()

virtual void mtest::SchemeBase::setOutputFilePrecision ( const unsigned int )
virtual

set the output file precision

Parameters
[in]p: precision

◆ setOutputFrequency()

virtual void mtest::SchemeBase::setOutputFrequency ( const OutputFrequency )
virtual

set the output frequency

Parameters
[in]ooutput frequency

◆ setPredictionPolicy()

virtual void mtest::SchemeBase::setPredictionPolicy ( const PredictionPolicy )
virtual

set the prediction policy

Parameters
[in]p: prediction policy

◆ setResidualFileName()

virtual void mtest::SchemeBase::setResidualFileName ( const std::string & )
virtual

set the residual file

Parameters
[in]f: file name

◆ setResidualFilePrecision()

virtual void mtest::SchemeBase::setResidualFilePrecision ( const unsigned int )
virtual

set the residual file precision

Parameters
[in]p: precision

◆ setStiffnessMatrixType()

virtual void mtest::SchemeBase::setStiffnessMatrixType ( const StiffnessMatrixType )
virtual

set the stiffness matrix type

Parameters
[in]k: stiffness matrix type

◆ setStiffnessUpdatingPolicy()

virtual void mtest::SchemeBase::setStiffnessUpdatingPolicy ( const StiffnessUpdatingPolicy )
virtual

set the stiffness updating policy

Parameters
[in]b: boolean

◆ setTimes()

virtual void mtest::SchemeBase::setTimes ( const std::vector< real > & )
virtual
Parameters
[in]t: times

◆ setUseCastemAccelerationAlgorithm()

virtual void mtest::SchemeBase::setUseCastemAccelerationAlgorithm ( const bool )
virtual

set the use of the castem acceleration algorithm

Parameters
[in]b: boolean

◆ setXMLOutputFileName()

virtual void mtest::SchemeBase::setXMLOutputFileName ( const std::string & )
virtual

set the residual file

Parameters
[in]f: file name

Member Data Documentation

◆ hypothesis

ModellingHypothesis::Hypothesis mtest::SchemeBase::hypothesis
protected
Initial value:
=
ModellingHypothesis::UNDEFINEDHYPOTHESIS

modelling hypothesis

◆ residual

std::ofstream mtest::SchemeBase::residual
mutableprotected

file where residuals evolutions as a function of the iteration number are saved


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