A class which describes a mapping which is constructed by combining two mappings.
More...
|
template<class Map1 , std::enable_if_t<(has_singular_o_point_inv_jacobian_v< Map1 >)||(has_singular_o_point_inv_jacobian_v< InverseMapping2 >), bool > = true> |
| CombinedMapping (Map1 mapping_1, Mapping2 mapping_2, double epsilon) |
| Build a CombinedMapping from the component mappings.
|
|
template<class Map1 , std::enable_if_t< !((has_singular_o_point_inv_jacobian_v< Map1 >)||(has_singular_o_point_inv_jacobian_v< InverseMapping2 >)), bool > = true> |
| CombinedMapping (Map1 mapping_1, Mapping2 mapping_2) |
| Build a CombinedMapping from the component mappings.
|
|
CoordResult | operator() (CoordArg coord) |
| Convert the argument coordinate to the equivalent result coordinate.
|
|
KOKKOS_INLINE_FUNCTION void | jacobian_matrix (CoordJacobian const &coord, Matrix_2x2 &matrix) const |
| Compute full Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | jacobian_11 (CoordJacobian const &coord_rtheta) const |
| Compute the (1,1) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | jacobian_12 (CoordJacobian const &coord_rtheta) const |
| Compute the (1,2) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | jacobian_21 (CoordJacobian const &coord_rtheta) const |
| Compute the (2,1) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | jacobian_22 (CoordJacobian const &coord_rtheta) const |
| Compute the (2,2) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | jacobian (CoordJacobian const &coord_rtheta) const |
| Compute the determinant of the Jacobian matrix.
|
|
KOKKOS_FUNCTION void | inv_jacobian_matrix (CoordJacobian const &coord, Matrix_2x2 &matrix) const |
| Compute the full inverse Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | inv_jacobian_11 (CoordJacobian const &coord_rtheta) const |
| Compute the (1,1) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | inv_jacobian_12 (CoordJacobian const &coord_rtheta) const |
| Compute the (1,2) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | inv_jacobian_21 (CoordJacobian const &coord_rtheta) const |
| Compute the (2,1) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | inv_jacobian_22 (CoordJacobian const &coord_rtheta) const |
| Compute the (2,2) coefficient of the Jacobian matrix.
|
|
KOKKOS_INLINE_FUNCTION double | inv_jacobian (CoordJacobian const &coord_rtheta) const |
| Compute the determinant of the Jacobian matrix.
|
|
template<class Mapping > |
KOKKOS_INLINE_FUNCTION Mapping const & | get () const |
| Get access to one of the internal mappings.
|
|
template<class Mapping1, class Mapping2>
class CombinedMapping< Mapping1, Mapping2 >
A class which describes a mapping which is constructed by combining two mappings.
Let us denote Mapping1 as \( \mathcal{F} \) and Mapping2 as \( \mathcal{G} \) then this mapping represents: \( \mathcal{F} \circ \mathcal{G} \)
There are therefore 3 domains in this calculation \( \Omega_{start} \), \( \Omega_{mid} \) and \( \Omega_{end} \) with \( \mathcal{F}(\Omega_{mid})\rightarrow\Omega_{end} \) and \( \mathcal{G}(\Omega_{start})\rightarrow\Omega_{mid} \)
The functions in this mapping are defined on the coordinate system associated with the domain \( \Omega_{mid} \).
template<class Mapping1 , class Mapping2 >
template<class Map1 , std::enable_if_t<(has_singular_o_point_inv_jacobian_v< Map1 >)||(has_singular_o_point_inv_jacobian_v< InverseMapping2 >), bool > = true>
Build a CombinedMapping from the component mappings.
This constructor should be used if the inverse jacobian of the first mapping, or the jacobian of the second mapping cannot be evaluated at the O-point.
- Parameters
-
[in] | mapping_1 | The first mapping. |
[in] | mapping_2 | The second mapping. |
[in] | epsilon | The parameter \( \varepsilon \) which determines when a point is close enough to the central O-point for linearization to be required when calculating the inverse of the Jacobian. The Jacobian is linearized on \( r \in [0, \varepsilon] \). |
template<class Mapping1 , class Mapping2 >
template<class Map1 , std::enable_if_t< !((has_singular_o_point_inv_jacobian_v< Map1 >)||(has_singular_o_point_inv_jacobian_v< InverseMapping2 >)), bool > = true>
Build a CombinedMapping from the component mappings.
This constructor should be used if both mappings can be safely evaluated at all points in space.
- Parameters
-
[in] | mapping_1 | The first mapping. |
[in] | mapping_2 | The second mapping. |
template<class Mapping1 , class Mapping2 >
KOKKOS_INLINE_FUNCTION void CombinedMapping< Mapping1, Mapping2 >::jacobian_matrix |
( |
CoordJacobian const & |
coord, |
|
|
Matrix_2x2 & |
matrix |
|
) |
| const |
|
inline |
Compute full Jacobian matrix.
For some computations, we need the complete Jacobian matrix or just the coefficients. This is calculated by combining the Jacobian matrices of the 2 curvilinear mappings.
\( J_{(x_{in}, y_{in})->(x_{out},y_{out})} = J_{F\circ G} \) \( = J_{(x_{mid}, y_{mid})->(x_{out},y_{out})}J_{(x_{in}, y_{in})->(x_{mid}, y_{mid})} = J_F J_G \) \( = J_{(x_{mid}, y_{mid})->(x_{out},y_{out})} [J_{(x_{mid}, y_{mid})->(x_{in}, y_{in})}]^{-1} = J_F [J_{G^{-1}}]^{-1} \)
The Jacobians that are used for the calculation must be mappings from \( (x_{mid}, y_{mid}) \) so they can be calculated on the correct coordinate system.
- Parameters
-
[in] | coord | The coordinate where we evaluate the Jacobian matrix. |
[out] | matrix | The calculated Jacobian matrix. |