2D Elastic Isotropic Strain Computation¶
-
template<typename FieldDerivativesType, std::enable_if_t<FieldDerivativesType::medium_tag == specfem::element::medium_tag::elastic_psv, int> = 0>
specfem::datatype::TensorPointViewType<type_real, 2, 2, FieldDerivativesType::using_simd> impl_compute_strain(const FieldDerivativesType &field_derivatives)¶ Compute symmetric strain tensor for 2D elastic P-SV waves.
Computes the symmetric strain tensor \(\boldsymbol{\varepsilon}\) from displacement gradients:
\[\begin{split} \boldsymbol{\varepsilon} = \begin{pmatrix} \varepsilon_{xx} & \varepsilon_{xz} \\ \varepsilon_{xz} & \varepsilon_{zz} \end{pmatrix} = \begin{pmatrix} \frac{\partial u_x}{\partial x} & \frac{1}{2}\left(\frac{\partial u_x}{\partial z} + \frac{\partial u_z}{\partial x}\right) \\ \frac{1}{2}\left(\frac{\partial u_x}{\partial z} + \frac{\partial u_z}{\partial x}\right) & \frac{\partial u_z}{\partial z} \end{pmatrix} \end{split}\]- Template Parameters:
FieldDerivativesType – Point field-derivatives type (deduced)
- Parameters:
field_derivatives – Displacement gradients \(\nabla \mathbf{u}\)
- Returns:
2×2 symmetric strain tensor \(\boldsymbol{\varepsilon}\)
-
template<typename FieldDerivativesType, std::enable_if_t<FieldDerivativesType::medium_tag == specfem::element::medium_tag::elastic_psv, int> = 0>
specfem::datatype::TensorPointViewType<type_real, 2, 2, FieldDerivativesType::using_simd> impl_compute_deviatoric_strain(const FieldDerivativesType &field_derivatives)¶ Compute deviatoric strain tensor for 2D elastic P-SV waves.
Computes the deviatoric strain \(\boldsymbol{\varepsilon}'\) by removing the volumetric component:
where \(\text{tr}(\boldsymbol{\varepsilon}) = \varepsilon_{xx} + \varepsilon_{zz}\).\[ \boldsymbol{\varepsilon}' = \boldsymbol{\varepsilon} - \frac{\text{tr}(\boldsymbol{\varepsilon})}{3}\mathbf{I} \]Under plane-strain conditions, the missing \(\varepsilon'_{yy} = -\frac{\text{tr}(\boldsymbol{\varepsilon})}{3}\) ensures \(\text{tr}(\boldsymbol{\varepsilon}') = 0\) in 3D.
- Template Parameters:
FieldDerivativesType – Point field-derivatives type (deduced)
- Parameters:
field_derivatives – Displacement gradients \(\nabla \mathbf{u}\)
- Returns:
2×2 deviatoric strain tensor \(\boldsymbol{\varepsilon}'\)
3D Elastic Isotropic Strain Computation¶
-
template<typename FieldDerivativesType, std::enable_if_t<FieldDerivativesType::medium_tag == specfem::element::medium_tag::elastic, int> = 0>
specfem::datatype::TensorPointViewType<type_real, 3, 3, FieldDerivativesType::using_simd> impl_compute_strain(const FieldDerivativesType &field_derivatives)¶ Compute symmetric strain tensor for 3D elastic media.
- Template Parameters:
FieldDerivativesType – Point field-derivatives type (deduced)
- Parameters:
field_derivatives – Displacement gradients
- Returns:
3×3 symmetric strain tensor
-
template<typename FieldDerivativesType, std::enable_if_t<FieldDerivativesType::medium_tag == specfem::element::medium_tag::elastic, int> = 0>
specfem::datatype::TensorPointViewType<type_real, 3, 3, FieldDerivativesType::using_simd> impl_compute_deviatoric_strain(const FieldDerivativesType &field_derivatives)¶ Compute deviatoric strain tensor for 3D elastic media.
Subtracts trace/3 from diagonal. In 3D the deviatoric trace is exactly zero.
- Template Parameters:
FieldDerivativesType – Point field-derivatives type (deduced)
- Parameters:
field_derivatives – Displacement gradients
- Returns:
3×3 deviatoric strain tensor
-
template<bool UseSIMD>
specfem::datatype::simd<type_real, UseSIMD>::datatype impl_trace(const specfem::datatype::TensorPointViewType<type_real, 3, 3, UseSIMD> &tensor)¶ Trace of a 3×3 elastic strain tensor (ε_xx + ε_yy + ε_zz).
- Template Parameters:
UseSIMD – Enable SIMD vectorization
- Parameters:
tensor – 3×3 strain tensor
- Returns:
Scalar trace value