NEML2 2.0.0
Loading...
Searching...
No Matches
ElasticityConverter< N > Class Template Reference

Base class for converters responsible for converting between different parameterizations of the linear elasticity tensor in different symmetry groups. More...

Detailed Description

template<std::size_t N>
class neml2::ElasticityConverter< N >

Base class for converters responsible for converting between different parameterizations of the linear elasticity tensor in different symmetry groups.

Template Parameters
NNumber of independent elastic constants

#include <ElasticityConverter.h>

Public Types

using InputType = std::array<Scalar, N>
 
using InputPtrType = std::array<const Scalar *, N>
 
using DerivativeFlagType = std::array<bool, N>
 
using DerivativeType = std::array<Scalar, N>
 
using ConversionType = std::pair<Scalar, DerivativeType>
 
using ResultType = std::array<ConversionType, N>
 
using ConverterKey = std::array<ElasticConstant, N>
 
using ConverterType = ConversionType (*)(const InputType &, const DerivativeFlagType &)
 
using ConversionTableType = std::map<ConverterKey, std::array<ConverterType, N>>
 

Public Member Functions

 ElasticityConverter (const ConversionTableType &table, const ConverterKey &output_parameterization, const ConverterKey &input_parameterization, const DerivativeFlagType &deriv_requested)
 
ResultType convert (const InputType &input) const
 Convert input to independent elastic constants with derivatives.
 
ResultType convert (const InputPtrType &input) const
 Convert input to independent elastic constants with derivatives.
 
ConversionType convert (const InputType &input, const ElasticConstant p) const
 Convert input to a single elastic constant with derivatives.
 
ConversionType convert (const InputPtrType &input, const ElasticConstant p) const
 Convert input to a single elastic constant with derivatives.
 

Member Typedef Documentation

◆ ConversionTableType

template<std::size_t N>
using ConversionTableType = std::map<ConverterKey, std::array<ConverterType, N>>

◆ ConversionType

template<std::size_t N>
using ConversionType = std::pair<Scalar, DerivativeType>

◆ ConverterKey

template<std::size_t N>
using ConverterKey = std::array<ElasticConstant, N>

◆ ConverterType

◆ DerivativeFlagType

template<std::size_t N>
using DerivativeFlagType = std::array<bool, N>

◆ DerivativeType

template<std::size_t N>
using DerivativeType = std::array<Scalar, N>

◆ InputPtrType

template<std::size_t N>
using InputPtrType = std::array<const Scalar *, N>

◆ InputType

template<std::size_t N>
using InputType = std::array<Scalar, N>

◆ ResultType

template<std::size_t N>
using ResultType = std::array<ConversionType, N>

Constructor & Destructor Documentation

◆ ElasticityConverter()

template<std::size_t N>
ElasticityConverter ( const ConversionTableType & table,
const ConverterKey & output_parameterization,
const ConverterKey & input_parameterization,
const DerivativeFlagType & deriv_requested )
inline

Member Function Documentation

◆ convert() [1/4]

template<std::size_t N>
ResultType convert ( const InputPtrType & input) const
inline

Convert input to independent elastic constants with derivatives.

◆ convert() [2/4]

template<std::size_t N>
ConversionType convert ( const InputPtrType & input,
const ElasticConstant p ) const
inline

Convert input to a single elastic constant with derivatives.

◆ convert() [3/4]

template<std::size_t N>
ResultType convert ( const InputType & input) const
inline

Convert input to independent elastic constants with derivatives.

◆ convert() [4/4]

template<std::size_t N>
ConversionType convert ( const InputType & input,
const ElasticConstant p ) const
inline

Convert input to a single elastic constant with derivatives.