musica (C++)
Loading...
Searching...
No Matches
constitutive Namespace Reference

helper functions for mathematical operations More...

Classes

struct  CachedMatrix33
struct  CachedScalar
struct  CachedTensor2
struct  CachedVariable
struct  CachedVector3
struct  CachedVector6
struct  ConstitutiveModelBase
 Base class for constitutive models. More...
struct  DebugVariable
struct  ElastoplasticModelBase
struct  FabricTensor
 Fabric tensor for the directional density function. More...
struct  FabricTensorChanged
struct  Load
 Load. More...
struct  LoadPhase
 load phase More...
struct  MaterialBase
 Material properties. More...
struct  Options
 Options for constitutive models. More...
struct  Scalar
struct  StateVariable
 State variables for constitutive models. More...
struct  Tensor2
 Class for the 2nd-order tensor (3, 3) representation. More...
struct  Vector

Functions

template<typename T>
auto butcherTableau (int n, T alpha, T beta, const std::string &fourth_order_type="classic")
 Construct Butcher tableau for the Runge-Kutta method, a[i, j] = 0 for j >= i, c[0] = 0.
template auto butcherTableau (int n, float alpha, float beta, const std::string &fourth_order_type)
template auto butcherTableau (int n, double alpha, double beta, const std::string &fourth_order_type)
template<typename T>
Eigen::Matrix< T, 3, 3 > orthogonalDirection (const Eigen::Matrix< T, 3, 3 > &F, const Eigen::Matrix< T, 3, 3 > &n)
 Orthogonal direction.
template Eigen::Matrix< float, 3, 3 > orthogonalDirection (const Eigen::Matrix< float, 3, 3 > &F, const Eigen::Matrix< float, 3, 3 > &n)
template Eigen::Matrix< double, 3, 3 > orthogonalDirection (const Eigen::Matrix< double, 3, 3 > &F, const Eigen::Matrix< double, 3, 3 > &n)
template<typename T>
Eigen::Matrix< T, 3, 3 > nonCoaxialDirection (const Eigen::Matrix< T, 3, 3 > &F, const Eigen::Matrix< T, 3, 3 > &n, const Eigen::Matrix< T, 3, 3 > &m)
 Non-coaxial direction.
template Eigen::Matrix< float, 3, 3 > nonCoaxialDirection (const Eigen::Matrix< float, 3, 3 > &F, const Eigen::Matrix< float, 3, 3 > &n, const Eigen::Matrix< float, 3, 3 > &m)
template Eigen::Matrix< double, 3, 3 > nonCoaxialDirection (const Eigen::Matrix< double, 3, 3 > &F, const Eigen::Matrix< double, 3, 3 > &n, const Eigen::Matrix< double, 3, 3 > &m)
template<typename T>
Tensor2< T > operator+ (const T &scalar, const Tensor2< T > &tensor)
 Add a tensor to a scalar.
template Tensor2< float > operator+ (const float &scalar, const Tensor2< float > &tensor)
template Tensor2< double > operator+ (const double &scalar, const Tensor2< double > &tensor)
template<typename T>
Tensor2< T > operator+ (const Eigen::Matrix< T, 3, 3 > &matrix, const Tensor2< T > &tensor)
 Add a matrix to a tensor.
template Tensor2< float > operator+ (const Eigen::Matrix< float, 3, 3 > &matrix, const Tensor2< float > &tensor)
template Tensor2< double > operator+ (const Eigen::Matrix< double, 3, 3 > &matrix, const Tensor2< double > &tensor)
template<typename T>
Tensor2< T > operator- (const T &scalar, const Tensor2< T > &tensor)
 Subtract a tensor from a scalar.
template Tensor2< float > operator- (const float &scalar, const Tensor2< float > &tensor)
template Tensor2< double > operator- (const double &scalar, const Tensor2< double > &tensor)
template<typename T>
Tensor2< T > operator- (const Eigen::Matrix< T, 3, 3 > &matrix, const Tensor2< T > &tensor)
 Subtract a tensor from a matrix.
