MFEM  v4.5.2
Finite element discretization library
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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. More...
 
MFEM_HOST_DEVICE tensor< double, dim, dim, dim, dimgradient (tensor< double, dim, dim > dudx) const
 Compute the gradient. More...
 
MFEM_HOST_DEVICE tensor< double, dim, dimaction_of_gradient (const tensor< double, dim, dim > &dudx, const tensor< double, dim, dim > &ddudx) const
 Apply the gradient of the stress. More...
 
MFEM_HOST_DEVICE tensor< double, dim, dimaction_of_gradient_dual (const tensor< double, dim, dim > &dudx, const tensor< double, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< double, dim, dimaction_of_gradient_enzyme_fwd (const tensor< double, dim, dim > &dudx, const tensor< double, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< double, dim, dimaction_of_gradient_enzyme_rev (const tensor< double, dim, dim > &dudx, const tensor< double, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< double, dim, dimaction_of_gradient_finite_diff (const tensor< double, dim, dim > &dudx, const tensor< double, dim, dim > &ddudx) const
 
MFEM_HOST_DEVICE tensor< double, dim, dimaction_of_gradient_symbolic (const tensor< double, dim, dim > &du_dx, const tensor< double, dim, dim > &ddu_dx) const
 

Static Public Member Functions

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

Public Attributes

double D1 = 100.0
 
double 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

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<double, dim, dim> NeoHookeanMaterial< dim, gradient_type >::action_of_gradient ( const tensor< double, dim, dim > &  dudx,
const tensor< double, 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<double, dim, dim> NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_dual ( const tensor< double, dim, dim > &  dudx,
const tensor< double, 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<double, dim, dim> NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_enzyme_fwd ( const tensor< double, dim, dim > &  dudx,
const tensor< double, 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<double, dim, dim> NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_enzyme_rev ( const tensor< double, dim, dim > &  dudx,
const tensor< double, 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<double, dim, dim> NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_finite_diff ( const tensor< double, dim, dim > &  dudx,
const tensor< double, 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<double, dim, dim> NeoHookeanMaterial< dim, gradient_type >::action_of_gradient_symbolic ( const tensor< double, dim, dim > &  du_dx,
const tensor< double, dim, dim > &  ddu_dx 
) const
inline

Definition at line 209 of file neohookean.hpp.

◆ gradient()

template<int dim = 3, GradientType gradient_type = GradientType::Symbolic>
MFEM_HOST_DEVICE tensor<double, dim, dim, dim, dim> NeoHookeanMaterial< dim, gradient_type >::gradient ( tensor< double, 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 91 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< double, dim, dim > &  dudx,
tensor< double, 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
Returns
stress

Definition at line 73 of file neohookean.hpp.

Member Data Documentation

◆ C1

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

Definition at line 230 of file neohookean.hpp.

◆ D1

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

Definition at line 229 of file neohookean.hpp.


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