tfel
Loading...
Searching...
No Matches
Integrate.hxx File Reference
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include "TFEL/Raise.hxx"
#include "TFEL/Math/General/IEEE754.hxx"
#include "TFEL/Math/t2tot2.hxx"
#include "TFEL/Math/t2tost2.hxx"
#include "TFEL/Math/st2tost2.hxx"
#include "TFEL/Material/OutOfBoundsPolicy.hxx"
#include "TFEL/Material/MechanicalBehaviourTraits.hxx"
#include "TFEL/Material/FiniteStrainBehaviourTangentOperator.hxx"
#include "MFront/GenericBehaviour/Types.hxx"
#include "MFront/GenericBehaviour/BehaviourData.h"

Classes

struct  mfront::gb::InternalEnergyComputer
 structure in charge of calling the computeInternalEnergy method More...
struct  mfront::gb::DissipatedEnergyComputer
 structure in charge of calling the computeDissipatedEnergy method More...
struct  mfront::gb::DoNothingEnergyComputer
 place holder for tag dispatching More...

Namespaces

namespace  mfront
 This namespace contains material used to build the MFront code generator.

Typedefs

using mfront::gb::FiniteStrainTangentOperator
 a simple alias

Enumerations

enum struct  mfront::gb::StressMeasure { PK1 , PK2 , CAUCHY , INVALID_STRESS_MEASURE }
 enumeration of the stress measure supported by the generic behaviour interface for finite strain behaviours More...

Functions

StressMeasure mfront::gb::getStressMeasure (const real *const K)
FiniteStrainTangentOperator mfront::gb::getTangentOperator (const real *const K)
template<typename StressType>
void mfront::gb::exportTangentOperator (tfel::math::base_type< StressType > *const v, const StressType K)
 export the tangent operator used by some generic behaviours.
template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator (tfel::math::base_type< StressType > *const v, const tfel::math::tvector< N, StressType > &K)
 export the tangent operator used by some generic behaviours.
template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator (tfel::math::base_type< StressType > *const v, const tfel::math::tmatrix< N, N, StressType > &K)
 export the tangent operator used by cohesive zone models.
template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator (tfel::math::base_type< StressType > *const v, const tfel::math::t2tost2< N, StressType > &K)
 export the tangent operator used by some generic behaviours.
template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator (tfel::math::base_type< StressType > *const v, const tfel::math::t2tot2< N, StressType > &K)
 export the tangent operator used by some generic behaviours.
template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator (tfel::math::base_type< StressType > *const v, const tfel::math::st2tost2< N, StressType > &K)
 export the tangent operator used by standard small strain behaviours.
template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator (tfel::math::base_type< StressType > *const v, const tfel::material::FiniteStrainBehaviourTangentOperator< N, StressType > &K)
 export the tangent operator used by finite strain strain behaviours.
template<typename Behaviour>
int mfront::gb::computePredictionOperator (Behaviour &b, mfront_gb_BehaviourData &d, const typename Behaviour::SMFlag f)
 compute the prediction operator
void mfront::gb::reportError (mfront_gb_BehaviourData &d, const char *const e)
 a simple function to report errors
void mfront::gb::reportFailureByException (mfront_gb_BehaviourData &d)
 a simple function to report integration failure when an exception is thrown.
template<typename Behaviour>
int mfront::gb::integrate (mfront_gb_BehaviourData &d, const typename Behaviour::SMFlag f, const tfel::material::OutOfBoundsPolicy p)
 integrate the behaviour over a time step
template<typename Behaviour, void(Behaviour::*)(const real *const) m>
int mfront::gb::executeInitializeFunction (mfront_gb_BehaviourData &d, const real *const initialize_variables, const tfel::material::OutOfBoundsPolicy p)
 execute the given post-processing
template<typename Behaviour, void(Behaviour::*)(real *const, const typename Behaviour::BehaviourData &) m, const bool use_initial_state>
int mfront::gb::executePostProcessing (real *const post_processing_variables, mfront_gb_BehaviourData &d, const tfel::material::OutOfBoundsPolicy p)
 execute the given post-processing

Detailed Description

Author
Thomas Helfer
Date
03/07/2018

Typedef Documentation

◆ FiniteStrainTangentOperator

Enumeration Type Documentation

◆ StressMeasure

enum struct mfront::gb::StressMeasure
strong

enumeration of the stress measure supported by the generic behaviour interface for finite strain behaviours

Enumerator
PK1 

First Piola-Kirchhoff stress.

PK2 

Second Piola-Kirchhoff stress.

CAUCHY 

Cauchy stress.

INVALID_STRESS_MEASURE 

invalid value

Function Documentation

◆ computePredictionOperator()

template<typename Behaviour>
int mfront::gb::computePredictionOperator ( Behaviour & b,
mfront_gb_BehaviourData & d,
const typename Behaviour::SMFlag f )

compute the prediction operator

Template Parameters
Behaviourclass implementing the behaviour
Parameters
[in,out]bbehaviour
[in,out]dbehaviour data
[in,out]smflagconsistent tangent operator expected

◆ executeInitializeFunction()