template Tensor2< float > operator- (const Eigen::Matrix< float, 3, 3 > &matrix, const Tensor2< float > &tensor)
template Tensor2< double > operator- (const Eigen::Matrix< double, 3, 3 > &matrix, const Tensor2< double > &tensor)
template<typename T>
Tensor2< T > operator* (const Eigen::Matrix< T, 3, 3 > &matrix, const Tensor2< T > &tensor)
 Multiply a tensor by a matrix.
template Tensor2< float > operator* (const Eigen::Matrix< float, 3, 3 > &matrix, const Tensor2< float > &tensor)
template Tensor2< double > operator* (const Eigen::Matrix< double, 3, 3 > &matrix, const Tensor2< double > &tensor)
template<typename T>
Eigen::Matrix< T, 1, 3 > operator* (const Eigen::Matrix< T, 1, 3 > &vector, const Tensor2< T > &tensor)
 Multiply a tensor by a vector.
template Eigen::Matrix< float, 1, 3 > operator* (const Eigen::Matrix< float, 1, 3 > &vector, const Tensor2< float > &tensor)
template Eigen::Matrix< double, 1, 3 > operator* (const Eigen::Matrix< double, 1, 3 > &vector, const Tensor2< double > &tensor)
template<typename T>
Tensor2< T > operator* (const T &scalar, const Tensor2< T > &tensor)
 Multiply a tensor by a scalar.
template Tensor2< float > operator* (const float &scalar, const Tensor2< float > &tensor)
template Tensor2< double > operator* (const double &scalar, const Tensor2< double > &tensor)
template<typename T>
Eigen::Matrix< T, 3, 3 > vec2mat (const Eigen::Matrix< T, 6, 1 > &vector)
 Convert a 6x1 vector to a 3x3 matrix.
template Eigen::Matrix< float, 3, 3 > vec2mat (const Eigen::Matrix< float, 6, 1 > &vector)
template Eigen::Matrix< double, 3, 3 > vec2mat (const Eigen::Matrix< double, 6, 1 > &vector)
template<typename T>
Eigen::Matrix< T, 6, 1 > mat2vec (const Eigen::Matrix< T, 3, 3 > &matrix)
 Convert a 3x3 matrix to a 6x1 vector.
template Eigen::Matrix< float, 6, 1 > mat2vec (const Eigen::Matrix< float, 3, 3 > &matrix)
template Eigen::Matrix< double, 6, 1 > mat2vec (const Eigen::Matrix< double, 3, 3 > &matrix)
template<typename T>
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > ignoreDistractions (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > data, const T &ignored_value=0.0, const T &tol=1e-15)
 Ignore data distractions.
template Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > ignoreDistractions (Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > data, const float &ignored_value, const float &tol)
template Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > ignoreDistractions (Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > data, const double &ignored_value, const double &tol)
std::vector< std::string > split (const std::string &string, const std::string &delimiter)
 Split a string by a delimiter.

Detailed Description

helper functions for mathematical operations

Function Documentation

◆ butcherTableau() [1/3]

template auto constitutive::butcherTableau ( int n,
double alpha,
double beta,
const std::string & fourth_order_type )

References butcherTableau().

Here is the call graph for this function:

◆ butcherTableau() [2/3]

template auto constitutive::butcherTableau ( int n,
float alpha,
float beta,
const std::string & fourth_order_type )

References butcherTableau().

Here is the call graph for this function:

◆ butcherTableau() [3/3]

template<typename T>
auto constitutive::butcherTableau ( int n,
T alpha,
T beta,
const std::string & fourth_order_type = "classic" )

Construct Butcher tableau for the Runge-Kutta method, a[i, j] = 0 for j >= i, c[0] = 0.

