GMatElastoPlasticQPot 0.18.3
Loading...
Searching...
No Matches
GMatElastoPlasticQPot::Cartesian2d::Elastic< N > Class Template Reference

Array of material points with a linear elastic constitutive response. More...

#include <GMatElastoPlasticQPot/Cartesian2d.h>

Inheritance diagram for GMatElastoPlasticQPot::Cartesian2d::Elastic< N >:
GMatTensor::Cartesian2d::Array< N > GMatElastoPlasticQPot::Cartesian2d::Cusp< N > GMatElastoPlasticQPot::Cartesian2d::Smooth< N >

Public Member Functions

template<class T >
 Elastic (const T &K, const T &G)
 Construct system. More...
 
const array_type::tensor< double, N > & K () const
 Bulk modulus per item. More...
 
const array_type::tensor< double, N > & G () const
 Shear modulus per item. More...
 
template<class T >
void set_Eps (const T &arg)
 Set strain tensors. More...
 
virtual void refresh (bool compute_tangent=true)
 Recompute stress from strain. More...
 
const array_type::tensor< double, N+2 > & Eps () const
 Strain tensor per item. More...
 
array_type::tensor< double, N+2 > & Eps ()
 Strain tensor per item. More...
 
const array_type::tensor< double, N+2 > & Sig () const
 Stress tensor per item. More...
 
const array_type::tensor< double, N+4 > & C () const
 Tangent tensor per item. More...
 
virtual array_type::tensor< double, N > energy () const
 Potential energy per item. More...
 
- Public Member Functions inherited from GMatTensor::Cartesian2d::Array< N >
 Array (const std::array< size_t, N > &shape)
 Constructor. More...
 
const std::array< size_t, N > & shape () const
 Shape of the array (of scalars). More...
 
const std::array< size_t, N+2 > & shape_tensor2 () const
 Shape of the array of second-order tensors. More...
 
const std::array< size_t, N+4 > & shape_tensor4 () const
 Shape of the array of fourth-order tensors. More...
 
array_type::tensor< double, N+2 > O2 () const
 Array of Cartesian2d::O2() More...
 
array_type::tensor< double, N+4 > O4 () const
 Array of Cartesian2d::O4() More...
 
array_type::tensor< double, N+2 > I2 () const
 Array of Cartesian2d::I2() More...
 
array_type::tensor< double, N+4 > II () const
 Array of Cartesian2d::II() More...
 
array_type::tensor< double, N+4 > I4 () const
 Array of Cartesian2d::I4() More...
 
array_type::tensor< double, N+4 > I4rt () const
 Array of Cartesian2d::I4rt() More...
 
array_type::tensor< double, N+4 > I4s () const
 Array of Cartesian2d::I4s() More...
 
array_type::tensor< double, N+4 > I4d () const
 Array of Cartesian2d::I4d() More...
 

Protected Member Functions

template<class T >
void init_Elastic (const T &K, const T &G)
 Constructor alias. More...
 
- Protected Member Functions inherited from GMatTensor::Cartesian2d::Array< N >
void init (const std::array< size_t, N > &shape)
 Constructor 'alias'. More...
 

Protected Attributes

array_type::tensor< double, N > m_K
 Bulk modulus per item. More...
 
array_type::tensor< double, N > m_G
 Shear modulus per item. More...
 
array_type::tensor< double, N+2 > m_Eps
 Strain tensor per item. More...
 
array_type::tensor< double, N+2 > m_Sig
 Stress tensor per item. More...
 
array_type::tensor< double, N+4 > m_C
 Tangent per item. More...
 
- Protected Attributes inherited from GMatTensor::Cartesian2d::Array< N >
size_t m_size
 Size of the array (of scalars) == prod(m_shape). More...
 
std::array< size_t, N > m_shape
 Shape of the array (of scalars). More...
 
std::array< size_t, N+2 > m_shape_tensor2
 Shape of an array of 2nd-order tensors == [m_shape, 2, 2]. More...
 
std::array< size_t, N+4 > m_shape_tensor4
 Shape of an array of 4th-order tensors == [m_shape, 2, 2, 2, 2]. More...
 

Additional Inherited Members

- Static Public Attributes inherited from GMatTensor::Cartesian2d::Array< N >
static constexpr std::size_t rank = N
 Rank of the array (the actual rank is increased with the tensor-rank). More...
 
- Static Protected Attributes inherited from GMatTensor::Cartesian2d::Array< N >
static constexpr size_t m_ndim = 2
 Number of dimensions of tensors. More...
 
static constexpr size_t m_stride_tensor2 = 4
 Storage stride for 2nd-order tensors ( \( 2^2 \)). More...
 
static constexpr size_t m_stride_tensor4 = 16
 Storage stride for 4th-order tensors ( \( 2^4 \)). More...
 

Detailed Description

template<size_t N>
class GMatElastoPlasticQPot::Cartesian2d::Elastic< N >

