12#ifndef MFEM_ELASTICITY_MAT_LIN_ELAST_HPP
13#define MFEM_ELASTICITY_MAT_LIN_ELAST_HPP
18using mfem::internal::tensor;
33 tensor<mfem::real_t, dim, dim>
34 MFEM_HOST_DEVICE
stress(
const tensor<mfem::real_t, dim, dim> &dudx)
const
36 constexpr auto I = mfem::internal::IsotropicIdentity<dim>();
45 tensor<mfem::real_t, dim, dim> MFEM_HOST_DEVICE
47 const tensor<mfem::real_t, dim, dim> &ddudx)
const
61 tensor<mfem::real_t, dim, dim, dim, dim>
62 MFEM_HOST_DEVICE
gradient(tensor<mfem::real_t, dim, dim> )
const
64 return mfem::internal::make_tensor<dim, dim, dim, dim>([&](
int i,
int j,
int k,
67 return lambda * (i == j) * (k == l) +
68 mu * ((i == l) * (j == k) + (i == k) * (j == l));
tensor< mfem::real_t, dim, dim, dim, dim > MFEM_HOST_DEVICE gradient(tensor< mfem::real_t, dim, dim >) const
Compute the gradient.
tensor< mfem::real_t, dim, dim > MFEM_HOST_DEVICE stress(const tensor< mfem::real_t, dim, dim > &dudx) const
Compute the stress response.
tensor< mfem::real_t, dim, dim > MFEM_HOST_DEVICE action_of_gradient(const tensor< mfem::real_t, dim, dim > &, const tensor< mfem::real_t, dim, dim > &ddudx) const
Apply the gradient of the stress.
mfem::real_t lambda
First Lame parameter.
mfem::real_t mu
Second Lame parameter.
Implementation of the tensor class.