NEML2 2.0.0
Loading...
Searching...
No Matches
SSR4 Class Reference

The symmetric fourth order tensor, with symmetry in the first two dimensionss as well as in the last two dimensions. More...

Detailed Description

The symmetric fourth order tensor, with symmetry in the first two dimensionss as well as in the last two dimensions.

Mandel notation is used, and so the storage space is (6, 6).

#include <SSR4.h>

Inheritance diagram for SSR4:

Public Member Functions

 SSR4 (const R4 &T)
 Initialize with the symmetrized fourth order tensor.
 
SSR4 rotate (const Rot &r) const
 Rotate.
 
DTensor< SSR4, Rot, neml2::Tensordrotate (const Rot &r) const
 Derivative of the rotated tensor w.r.t. the Rodrigues vector.
 
DTensor< SSR4, SSR4, neml2::Tensordrotate_self (const Rot &r) const
 Derivative of the rotated tensor w.r.t. itself.
 
Scalar operator() (Size i, Size j, Size k, Size l) const
 Accessor.
 
SSR4 transpose_minor () const
 Transpose minor axes, no-op.
 
SSR4 transpose_major () const
 Transpose major axes.
 
- Public Member Functions inherited from PrimitiveTensor< SSR4, 6, 6 >
 PrimitiveTensor ()=default
 Special member functions.
 
 PrimitiveTensor (const ATensor &tensor, Size intmd_dim)
 Construct from an ATensor and infer dynamic shape.
 
 PrimitiveTensor (const ATensor &tensor, Size dynamic_dim, Size intmd_dim)
 Construct from an ATensor and extract dynamic shape given dynamic dimension.
 
 PrimitiveTensor (const ATensor &tensor, const TraceableTensorShape &dynamic_shape, Size intmd_dim)
 Construct from an ATensor given dynamic shape.
 
 PrimitiveTensor (const TensorBase< Derived2 > &tensor)
 Copy constructor.
 
 operator neml2::Tensor () const
 Implicit conversion to a Tensor (discards information on the fixed base shape)
 
Scalar operator() (Args... i) const
 Single-element accessor.
 
- Public Member Functions inherited from TensorBase< SSR4 >
 TensorBase ()=default
 Default constructor.
 
 TensorBase (const ATensor &tensor, Size dynamic_dim, Size intmd_dim)
 Construct from an ATensor with given dynamic dimension.
 
 TensorBase (const ATensor &tensor, TraceableTensorShape dynamic_shape, Size intmd_dim)
 Construct from an ATensor with given dynamic shape.
 
 TensorBase (const TensorBase< Derived2 > &tensor)
 Copy constructor.
 
 TensorBase (double)=delete
 
 TensorBase (float)=delete
 
 TensorBase (int)=delete
 
SSR4 variable_data () const
 Variable data without function graph.
 
SSR4 contiguous () const
 
SSR4 clone () const
 Clone (take ownership)
 
SSR4 detach () const
 Discard function graph.
 
SSR4 to (const TensorOptions &options) const
 Change tensor options.
 
SSR4 operator- () const
 Negation.
 
Size batch_dim () const
 
Size base_dim () const
 
Size dynamic_dim () const
 
Size static_dim () const
 
Size intmd_dim () const
 
TraceableTensorShape batch_sizes () const
 
TensorShapeRef base_sizes () const
 
const TraceableTensorShapedynamic_sizes () const
 
TensorShapeRef static_sizes () const
 
TensorShapeRef intmd_sizes () const
 
TraceableSize batch_size (Size i) const
 
Size base_size (Size i) const
 
const TraceableSizedynamic_size (Size i) const
 
Size static_size (Size i) const
 
Size intmd_size (Size i) const
 
SSR4 dynamic_index (indexing::TensorIndicesRef indices) const
 
SSR4 intmd_index (indexing::TensorIndicesRef indices) const
 
neml2::Tensor base_index (indexing::TensorIndicesRef indices) const
 
SSR4 dynamic_slice (Size d, const indexing::Slice &index) const
 
SSR4 intmd_slice (Size d, const indexing::Slice &index) const
 
neml2::Tensor base_slice (Size d, const indexing::Slice &index) const
 
void dynamic_index_put_ (indexing::TensorIndicesRef indices, const ATensor &other)
 
void dynamic_index_put_ (indexing::TensorIndicesRef indices, const CScalar &v)
 
void intmd_index_put_ (indexing::TensorIndicesRef indices, const ATensor &other)
 
void intmd_index_put_ (indexing::TensorIndicesRef indices, const CScalar &v)
 
void base_index_put_ (indexing::TensorIndicesRef indices, const ATensor &other)
 
void base_index_put_ (indexing::TensorIndicesRef indices, const CScalar &v)
 
SSR4 dynamic_expand (const TraceableTensorShape &shape) const
 
SSR4 intmd_expand (TensorShapeRef shape) const
 
neml2::Tensor base_expand (TensorShapeRef shape) const
 
SSR4 batch_expand (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape) const
 