template<typename Behaviour, void(Behaviour::*)(const real *const) m>
int mfront::gb::executeInitializeFunction ( mfront_gb_BehaviourData & d,
const real *const initialize_variables,
const tfel::material::OutOfBoundsPolicy p )

execute the given post-processing

Template Parameters
Behaviourclass describing the post-processing.
mmethod implementing the post-processing.
Parameters
[out]post_processing_variablespointer to the values of the post-processing variables.
[in]dbehaviour data.
[in]pout of bounds policy.

◆ executePostProcessing()

template<typename Behaviour, void(Behaviour::*)(real *const, const typename Behaviour::BehaviourData &) m, const bool use_initial_state>
int mfront::gb::executePostProcessing ( real *const post_processing_variables,
mfront_gb_BehaviourData & d,
const tfel::material::OutOfBoundsPolicy p )

execute the given post-processing

Template Parameters
Behaviourclass describing the post-processing.
mmethod implementing the post-processing.
use_initial_stateboolean stating if the postprocessing uses the initial state of the material.
Parameters
[out]post_processing_variablespointer to the values of the post-processing variables.
[in]dbehaviour data.
[in]pout of bounds policy.

◆ exportTangentOperator() [1/7]

template<typename StressType>
void mfront::gb::exportTangentOperator ( tfel::math::base_type< StressType > *const v,
const StressType K )

export the tangent operator used by some generic behaviours.

Template Parameters
StressTypenumeric type used
Parameters
[out]vexported values
[in]Kcomputed tangent operator

◆ exportTangentOperator() [2/7]

template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator ( tfel::math::base_type< StressType > *const v,
const tfel::material::FiniteStrainBehaviourTangentOperator< N, StressType > & K )

export the tangent operator used by finite strain strain behaviours.

Template Parameters
StressTypenumeric type used
Nspace dimension
Parameters
[out]vexported values
[in]Kcomputed tangent operator

◆ exportTangentOperator() [3/7]

template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator ( tfel::math::base_type< StressType > *const v,
const tfel::math::st2tost2< N, StressType > & K )

export the tangent operator used by standard small strain behaviours.

Template Parameters
StressTypenumeric type used
Nspace dimension
Parameters
[out]vexported values
[in]Kcomputed tangent operator

◆ exportTangentOperator() [4/7]

template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator ( tfel::math::base_type< StressType > *const v,
const tfel::math::t2tost2< N, StressType > & K )

export the tangent operator used by some generic behaviours.

Template Parameters
StressTypenumeric type used
Nspace dimension
Parameters
[out]vexported values
[in]Kcomputed tangent operator

◆ exportTangentOperator() [5/7]

template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator ( tfel::math::base_type< StressType > *const v,
const tfel::math::t2tot2< N, StressType > & K )

export the tangent operator used by some generic behaviours.

Template Parameters
StressTypenumeric type used
Nspace dimension
Parameters
[out]vexported values
[in]Kcomputed tangent operator

◆ exportTangentOperator() [6/7]

template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator ( tfel::math::base_type< StressType > *const v,
const tfel::math::tmatrix< N, N, StressType > & K )

export the tangent operator used by cohesive zone models.

Template Parameters
StressTypenumeric type used
Nspace dimension
Parameters
[out]vexported values
[in]Kcomputed tangent operator

◆ exportTangentOperator() [7/7]

template<typename StressType, unsigned short N>
void mfront::gb::exportTangentOperator ( tfel::math::base_type< StressType > *const v,
const tfel::math::tvector< N, StressType > & K )

export the tangent operator used by some generic behaviours.

Template Parameters
StressTypenumeric type used
Nsize of the array containing the tangent operator
Parameters
[out]vexported values
[in]Kcomputed tangent operator

◆ getStressMeasure()

StressMeasure mfront::gb::getStressMeasure ( const real *const K)
inline
Returns
the stress measure selected by the caller of the behaviour for finite strain behaviours.
Parameters
[in]Kinitial values of the consistent tangent operator.

◆ getTangentOperator()

FiniteStrainTangentOperator mfront::gb::getTangentOperator ( const real *const K)
inline
Returns
the tangent operator selected by the caller of the behaviour for finite strain behaviours.
Parameters
[in]Kinitial values of the consistent tangent operator.
Note
FiniteStrainTangentOperator::C_TRUESDELL is returned to signal an error.

◆ integrate()

template<typename Behaviour>
int mfront::gb::integrate ( mfront_gb_BehaviourData & d,
const typename Behaviour::SMFlag f,
const tfel::material::OutOfBoundsPolicy p )

integrate the behaviour over a time step

Template Parameters
Behaviourclass implementing the behaviour
Parameters
[in,out]dbehaviour data
[in]fchoice of consistent tangent operator
[in]pout of bounds policy

◆ reportError()

void mfront::gb::reportError ( mfront_gb_BehaviourData & d,
const char *const e )
inline

a simple function to report errors

Parameters
[in]dbehaviour data
[in]eerror message

◆ reportFailureByException()

void mfront::gb::reportFailureByException ( mfront_gb_BehaviourData & d)
inline

a simple function to report integration failure when an exception is thrown.

Parameters
[in]dbehaviour data