Parameters
nOrder of the Runge-Kutta method, only 1, 2, 3, and 4 are supported.
alphaParameter for 2nd- and 3rd-order Runge-Kutta methods
betaParameter for 2nd- and 3rd-order Runge-Kutta methods
fourth_order_typeType of fourth-order Runge-Kutta method, only 'classic', '3/8-rule', and 'ralston' are supported.
Returns
Butcher tableau (a, b, c)

References butcherTableau().

Referenced by butcherTableau(), butcherTableau(), butcherTableau(), and constitutive::ElastoplasticModelBase< T >::RKn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ignoreDistractions() [1/3]

template Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > constitutive::ignoreDistractions ( Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > data,
const double & ignored_value,
const double & tol )

References ignoreDistractions().

Here is the call graph for this function:

◆ ignoreDistractions() [2/3]

template Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > constitutive::ignoreDistractions ( Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > data,
const float & ignored_value,
const float & tol )

References ignoreDistractions().

Here is the call graph for this function:

◆ ignoreDistractions() [3/3]

template<typename T>
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > constitutive::ignoreDistractions ( Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > data,
const T & ignored_value = 0.0,
const T & tol = 1e-15 )

Ignore data distractions.

Parameters
dataA 2D matrix
ignored_valueThe value to be set for distractions
tolThe tolerance
Returns
A 2D matrix

References ignoreDistractions().

Referenced by ignoreDistractions(), ignoreDistractions(), ignoreDistractions(), and micromechanical::ChangHicher< T >::stressStrainIntegrate1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mat2vec() [1/3]

template Eigen::Matrix< double, 6, 1 > constitutive::mat2vec ( const Eigen::Matrix< double, 3, 3 > & matrix)

References mat2vec().

Here is the call graph for this function:

◆ mat2vec() [2/3]

template Eigen::Matrix< float, 6, 1 > constitutive::mat2vec ( const Eigen::Matrix< float, 3, 3 > & matrix)

References mat2vec().

Here is the call graph for this function:

◆ mat2vec() [3/3]

◆ nonCoaxialDirection() [1/3]

template Eigen::Matrix< double, 3, 3 > constitutive::nonCoaxialDirection ( const Eigen::Matrix< double, 3, 3 > & F,
const Eigen::Matrix< double, 3, 3 > & n,
const Eigen::Matrix< double, 3, 3 > & m )

References nonCoaxialDirection().

Here is the call graph for this function:

◆ nonCoaxialDirection() [2/3]

template Eigen::Matrix< float, 3, 3 > constitutive::nonCoaxialDirection ( const Eigen::Matrix< float, 3, 3 > & F,
const Eigen::Matrix< float, 3, 3 > & n,
const Eigen::Matrix< float, 3, 3 > & m )

References nonCoaxialDirection().

Here is the call graph for this function:

◆ nonCoaxialDirection() [3/3]

template<typename T>
Eigen::Matrix< T, 3, 3 > constitutive::nonCoaxialDirection ( const Eigen::Matrix< T, 3, 3 > & F,
const Eigen::Matrix< T, 3, 3 > & n,
const Eigen::Matrix< T, 3, 3 > & m )

Non-coaxial direction.

References nonCoaxialDirection().

Referenced by constitutive::FabricTensor< T >::evolve(), constitutive::ElastoplasticModelBase< T >::nonCoaxialDirection(), nonCoaxialDirection(), nonCoaxialDirection(), and nonCoaxialDirection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*() [1/9]

template Tensor2< double > constitutive::operator* ( const double & scalar,
const Tensor2< double > & tensor )

References operator*().

Here is the call graph for this function:

◆ operator*() [2/9]

template Eigen::Matrix< double, 1, 3 > constitutive::operator* ( const Eigen::Matrix< double, 1, 3 > & vector,
const Tensor2< double > & tensor )

References operator*().

Here is the call graph for this function:

◆ operator*() [3/9]

template Tensor2< double > constitutive::operator* ( const Eigen::Matrix< double, 3, 3 > & matrix,
const Tensor2< double > & tensor )

References operator*().

Here is the call graph for this function:

◆ operator*() [4/9]