neml2::Tensor static_expand (TensorShapeRef intmd_shape, TensorShapeRef base_shape) const
 
SSR4 dynamic_expand (const TraceableSize &size, Size d) const
 
SSR4 intmd_expand (Size size, Size d) const
 
neml2::Tensor base_expand (Size size, Size d) const
 
SSR4 dynamic_expand_as (const neml2::Tensor &other) const
 
SSR4 intmd_expand_as (const neml2::Tensor &other) const
 
neml2::Tensor base_expand_as (const neml2::Tensor &other) const
 
SSR4 batch_expand_as (const neml2::Tensor &other) const
 
neml2::Tensor static_expand_as (const neml2::Tensor &other) const
 
SSR4 dynamic_reshape (const TraceableTensorShape &shape) const
 
SSR4 intmd_reshape (TensorShapeRef shape) const
 
neml2::Tensor base_reshape (TensorShapeRef shape) const
 
SSR4 batch_reshape (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape) const
 
neml2::Tensor static_reshape (TensorShapeRef intmd_shape, TensorShapeRef base_shape) const
 
SSR4 dynamic_squeeze (Size d) const
 
SSR4 intmd_squeeze (Size d) const
 
neml2::Tensor base_squeeze (Size d) const
 
SSR4 dynamic_unsqueeze (Size d, Size n=1) const
 
SSR4 intmd_unsqueeze (Size d, Size n=1) const
 
neml2::Tensor base_unsqueeze (Size d, Size n=1) const
 
SSR4 dynamic_transpose (Size d1, Size d2) const
 
SSR4 intmd_transpose (Size d1, Size d2) const
 
neml2::Tensor base_transpose (Size d1, Size d2) const
 
SSR4 dynamic_movedim (Size old_dim, Size new_dim) const
 
SSR4 intmd_movedim (Size old_dim, Size new_dim) const
 
neml2::Tensor base_movedim (Size old_dim, Size new_dim) const
 
SSR4 dynamic_flatten () const
 
SSR4 intmd_flatten () const
 
neml2::Tensor base_flatten () const
 
SSR4 batch_flatten () const
 Flatten batch dimensions.
 
neml2::Tensor static_flatten () const
 Flatten static dimensions.
 

Static Public Member Functions

static SSR4 identity (const TensorOptions &options=default_tensor_options())
 Create the identity tensor \(\delta_{ij}\delta_{kl}\).
 
static SSR4 identity_sym (const TensorOptions &options=default_tensor_options())
 Create the symmetric identity tensor \(\delta_{ik}\delta_{jl}/2 + \delta_{il}\delta_{jk}/2\).
 
static SSR4 identity_vol (const TensorOptions &options=default_tensor_options())
 Create the volumetric identity tensor \(\delta_{ij}\delta_{kl}/3\).
 
static SSR4 identity_dev (const TensorOptions &options=default_tensor_options())
 Create the deviatoric identity tensor \(\delta_{ik}\delta_{jl}/2 + \delta_{il}\delta_{jk}/2 - \delta_{ij}\delta_{kl}/3\).
 
static SSR4 identity_C1 (const TensorOptions &options=default_tensor_options())
 Building block for C1 constant.
 
static SSR4 identity_C2 (const TensorOptions &options=default_tensor_options())
 Building block for C2 constant.
 
static SSR4 identity_C3 (const TensorOptions &options=default_tensor_options())
 Building block for C3 constant.
 
static SSR4 isotropic_E_nu (const Scalar &E, const Scalar &nu)
 Create the fourth order elasticity tensor given the Young's modulus and the Poisson's ratio.
 
static SSR4 isotropic_E_nu (const double &E, const double &nu, const TensorOptions &options=default_tensor_options())
 Create the fourth order elasticity tensor given the Young's modulus and the Poisson's ratio.
 
static SSR4 fill_C1_C2_C3 (const Scalar &C1, const Scalar &C2, const Scalar &C3)
 Create the fourth order elasticity tensor given the three non-zero coefficients.
 
static SSR4 fill_C1_C2_C3 (const double &C1, const double &C2, const double &C3, const TensorOptions &options=default_tensor_options())
 Create the fourth order elasticity tensor given the three non-zero coefficients.
 
- Static Public Member Functions inherited from PrimitiveTensor< SSR4, 6, 6 >
static SSR4 create (const TensorDataContainer &data, Size intmd_dim=0, const TensorOptions &options=default_tensor_options())
 Arbitrary tensor from a nested container with inferred batch dimension.
 
static SSR4 einsum (c10::string_view equation, TensorList tensors)
 Einstein summation along base dimensions.
 
static SSR4 empty (const TensorOptions &options=default_tensor_options())
 
static SSR4 empty (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape={}, const TensorOptions &options=default_tensor_options())
 
static SSR4 zeros (const TensorOptions &options=default_tensor_options())
 
static SSR4 zeros (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape={}, const TensorOptions &options=default_tensor_options())
 
static SSR4 ones (const TensorOptions &options=default_tensor_options())
 
