An operator for calculating the metric tensor. More...
Public Types | |
using | Matrix_2x2 = std::array< std::array< double, 2 >, 2 > |
The type of the Jacobian matrix and its inverse. | |
Public Member Functions | |
KOKKOS_FUNCTION | MetricTensor (Mapping mapping) |
A constructor for the metric tensor operator. | |
KOKKOS_FUNCTION void | operator() (Matrix_2x2 &matrix, PositionCoordinate const &coord) const |
Compute the metric tensor assignd to the mapping. | |
KOKKOS_FUNCTION void | inverse (Matrix_2x2 &matrix, PositionCoordinate const &coord) const |
Compute the inverse metric tensor associated to the mapping. | |
KOKKOS_FUNCTION std::array< double, 2 > | to_covariant (std::array< double, 2 > const &contravariant_vector, PositionCoordinate const &coord) const |
Compute the covariant vector from the contravariant vector. | |
An operator for calculating the metric tensor.
Mapping | The mapping providing the Jacobian operator. |
PositionCoordinate | The coordinate type where the metric tensor can be evaluated. |
|
inline |
A constructor for the metric tensor operator.
[in] | mapping | The mapping which can be used to calculate the Jacobian. |
|
inline |
Compute the metric tensor assignd to the mapping.
The metric tensor matrix is defined as: \( G = (J_{\mathcal{F}})^T J_{\mathcal{F}} \). with \( J_{\mathcal{F}} \) the Jacobian matrix.
[in] | coord | The coordinate where we evaluate the metric tensor. |
[out] | matrix | The metric tensor matrix. |
|
inline |
Compute the inverse metric tensor associated to the mapping.
[in] | coord | The coordinate where we evaluate the metric tensor. |
[out] | matrix | The metric tensor matrix. |
|
inline |
Compute the covariant vector from the contravariant vector.
[in] | contravariant_vector | The metric tensor matrix. |
[in] | coord | The coordinate where we want to compute the convariant vector. |