template Eigen::Matrix< float, 1, 3 > constitutive::operator* ( const Eigen::Matrix< float, 1, 3 > & vector,
const Tensor2< float > & tensor )

References operator*().

Here is the call graph for this function:

◆ operator*() [5/9]

template Tensor2< float > constitutive::operator* ( const Eigen::Matrix< float, 3, 3 > & matrix,
const Tensor2< float > & tensor )

References operator*().

Here is the call graph for this function:

◆ operator*() [6/9]

template<typename T>
Eigen::Matrix< T, 1, 3 > constitutive::operator* ( const Eigen::Matrix< T, 1, 3 > & vector,
const Tensor2< T > & tensor )

Multiply a tensor by a vector.

Parameters
vectorVector to be multiplied.
tensorTensor to be multiplied.
Returns
Product of the vector and the tensor.

References constitutive::Tensor2< T >::matrix, and operator*().

Here is the call graph for this function:

◆ operator*() [7/9]

template<typename T>
Tensor2< T > constitutive::operator* ( const Eigen::Matrix< T, 3, 3 > & matrix,
const Tensor2< T > & tensor )

Multiply a tensor by a matrix.

Parameters
matrixMatrix to be multiplied.
tensorTensor to be multiplied.
Returns
Product of the matrix and the tensor.

References constitutive::Tensor2< T >::matrix, operator*(), and constitutive::Tensor2< T >::Tensor2().

Referenced by operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), and operator*().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*() [8/9]

template Tensor2< float > constitutive::operator* ( const float & scalar,
const Tensor2< float > & tensor )

References operator*().

Here is the call graph for this function:

◆ operator*() [9/9]

template<typename T>
Tensor2< T > constitutive::operator* ( const T & scalar,
const Tensor2< T > & tensor )

Multiply a tensor by a scalar.

Parameters
scalarScalar to be multiplied.
tensorTensor to be multiplied.
Returns
Product of the scalar and the tensor.

References constitutive::Tensor2< T >::matrix, operator*(), and constitutive::Tensor2< T >::Tensor2().

Here is the call graph for this function:

◆ operator+() [1/6]

template Tensor2< double > constitutive::operator+ ( const double & scalar,
const Tensor2< double > & tensor )

References operator+().

Here is the call graph for this function:

◆ operator+() [2/6]

template Tensor2< double > constitutive::operator+ ( const Eigen::Matrix< double, 3, 3 > & matrix,
const Tensor2< double > & tensor )

References operator+().

Here is the call graph for this function:

◆ operator+() [3/6]

template Tensor2< float > constitutive::operator+ ( const Eigen::Matrix< float, 3, 3 > & matrix,
const Tensor2< float > & tensor )

References operator+().

Here is the call graph for this function:

◆ operator+() [4/6]

template<typename T>
Tensor2< T > constitutive::operator+ ( const Eigen::Matrix< T, 3, 3 > & matrix,
const Tensor2< T > & tensor )

Add a matrix to a tensor.

Parameters
matrixMatrix to be added.
tensorTensor to be added.
Returns
Sum of the matrix and the tensor.

References constitutive::Tensor2< T >::matrix, operator+(), and constitutive::Tensor2< T >::Tensor2().

Here is the call graph for this function:

◆ operator+() [5/6]

template Tensor2< float > constitutive::operator+ ( const float & scalar,
const Tensor2< float > & tensor )

References operator+().

Here is the call graph for this function:

◆ operator+() [6/6]

template<typename T>
Tensor2< T > constitutive::operator+ ( const T & scalar,
const Tensor2< T > & tensor )

Add a tensor to a scalar.

Parameters
scalarScalar to be added.
tensorTensor to be added.
Returns
Sum of the scalar and the tensor.

References constitutive::Tensor2< T >::matrix, operator+(), and constitutive::Tensor2< T >::Tensor2().

Referenced by operator+(), operator+(), operator+(), operator+(), operator+(), and operator+().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator-() [1/6]