static SSR4 ones (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape={}, const TensorOptions &options=default_tensor_options())
 
static SSR4 full (const CScalar &init, const TensorOptions &options=default_tensor_options())
 
static SSR4 full (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape, const CScalar &init, const TensorOptions &options=default_tensor_options())
 
static SSR4 rand (const TensorOptions &options=default_tensor_options())
 
static SSR4 rand (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape, const TensorOptions &options=default_tensor_options())
 
static SSR4 fill (Args &&... args)
 
- Static Public Member Functions inherited from TensorBase< SSR4 >
static SSR4 empty_like (const SSR4 &other)
 
static SSR4 zeros_like (const SSR4 &other)
 Zero tensor like another, i.e. same batch and base shapes, same tensor options, etc.
 
static SSR4 ones_like (const SSR4 &other)
 Unit tensor like another, i.e. same batch and base shapes, same tensor options, etc.
 
static SSR4 full_like (const SSR4 &other, const CScalar &init)
 
static SSR4 rand_like (const SSR4 &other)
 

Additional Inherited Members

- Public Types inherited from PrimitiveTensor< SSR4, 6, 6 >
using base_sizes_sequence
 Base shape sequence.
 
- Static Public Attributes inherited from PrimitiveTensor< SSR4, 6, 6 >
static const TensorShape const_base_sizes
 The base shape.
 
static constexpr Size const_base_dim
 The base dim.
 
static constexpr Size const_base_numel
 The base numel.
 
- Protected Member Functions inherited from PrimitiveTensor< SSR4, 6, 6 >
void validate_shapes_and_dims () const
 Validate shapes and dimensions.
 
- Protected Member Functions inherited from TensorBase< SSR4 >
void validate_shapes_and_dims () const
 Validate shapes and dimensions.
 

Constructor & Destructor Documentation

◆ SSR4()

SSR4 ( const R4 & T)

Initialize with the symmetrized fourth order tensor.

Member Function Documentation

◆ drotate()

DTensor< SSR4, Rot, neml2::Tensor > drotate ( const Rot & r) const

Derivative of the rotated tensor w.r.t. the Rodrigues vector.

◆ drotate_self()

DTensor< SSR4, SSR4, neml2::Tensor > drotate_self ( const Rot & r) const

Derivative of the rotated tensor w.r.t. itself.

◆ fill_C1_C2_C3() [1/2]

SSR4 fill_C1_C2_C3 ( const double & C1,
const double & C2,
const double & C3,
const TensorOptions & options = default_tensor_options() )
static

Create the fourth order elasticity tensor given the three non-zero coefficients.

◆ fill_C1_C2_C3() [2/2]

SSR4 fill_C1_C2_C3 ( const Scalar & C1,
const Scalar & C2,
const Scalar & C3 )
static

Create the fourth order elasticity tensor given the three non-zero coefficients.

◆ identity()

SSR4 identity ( const TensorOptions & options = default_tensor_options())
staticnodiscard

Create the identity tensor \(\delta_{ij}\delta_{kl}\).

◆ identity_C1()

SSR4 identity_C1 ( const TensorOptions & options = default_tensor_options())
static

Building block for C1 constant.

◆ identity_C2()

SSR4 identity_C2 ( const TensorOptions & options = default_tensor_options())
static

Building block for C2 constant.

◆ identity_C3()

SSR4 identity_C3 ( const TensorOptions & options = default_tensor_options())
static

Building block for C3 constant.

◆ identity_dev()

SSR4 identity_dev ( const TensorOptions & options = default_tensor_options())
static

Create the deviatoric identity tensor \(\delta_{ik}\delta_{jl}/2 + \delta_{il}\delta_{jk}/2 - \delta_{ij}\delta_{kl}/3\).

◆ identity_sym()

SSR4 identity_sym ( const TensorOptions & options = default_tensor_options())
static

Create the symmetric identity tensor \(\delta_{ik}\delta_{jl}/2 + \delta_{il}\delta_{jk}/2\).

◆ identity_vol()

SSR4 identity_vol ( const TensorOptions & options = default_tensor_options())
static

Create the volumetric identity tensor \(\delta_{ij}\delta_{kl}/3\).

◆ isotropic_E_nu() [1/2]

SSR4 isotropic_E_nu ( const double & E,
const double & nu,
const TensorOptions & options = default_tensor_options() )
static

Create the fourth order elasticity tensor given the Young's modulus and the Poisson's ratio.

◆ isotropic_E_nu() [2/2]

SSR4 isotropic_E_nu ( const Scalar & E,
const Scalar & nu )
static

Create the fourth order elasticity tensor given the Young's modulus and the Poisson's ratio.

◆ operator()()

Scalar operator() ( Size i,
Size j,
Size k,
Size l ) const

Accessor.

◆ rotate()

SSR4 rotate ( const Rot & r) const

Rotate.

◆ transpose_major()

SSR4 transpose_major ( ) const

Transpose major axes.

◆ transpose_minor()

SSR4 transpose_minor ( ) const

Transpose minor axes, no-op.