tfel
Loading...
Searching...
No Matches
mtest::NonLinearConstraint Struct Referencefinal

Impose a contraint on the driving variables. More...

#include </home/runner/work/tfel/tfel/mtest/include/MTest/NonLinearConstraint.hxx>

Inheritance diagram for mtest::NonLinearConstraint:
mtest::ConstraintBase mtest::Constraint mtest::ConstraintOptions

Public Types

enum  NormalisationPolicy { DRIVINGVARIABLECONSTRAINT , THERMODYNAMICFORCECONSTRAINT }
 define the normalisation policy More...

Public Member Functions

 NonLinearConstraint (const Behaviour &, const std::string &, const EvolutionManager &, const NormalisationPolicy)
NonLinearConstraint & operator= (const NonLinearConstraint &)=delete
NonLinearConstraint & operator= (NonLinearConstraint &&)=delete
unsigned short getNumberOfLagrangeMultipliers () const override
void setValues (tfel::math::matrix< real > &, tfel::math::vector< real > &, const tfel::math::vector< real > &, const tfel::math::vector< real > &, const tfel::math::matrix< real > &, const tfel::math::vector< real > &, const unsigned short, const unsigned short, const real, const real, const real) const override
 builds up the stiffness matrix and the residual.
bool checkConvergence (const tfel::math::vector< real > &, const tfel::math::vector< real > &, const real, const real, const real, const real) const override
std::string getFailedCriteriaDiagnostic (const tfel::math::vector< real > &, const tfel::math::vector< real > &, const real, const real, const real, const real) const override
 ~NonLinearConstraint () override
 destructor
Public Member Functions inherited from mtest::ConstraintBase
bool treatEvent (const std::string &) override
 treat the given event
void setActivatingEvents (const std::vector< std::string > &) override
 set the activating events
void setDesactivatingEvents (const std::vector< std::string > &) override
 set the desactivating events
void setActive (const bool) override
 activate or desactivate the constraint
bool isActive () const override
 ~ConstraintBase () override
 destructor
Public Member Functions inherited from mtest::Constraint
virtual ~Constraint ()
 destructor

Protected Member Functions

double eval (tfel::math::Evaluator &, const tfel::math::vector< real > &, const tfel::math::vector< real > &, const real, const real) const
 evaluate the constraint or one of its derivatives

Protected Attributes

std::shared_ptr< Constraint > c
 evaluation of the constraint
const Behaviour & b
 normalisation policy

Detailed Description

Impose a contraint on the driving variables.

Member Enumeration Documentation

◆ NormalisationPolicy

define the normalisation policy

Enumerator
DRIVINGVARIABLECONSTRAINT 

this policy assumes that the constraint is defined by a function which values are of the order of magnitude of the driving variables.

THERMODYNAMICFORCECONSTRAINT 

this policy assumes that the constraint is defined by a function which values are of the order of magnitude of the thermodynamic forces.

Constructor & Destructor Documentation

◆ NonLinearConstraint()

mtest::NonLinearConstraint::NonLinearConstraint ( const Behaviour & ,
const std::string & ,
const EvolutionManager & ,
const NormalisationPolicy  )

constructor

Parameters
[in]b_behaviour
[in]fanalytic defintion of the constraint
[in]evmevolution manager
[in]pnormalisation policy

Member Function Documentation

◆ checkConvergence()

bool mtest::NonLinearConstraint::checkConvergence ( const tfel::math::vector< real > & ,
const tfel::math::vector< real > & ,
const real ,
const real ,
const real ,
const real  ) const
nodiscardoverridevirtual
Parameters
[in]e: driving variables
[in]s: thermodynamic forces
[in]eeps: criterium value for driving variables
[in]seps: criterium value for thermodynamic forces
[in]t: beginning of the time step
[in]dt: time increment

Implements mtest::Constraint.

◆ eval()

double mtest::NonLinearConstraint::eval ( tfel::math::Evaluator & ,
const tfel::math::vector< real > & ,
const tfel::math::vector< real > & ,
const real ,
const real  ) const
nodiscardprotected

evaluate the constraint or one of its derivatives

Parameters
[in]ddriving variables
[in]sthermodynamic forces
[in]tbeginning of the time step
[in]dttime increment

◆ getFailedCriteriaDiagnostic()

std::string mtest::NonLinearConstraint::getFailedCriteriaDiagnostic ( const tfel::math::vector< real > & ,
const tfel::math::vector< real > & ,
const real ,
const real ,
const real ,
const real  ) const
nodiscardoverridevirtual
Parameters
[in]e: driving variables
[in]s: thermodynamic forces
[in]eeps: criterium value for driving variables
[in]seps: criterium value for thermodynamic forces
[in]t: beginning of the time step
[in]dt: time increment

Implements mtest::Constraint.

◆ getNumberOfLagrangeMultipliers()

unsigned short mtest::NonLinearConstraint::getNumberOfLagrangeMultipliers ( ) const
nodiscardoverridevirtual
Returns
the number of Lagrange Multipliers associated with this contraint

Implements mtest::Constraint.

◆ setValues()

void mtest::NonLinearConstraint::setValues ( tfel::math::matrix< real > & ,
tfel::math::vector< real > & ,
const tfel::math::vector< real > & ,
const tfel::math::vector< real > & ,
const tfel::math::matrix< real > & ,
const tfel::math::vector< real > & ,
const unsigned short ,
const unsigned short ,
const real ,
const real ,
const real  ) const
overridevirtual

builds up the stiffness matrix and the residual.

Parameters
[out]Kstiffness matrix
[out]rresidual vector
[in]u0value of the unknowns at the beginning of the time step
[in]u1current estimate of the unknowns
[in]u1current estimate of the unknowns
[in]kapproximation of the derivative of the thermodynamic force with respect to the driving variable, as returned by the mechanical behaviour.
[in]fthermodynamic forces.
[in]u1current estimate of the unknowns
[in]pposition of the first lagrange multiplier in the residual
[in]dspace dimension
[in]tbeginning of the time step
[in]dttime increment
[in]anormalisation factor

Implements mtest::Constraint.


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