MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
NeoHookeanMaterial< dim, gradient_type > Struct Template Reference

Neo-Hookean material. More...

#include <neohookean.hpp>

Public Member Functions

template<typename T >
MFEM_HOST_DEVICE tensor< T, dim, dimstress (const tensor< T, dim, dim > &dudx) const
 Compute the stress response.
 
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim, dim, dimgradient (tensor< mfem::real_t, dim, dim > dudx) const
 Compute the gradient.
 
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dimaction_of_gradient (const tensor< mfem::real_t, dim, dim > &dudx, const tensor< mfem::real_t, dim, dim > &ddudx) const
 Apply the gradient of the stress.
 
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dimaction_of_gradient_dual (const tensor< mfem::real_t, dim, dim > &dudx, const tensor< mfem::real_t, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dimaction_of_gradient_enzyme_fwd (const tensor< mfem::real_t, dim, dim > &dudx, const tensor< mfem::real_t, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dimaction_of_gradient_enzyme_rev (const tensor< mfem::real_t, dim, dim > &dudx, const tensor< mfem::real_t, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dimaction_of_gradient_finite_diff (const tensor< mfem::real_t, dim, dim > &dudx, const tensor< mfem::real_t, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dimaction_of_gradient_symbolic (const tensor< mfem::real_t, dim, dim > &du_dx, const tensor< mfem::real_t, dim, dim > &ddu_dx) const
 

Static Public Member Functions

static MFEM_HOST_DEVICE void stress_wrapper (NeoHookeanMaterial< dim, gradient_type > *self, tensor< mfem::real_t, dim, dim > &dudx, tensor< mfem::real_t, dim, dim > &sigma)
 A method to wrap the stress calculation into a static function.
 

Public Attributes

mfem::real_t D1 = 100.0
 
mfem::real_t C1 = 50.0
 

Detailed Description

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
struct NeoHookeanMaterial< dim, gradient_type >

Neo-Hookean material.

Defines a Neo-Hookean material response. It satisfies the material_type interface for ElasticityOperator::SetMaterial. This material type allows choosing the method of derivative calculation in action_of_gradient. Choices include methods derived by hand using symbolic calculation and a variety of automatically computed gradient applications, like

  • Enzyme forward mode
  • Enzyme reverse mode
  • Dual number type forward mode
  • Finite difference mode
Template Parameters
dim
gradient_type

Definition at line 40 of file neohookean.hpp.

Member Function Documentation

◆ action_of_gradient()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim > NeoHookeanMaterial< dim, gradient_type >::action_of_gradient ( const tensor< mfem::real_t, dim, dim > & dudx,
const tensor< mfem::real_t, dim, dim > & ddudx ) const
inline

Apply the gradient of the stress.

Parameters
[in]dudx
[in]ddudx
Returns

Definition at line 120 of file neohookean.hpp.

◆ action_of_gradient_dual()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim > NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_dual ( const tensor< mfem::real_t, dim, dim > & dudx,
const tensor< mfem::real_t, dim, dim > & ddudx ) const
inline

Definition at line 151 of file neohookean.hpp.

◆ action_of_gradient_enzyme_fwd()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim > NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_enzyme_fwd ( const tensor< mfem::real_t, dim, dim > & dudx,
const tensor< mfem::real_t, dim, dim > & ddudx ) const
inline

Definition at line 164 of file neohookean.hpp.

◆ action_of_gradient_enzyme_rev()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim > NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_enzyme_rev ( const tensor< mfem::real_t, dim, dim > & dudx,
const tensor< mfem::real_t, dim, dim > & ddudx ) const
inline

Definition at line 176 of file neohookean.hpp.

◆ action_of_gradient_finite_diff()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim > NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_finite_diff ( const tensor< mfem::real_t, dim, dim > & dudx,
const tensor< mfem::real_t, dim, dim > & ddudx ) const
inline

Definition at line 199 of file neohookean.hpp.

◆ action_of_gradient_symbolic()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim > NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_symbolic ( const tensor< mfem::real_t, dim, dim > & du_dx,
const tensor< mfem::real_t, dim, dim > & ddu_dx ) const
inline

Definition at line 210 of file neohookean.hpp.

◆ gradient()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor< mfem::real_t, dim, dim, dim, dim > NeoHookeanMaterial< dim, gradient_type >::gradient ( tensor< mfem::real_t, dim, dim > dudx) const
inline

Compute the gradient.

This method is used in the ElasticityDiagonalPreconditioner type to compute the gradient matrix entries of the current quadrature point, instead of the action.

Parameters
[in]dudx
Returns

Definition at line 90 of file neohookean.hpp.

◆ stress()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
template<typename T >
MFEM_HOST_DEVICE tensor< T, dim, dim > NeoHookeanMaterial< dim, gradient_type >::stress ( const tensor< T, dim, dim > & dudx) const
inline

Compute the stress response.

Parameters
[in]dudxderivative of the displacement
Returns

Definition at line 52 of file neohookean.hpp.

◆ stress_wrapper()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
static MFEM_HOST_DEVICE void NeoHookeanMaterial< dim, gradient_type >::stress_wrapper ( NeoHookeanMaterial< dim, gradient_type > * self,
tensor< mfem::real_t, dim, dim > & dudx,
tensor< mfem::real_t, dim, dim > & sigma )
inlinestatic

A method to wrap the stress calculation into a static function.

This is necessary for Enzyme to access the class pointer (self).

Parameters
[in]self
[in]dudx
[in]sigma

Definition at line 72 of file neohookean.hpp.

Member Data Documentation

◆ C1

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
mfem::real_t NeoHookeanMaterial< dim, gradient_type >::C1 = 50.0

Definition at line 231 of file neohookean.hpp.

◆ D1

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
mfem::real_t NeoHookeanMaterial< dim, gradient_type >::D1 = 100.0

Definition at line 230 of file neohookean.hpp.


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