|
| | KelvinCompactification (const utils::user_options::KelvinCompactificationOptions &options) |
| | Construct a KelvinCompactification with the given options.
|
| |
| bool | is_affine_in_displacement () const noexcept override |
| | Check if the mapping is affine in the displacement. For the Kelvin compactification, this is always true.
|
| |
| MappingStatus | evaluate (const ExteriorMapInput &input, ExteriorMapResult &result) const override |
| | Evaluate the mapping at a given point in the reference domain.
|
| |
| MappingStatus | evaluate_variation (const ExteriorMapInput &input, const ExteriorMapResult &result, const ExteriorMapDirection &direction, ExteriorMapVariation &variation) const override |
| | Evaluate the variation of the mapping at a given point in the reference domain.
|
| |
| std::string_view | get_name () const noexcept override |
| | Get the name of the mapping, which is "KelvinCompactification" for this class.
|
| |
| double | get_reference_stellar_radius () const noexcept |
| | Get the reference stellar radius for the mapping, which is the radius of the inner surface of the reference domain.
|
| |
| double | get_reference_infinity_radius () const noexcept |
| | Get the reference infinity radius for the mapping, which is the radius of the outer surface of the reference domain.
|
| |
| double | get_coordinate_tolerance () const noexcept |
| | Get the coordinate tolerance for the mapping, which is the tolerance for the compactification coordinate.
|
| |
| MappingStatus | evaluate_jacobian_variation_factors (double compactification_coordinate, const mfem::Vector &coordinateGradient, double &scale, mfem::Vector &scaleGradient) const |
| | Evaluate the mapping jacobian variation factors at some given compactification coordinate.
|
| |
Public Member Functions inherited from serif::mapping::compactification::ExteriorDomainMap |
| virtual | ~ExteriorDomainMap ()=default |
| |
Concrete implementation of the ExteriorDomainMap interface for the Kelvin compactification.
Broadly, for some reference position \(\mathbf{x_{r}}\) on some reference domain \(\Omega_{r}\) the Kelvin compactification maps to a physical position \(\mathbf{x_{p}}\) on some physical domain \(\Omega_{p}\) through the mapping
\[\mathbf{x_{p}} = \frac{\mathbf{x_{r}}}{1 - \frac{|\mathbf{x_{r}}|}{R_{\infty}}}
\]
This results in the inner surface of the domain being mapped to the exterior surface of the physical domain while the outer surface of the exterior domain is mapped to infinity. There are some implications of this, namely that we loose accuracy in all things as we approach the outer surface of the domain. However, it is nice in so far as we can apply true boundary conditions at infinity.
Evaluate the mapping at a given point in the reference domain.
- Parameters
-
| [in] | input | The input point in the reference domain to evaluate the mapping at. |
| [out] | result | The result of the mapping evaluation, which will be filled in by the method. |
- Returns
- A status indicating the success or failure of the mapping evaluation. Mapping may fail if
- the size of the input reference position is less than or equal to zero
- the input displaced position size does not match the input reference position size
- the input compactification coordinate gradient size does not match the input reference position size
- the displacement_jacobian height does not match the input reference position size
- the displacement_jacobian width does not match the input reference position size
- the input reference, displaced, compactification coordinate gradient or jacobian contains non-finite values
- There is some issue computing the radial factors (this error will be passed through)
The mapping jacobian comes from trivial application of the product rule recall: \(r_i = scale * x_i\) where \(r\) is the physical position and \(x\) is the displaced position. then we can differentiate wrt. \(X_j\) holding nothing fixed. Note the capital \(X\) here, this is the mesh coordinate not the displaced position. Lets call this jacobian \(F\)
\[ F = \frac{\partial r_i}{\partial X_{j}}
\]
\(F\) then tells us how the physical position changes as we move along mesh coordinates
Lets then apply this to the function we have for the kelvin compactification
\[F = scale * \frac{\partial x_i}{\partial X_j} + x_i * \frac{\partial scale}{\partial X_j}
\]
In the implementation you can see the displacement jacobian ( \(\frac{\partial x_i}{\partial X_j}\)) and the scale derivative ( \(\frac{\partial scale}{\partial X_j}\)) being applied to compute the mapping jacobian.
Implements serif::mapping::compactification::ExteriorDomainMap.