template Tensor2< double > constitutive::operator- ( const double & scalar,
const Tensor2< double > & tensor )

References operator-().

Here is the call graph for this function:

◆ operator-() [2/6]

template Tensor2< double > constitutive::operator- ( const Eigen::Matrix< double, 3, 3 > & matrix,
const Tensor2< double > & tensor )

References operator-().

Here is the call graph for this function:

◆ operator-() [3/6]

template Tensor2< float > constitutive::operator- ( const Eigen::Matrix< float, 3, 3 > & matrix,
const Tensor2< float > & tensor )

References operator-().

Here is the call graph for this function:

◆ operator-() [4/6]

template<typename T>
Tensor2< T > constitutive::operator- ( const Eigen::Matrix< T, 3, 3 > & matrix,
const Tensor2< T > & tensor )

Subtract a tensor from a matrix.

Parameters
matrixMatrix to be subtracted.
tensorTensor to be subtracted.
Returns
Difference of the matrix and the tensor.

References constitutive::Tensor2< T >::matrix, operator-(), and constitutive::Tensor2< T >::Tensor2().

Here is the call graph for this function:

◆ operator-() [5/6]

template Tensor2< float > constitutive::operator- ( const float & scalar,
const Tensor2< float > & tensor )

References operator-().

Here is the call graph for this function:

◆ operator-() [6/6]

template<typename T>
Tensor2< T > constitutive::operator- ( const T & scalar,
const Tensor2< T > & tensor )

Subtract a tensor from a scalar.

Parameters
scalarScalar to be subtracted.
tensorTensor to be subtracted.
Returns
Difference of the scalar and the tensor.

References constitutive::Tensor2< T >::matrix, operator-(), and constitutive::Tensor2< T >::Tensor2().

Referenced by operator-(), operator-(), operator-(), operator-(), operator-(), and operator-().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ orthogonalDirection() [1/3]

template Eigen::Matrix< double, 3, 3 > constitutive::orthogonalDirection ( const Eigen::Matrix< double, 3, 3 > & F,
const Eigen::Matrix< double, 3, 3 > & n )

References orthogonalDirection().

Here is the call graph for this function:

◆ orthogonalDirection() [2/3]

template Eigen::Matrix< float, 3, 3 > constitutive::orthogonalDirection ( const Eigen::Matrix< float, 3, 3 > & F,
const Eigen::Matrix< float, 3, 3 > & n )

References orthogonalDirection().

Here is the call graph for this function:

◆ orthogonalDirection() [3/3]

template<typename T>
Eigen::Matrix< T, 3, 3 > constitutive::orthogonalDirection ( const Eigen::Matrix< T, 3, 3 > & F,
const Eigen::Matrix< T, 3, 3 > & n )

Orthogonal direction.

References orthogonalDirection().

Referenced by constitutive::FabricTensor< T >::evolve(), constitutive::ElastoplasticModelBase< T >::orthogonalDirection(), orthogonalDirection(), orthogonalDirection(), and orthogonalDirection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split()

std::vector< std::string > constitutive::split ( const std::string & string,
const std::string & delimiter )
inline

Split a string by a delimiter.

Parameters
stringstring to split
delimiterdelimiter
Returns
vector of strings

References split().

Referenced by constitutive::FabricTensor< T >::evolve(), constitutive::FabricTensor< T >::requiresEvolution(), constitutive::FabricTensor< T >::setupDefaultParameters(), and split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vec2mat() [1/3]

template Eigen::Matrix< double, 3, 3 > constitutive::vec2mat ( const Eigen::Matrix< double, 6, 1 > & vector)

References vec2mat().

Here is the call graph for this function:

◆ vec2mat() [2/3]

template Eigen::Matrix< float, 3, 3 > constitutive::vec2mat ( const Eigen::Matrix< float, 6, 1 > & vector)

References vec2mat().

Here is the call graph for this function:

◆ vec2mat() [3/3]