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 181 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 189 of file MFrontGeneric.h.

190 {
192
194 {
196 }
197 else if constexpr (Grad::type ==
199 {
201 auto const& grad_ogs =
203
204 auto const grad_mfront =
205 Q ? eigenSwap45View(Q->transpose() * grad_ogs).eval()
206 : eigenSwap45View(grad_ogs).eval();
208 }
209 else if constexpr (Grad::type ==
211 {
213 auto const& grad_ogs =
215
216 if (Q.has_value())
217 {
218 OGS_FATAL("Rotations of tensors are not implemented.");
219 }
220
223 }
224 else
225 {
226 OGS_FATAL("Unsupported gradient type {}.",
228 }
229
230 target += num_comp;
231 }
#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 185 of file MFrontGeneric.h.

Referenced by operator()().

◆ target

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

Definition at line 186 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 183 of file MFrontGeneric.h.

Referenced by operator()().


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