tfel
Loading...
Searching...
No Matches
mfront::UserDefinedNonLinearSystemSolver Struct Reference

class for user defined non linear system solvers More...

#include </home/runner/work/tfel/tfel/mfront/include/MFront/UserDefinedNonLinearSystemSolver.hxx>

Inheritance diagram for mfront::UserDefinedNonLinearSystemSolver:
mfront::NonLinearSystemSolverBase mfront::AbstractNonLinearSystemSolver

Public Types

using DataMap = tfel::utilities::DataMap
Public Types inherited from mfront::AbstractNonLinearSystemSolver
using Hypothesis = tfel::material::ModellingHypothesis::Hypothesis
 a simple alias
using CxxTokenizer = tfel::utilities::CxxTokenizer
 a simple alias
using tokens_iterator = CxxTokenizer::TokensContainer::const_iterator
 a simple alias

Public Member Functions

 UserDefinedNonLinearSystemSolver (const DataMap &)
 constructor
bool usesJacobian () const override
bool usesJacobianInvert () const override
bool requiresNumericalJacobian () const override
bool allowsJacobianInitialisation () const override
bool allowsJacobianInvertInitialisation () const override
bool requiresJacobianToBeReinitialisedToIdentityAtEachIterations () const override
std::pair< bool, tokens_iterator > treatSpecificKeywords (BehaviourDescription &, const std::string &, const tokens_iterator, const tokens_iterator) override
 write the algorithm specific members
void completeVariableDeclaration (BehaviourDescription &) const override
 method called when all the user defined variables have been set.
void writeSpecificInitializeMethodPart (std::ostream &, const BehaviourDescription &, const Hypothesis) const override
 write algorithm specific initialisations This method may be used to initialise the jacobian to identity at the beginning of the computations (if the user did no provide an initialisation of the jacobian).
void writeSpecificMembers (std::ostream &, const BehaviourDescription &, const Hypothesis) const override
 write the algorithm specific members
std::string getExternalAlgorithmClassName (const BehaviourDescription &, const Hypothesis) const override
std::vector< std::string > getSpecificHeaders () const override
 ~UserDefinedNonLinearSystemSolver () override
 destructor
Public Member Functions inherited from mfront::NonLinearSystemSolverBase
std::vector< std::string > getReservedNames () const override
std::vector< std::string > getMemberNames () const override
void initializeNumericalParameters (std::ostream &, const BehaviourDescription &, const Hypothesis) const override
 initialize numerical parameters for the behaviour parameters
Public Member Functions inherited from mfront::AbstractNonLinearSystemSolver
virtual ~AbstractNonLinearSystemSolver ()
 destructor

Public Attributes

std::string class_name
 class implementing the non linear solver
std::string header_file
 path to the header file in which the non linear solver is implemented.
bool use_jacobian = true
bool use_jacobian_invert = false
bool requires_numerical_jacobian = false
bool allows_jacobian_initialisation = false
bool allows_jacobian_invert_initialisation = false
bool requires_jacobian_reinitialisation_to_identity_at_each_iterations

Additional Inherited Members

Static Public Member Functions inherited from mfront::NonLinearSystemSolverBase
static std::string buildExternalAlgorithmClassName (const BehaviourDescription &, const Hypothesis, const std::string &)
 brief build a suitable specialisation of the class implementing the algorithm.
static std::string getJacobianPart (const VariableDescription &, const VariableDescription &, const SupportedTypes::TypeSize &, const SupportedTypes::TypeSize &, const std::string &="this->jacobian", const std::string &="")
static void writeEvaluateNumericallyComputedBlocks (std::ostream &, const BehaviourDescription &, const Hypothesis)
static void writeComparisonToNumericalJacobian (std::ostream &, const BehaviourDescription &, const Hypothesis, const std::string &)
static void writeLimitsOnIncrementValues (std::ostream &, const BehaviourDescription &, const Hypothesis, const std::string &)
static void writeLimitsOnIncrementValuesBasedOnStateVariablesPhysicalBounds (std::ostream &, const BehaviourDescription &, const Hypothesis)
static void writeLimitsOnIncrementValuesBasedOnIntegrationVariablesIncrementsPhysicalBounds (std::ostream &, const BehaviourDescription &, const Hypothesis)
Protected Member Functions inherited from mfront::NonLinearSystemSolverBase
 ~NonLinearSystemSolverBase () override
 destructor

Detailed Description

class for user defined non linear system solvers

Member Function Documentation

◆ allowsJacobianInitialisation()

bool mfront::UserDefinedNonLinearSystemSolver::allowsJacobianInitialisation ( ) const
nodiscardoverridevirtual
Returns
true if the solver allows the user to initialize the jacobian.
Note
If the solver does not provide such initialisation, the jacobian could for example be initialised to identity in the behaviour constructor.

