OGS
MaterialLib::Solids::MFront::detail::SetGradient< DisplacementDim > Struct Template Reference

Detailed Description

template<int DisplacementDim>
struct MaterialLib::Solids::MFront::detail::SetGradient< DisplacementDim >

A helper struct filling MFront's gradient data (or thermodynamic forces) with values taken from a MaterialPropertyLib::VariableArray.

Definition at line 187 of file MFrontGeneric.h.

#include <MFrontGeneric.h>

Collaboration diagram for MaterialLib::Solids::MFront::detail::SetGradient< DisplacementDim >:
[legend]

Public Member Functions

template<typename Grad>
void operator() (Grad)

Public Attributes

MaterialPropertyLib::VariableArray const & variable_array
std::optional< MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > const & Q
double * target

Member Function Documentation

◆ operator()()

template<int DisplacementDim>
template<typename Grad>
void MaterialLib::Solids::MFront::detail::SetGradient< DisplacementDim >::operator() ( Grad )
inline

Definition at line 195 of file MFrontGeneric.h.

196 {
198
200 {
202 }
203 else if constexpr (Grad::type ==
205 {
207 auto const& grad_ogs =
209
210 auto const grad_mfront =
211 Q ? eigenSwap45View(Q->transpose() * grad_ogs).eval()
212 : eigenSwap45View(grad_ogs).eval();
214 }
215 else if constexpr (Grad::type ==
217 {
219 auto const& grad_ogs =
221
222 if (Q.has_value())
223 {
224 OGS_FATAL("Rotations of tensors are not implemented.");
225 }
226
229 }
230 else
231 {
232 OGS_FATAL("Unsupported gradient type {}.",
234 }
235
236 target += num_comp;
237 }
#define OGS_FATAL(...)
Definition Error.h:26
constexpr auto ogsTensorToMFrontTensor(Eigen::MatrixBase< Derived > const &matrix)
constexpr auto eigenSwap45View(Eigen::MatrixBase< Derived > const &matrix)
const char * varTypeToString(int v)
std::optional< MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > const & Q
MaterialPropertyLib::VariableArray const & variable_array

References MaterialLib::Solids::MFront::eigenSwap45View(), OGS_FATAL, MaterialLib::Solids::MFront::ogsTensorToMFrontTensor(), Q, target, variable_array, and MaterialLib::Solids::MFront::varTypeToString().

Member Data Documentation

◆ Q

template<int DisplacementDim>
std::optional< MathLib::KelvinVector::KelvinMatrixType<DisplacementDim> > const& MaterialLib::Solids::MFront::detail::SetGradient< DisplacementDim >::Q

Definition at line 191 of file MFrontGeneric.h.

Referenced by operator()().

◆ target

template<int DisplacementDim>
double* MaterialLib::Solids::MFront::detail::SetGradient< DisplacementDim >::target

Definition at line 192 of file MFrontGeneric.h.

Referenced by operator()().

◆ variable_array

template<int DisplacementDim>
MaterialPropertyLib::VariableArray const& MaterialLib::Solids::MFront::detail::SetGradient< DisplacementDim >::variable_array

Definition at line 189 of file MFrontGeneric.h.

Referenced by operator()().


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