Array of material points with a linear elastic constitutive response.

Template Parameters
NRank of the array.

Definition at line 122 of file Cartesian2d.h.

Constructor & Destructor Documentation

◆ Elastic()

template<size_t N>
template<class T >
GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::Elastic ( const T &  K,
const T &  G 
)
inline

Construct system.

Parameters
KBulk modulus per item.
GShear modulus per item.

Definition at line 149 of file Cartesian2d.h.

Member Function Documentation

◆ C()

template<size_t N>
const array_type::tensor< double, N+4 > & GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::C ( ) const
inline

Tangent tensor per item.

Returns
[shape(), 3, 3, 3, 3].

Definition at line 300 of file Cartesian2d.h.

◆ energy()

template<size_t N>
virtual array_type::tensor< double, N > GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::energy ( ) const
inlinevirtual

Potential energy per item.

Returns
[shape()].

Reimplemented in GMatElastoPlasticQPot::Cartesian2d::Cusp< N >, and GMatElastoPlasticQPot::Cartesian2d::Smooth< N >.

Definition at line 309 of file Cartesian2d.h.

◆ Eps() [1/2]

template<size_t N>
array_type::tensor< double, N+2 > & GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::Eps ( )
inline

Strain tensor per item.

The user is responsible for calling refresh() after modifying entries.

Returns
[shape(), 3, 3].

Definition at line 282 of file Cartesian2d.h.

◆ Eps() [2/2]

template<size_t N>
const array_type::tensor< double, N+2 > & GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::Eps ( ) const
inline

Strain tensor per item.

Returns
[shape(), 3, 3].

Definition at line 272 of file Cartesian2d.h.

◆ G()

template<size_t N>
const array_type::tensor< double, N > & GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::G ( ) const
inline

Shear modulus per item.

Returns
[shape()].

Definition at line 206 of file Cartesian2d.h.

◆ init_Elastic()

template<size_t N>
template<class T >
void GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::init_Elastic ( const T &  K,
const T &  G 
)
inlineprotected

Constructor alias.

Parameters
KBulk modulus per item.
GShear modulus per item.

Definition at line 161 of file Cartesian2d.h.

◆ K()

template<size_t N>
const array_type::tensor< double, N > & GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::K ( ) const
inline

Bulk modulus per item.

Returns
[shape()].

Definition at line 197 of file Cartesian2d.h.

◆ refresh()

template<size_t N>
virtual void GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::refresh ( bool  compute_tangent = true)
inlinevirtual

Recompute stress from strain.

From C++, this function need never be called: the API takes care of this.

For Python, this function should only be called when you modify elements of Eps(). For example

mat.Eps[e, q, 0, 1] = value
...
mat.refresh() # "Eps" was changed without "mat" knowing

Instead, if you write an nd-array, the API takes care of the refresh. I.e.

mat.Eps = new_Eps
# no further action needed, "mat" was refreshed

Note though that you can call this function as often as you like, you will only loose time.

Parameters
compute_tangentIrrelevant, ignored.

Reimplemented in GMatElastoPlasticQPot::Cartesian2d::Cusp< N >, and GMatElastoPlasticQPot::Cartesian2d::Smooth< N >.

Definition at line 246 of file Cartesian2d.h.

◆ set_Eps()

template<size_t N>
template<class T >
void GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::set_Eps ( const T &  arg)
inline

Set strain tensors.

Internally, this calls refresh() to update stress.

Template Parameters
Te.g. array_type::tensor<double, N + 2>
Parameters
argStrain tensor per item [shape(), 3, 3].

Definition at line 218 of file Cartesian2d.h.

◆ Sig()

template<size_t N>
const array_type::tensor< double, N+2 > & GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::Sig ( ) const
inline

Stress tensor per item.

Returns
[shape(), 3, 3].

Definition at line 291 of file Cartesian2d.h.

Member Data Documentation

◆ m_C

template<size_t N>
array_type::tensor<double, N + 4> GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::m_C
protected

Tangent per item.

Definition at line 128 of file Cartesian2d.h.

◆ m_Eps

template<size_t N>
array_type::tensor<double, N + 2> GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::m_Eps
protected

Strain tensor per item.

Definition at line 126 of file Cartesian2d.h.

◆ m_G

template<size_t N>
array_type::tensor<double, N> GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::m_G
protected

Shear modulus per item.

Definition at line 125 of file Cartesian2d.h.

◆ m_K

template<size_t N>
array_type::tensor<double, N> GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::m_K
protected

Bulk modulus per item.

Definition at line 124 of file Cartesian2d.h.

◆ m_Sig

template<size_t N>
array_type::tensor<double, N + 2> GMatElastoPlasticQPot::Cartesian2d::Elastic< N >::m_Sig
protected

Stress tensor per item.

Definition at line 127 of file Cartesian2d.h.


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