Implements mfront::AbstractNonLinearSystemSolver.

◆ allowsJacobianInvertInitialisation()

bool mfront::UserDefinedNonLinearSystemSolver::allowsJacobianInvertInitialisation ( ) const
nodiscardoverridevirtual
Returns
true if the solver allows the user to initialize the invert of the jacobian.
Note
If the solver does not provide such initialisation, the invert of the jacobian could for example be initialised to identity in the behaviour constructor.

Implements mfront::AbstractNonLinearSystemSolver.

◆ completeVariableDeclaration()

void mfront::UserDefinedNonLinearSystemSolver::completeVariableDeclaration ( BehaviourDescription & ) const
overridevirtual

method called when all the user defined variables have been set.

Parameters
[in,out]md: mechanical description

Implements mfront::AbstractNonLinearSystemSolver.

◆ getExternalAlgorithmClassName()

std::string mfront::UserDefinedNonLinearSystemSolver::getExternalAlgorithmClassName ( const BehaviourDescription & ,
const Hypothesis  ) const
nodiscardoverridevirtual
Returns
the name of the class implementing the external algorithm
Parameters
[in]bdbehaviour description
[in]hmodelling hypothesis

Implements mfront::AbstractNonLinearSystemSolver.

◆ getSpecificHeaders()

std::vector< std::string > mfront::UserDefinedNonLinearSystemSolver::getSpecificHeaders ( ) const
nodiscardoverridevirtual
Returns
the header to be included

Implements mfront::AbstractNonLinearSystemSolver.

◆ requiresJacobianToBeReinitialisedToIdentityAtEachIterations()

bool mfront::UserDefinedNonLinearSystemSolver::requiresJacobianToBeReinitialisedToIdentityAtEachIterations ( ) const
nodiscardoverridevirtual
Returns
true if the solver requires the jacobian to be initialized to the identity matrix at the beginning of the computeFdF method.

Implements mfront::AbstractNonLinearSystemSolver.

◆ requiresNumericalJacobian()

bool mfront::UserDefinedNonLinearSystemSolver::requiresNumericalJacobian ( ) const
nodiscardoverridevirtual
Returns
true if the solver requires a numerical jacobian

Implements mfront::AbstractNonLinearSystemSolver.

◆ treatSpecificKeywords()

std::pair< bool, tokens_iterator > mfront::UserDefinedNonLinearSystemSolver::treatSpecificKeywords ( BehaviourDescription & ,
const std::string & ,
const tokens_iterator ,
const tokens_iterator  )
nodiscardoverridevirtual

write the algorithm specific members

Parameters
[in,out]md: mechanical description
[in]key: keyword
[in]p: current position in file (after keyword)
[in]pe: end of file

Implements mfront::AbstractNonLinearSystemSolver.

◆ usesJacobian()

bool mfront::UserDefinedNonLinearSystemSolver::usesJacobian ( ) const
nodiscardoverridevirtual
Returns
true if the solver uses the jacobian of the system (Newton-Raphson solvers) or an approximation of it (Broyden method).d'

Implements mfront::AbstractNonLinearSystemSolver.

◆ usesJacobianInvert()

bool mfront::UserDefinedNonLinearSystemSolver::usesJacobianInvert ( ) const
nodiscardoverridevirtual
Returns
true if the solver uses the invert jacobian of the system or an approximation of it (second Broyden method).

Implements mfront::AbstractNonLinearSystemSolver.

◆ writeSpecificInitializeMethodPart()

void mfront::UserDefinedNonLinearSystemSolver::writeSpecificInitializeMethodPart ( std::ostream & ,
const BehaviourDescription & ,
const Hypothesis  ) const
overridevirtual

write algorithm specific initialisations This method may be used to initialise the jacobian to identity at the beginning of the computations (if the user did no provide an initialisation of the jacobian).

Parameters
[in]out: output file
[in]md: mechanical description
[in]h: modelling hypotheis

Implements mfront::AbstractNonLinearSystemSolver.

◆ writeSpecificMembers()

void mfront::UserDefinedNonLinearSystemSolver::writeSpecificMembers ( std::ostream & ,
const BehaviourDescription & ,
const Hypothesis  ) const
overridevirtual

write the algorithm specific members

Parameters
[in]out: output file
[in]md: mechanical description
[in]h: modelling hypotheis

Implements mfront::AbstractNonLinearSystemSolver.

Member Data Documentation

◆ requires_jacobian_reinitialisation_to_identity_at_each_iterations

bool mfront::UserDefinedNonLinearSystemSolver::requires_jacobian_reinitialisation_to_identity_at_each_iterations
Initial value:
=
true

The documentation for this struct was generated from the following file:
  • UserDefinedNonLinearSystemSolver.hxx