A specialized version of DisplacementCubitBcData that includes an additional rotation offset.
More...
#include <src/boundary_conditions/EssentialDisplacementCubitBcData.hpp>
|
static FTensor::Tensor1< double, 3 > | GetRotDisp (const FTensor::Tensor1< double, 3 > &angles, FTensor::Tensor1< double, 3 > coordinates, FTensor::Tensor1< double, 3 > offset=FTensor::Tensor1< double, 3 >{ 0., 0., 0.}) |
| Calculates the rotated displacement given the rotation angles, coordinates, and an optional offset. More...
|
|
A specialized version of DisplacementCubitBcData that includes an additional rotation offset.
DisplacementCubitBcDataWithRotation extends the DisplacementCubitBcData structure with a rotation offset and a method to calculate the rotated displacement given the rotation angles and coordinates.
Definition at line 24 of file EssentialDisplacementCubitBcData.hpp.
◆ DisplacementCubitBcDataWithRotation()
MoFEM::DisplacementCubitBcDataWithRotation::DisplacementCubitBcDataWithRotation |
( |
| ) |
|
|
inline |
◆ GetRotDisp()
Calculates the rotated displacement given the rotation angles, coordinates, and an optional offset.
- Parameters
-
- Returns
- FTensor::Tensor1<double, 3> representing the rotated displacement.
Definition at line 40 of file EssentialDisplacementCubitBcData.hpp.
50 rotated_displacement(
i) = 0;
52 auto get_rotation = [&](
auto &
omega) {
59 if (std::abs(angle) < std::numeric_limits<double>::epsilon())
60 return rotation_matrix;
63 t_omega(
i,
j) = FTensor::levi_civita<double>(
i,
j,
k) *
omega(
k);
64 const double a = sin(angle) / angle;
65 const double sin_squared = sin(angle / 2.) * sin(angle / 2.);
66 const double b = 2. * sin_squared / (angle * angle);
67 rotation_matrix(
i,
j) +=
a * t_omega(
i,
j);
68 rotation_matrix(
i,
j) += b * t_omega(
i,
k) * t_omega(
k,
j);
70 return rotation_matrix;
73 auto rotation = get_rotation(angles);
75 coordinate_distance(
i) = offset(
i) - coordinates(
i);
76 rotated_displacement(
i) =
77 coordinate_distance(
i) - rotation(
j,
i) * coordinate_distance(
j);
79 return rotated_displacement;
◆ rotOffset
std::array<double, 3> MoFEM::DisplacementCubitBcDataWithRotation::rotOffset |
The documentation for this struct was generated from the following file:
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.