SpECTRE
v2023.10.11
|
A transition function that falls off as \(f(r) = g(r) / r\) where \(g(r) = ar + b\). More...
#include <SphereTransition.hpp>
Public Member Functions | |
SphereTransition (double r_min, double r_max) | |
double | operator() (const std::array< double, 3 > &source_coords) const override |
DataVector | operator() (const std::array< DataVector, 3 > &source_coords) const override |
std::optional< double > | original_radius_over_radius (const std::array< double, 3 > &target_coords, double distorted_radius) const override |
std::array< double, 3 > | gradient (const std::array< double, 3 > &source_coords) const override |
std::array< DataVector, 3 > | gradient (const std::array< DataVector, 3 > &source_coords) const override |
WRAPPED_PUPable_decl_template (SphereTransition) | |
SphereTransition (CkMigrateMessage *const msg) | |
void | pup (PUP::er &p) override |
std::unique_ptr< ShapeMapTransitionFunction > | get_clone () const override |
bool | operator== (const ShapeMapTransitionFunction &other) const override |
bool | operator!= (const ShapeMapTransitionFunction &other) const override |
![]() | |
virtual std::optional< double > | original_radius_over_radius (const std::array< double, 3 > &target_coords, double distorted_radius) const =0 |
virtual bool | operator== (const ShapeMapTransitionFunction &other) const =0 |
virtual bool | operator!= (const ShapeMapTransitionFunction &other) const =0 |
WRAPPED_PUPable_abstract (ShapeMapTransitionFunction) | |
ShapeMapTransitionFunction (CkMigrateMessage *m) | |
A transition function that falls off as \(f(r) = g(r) / r\) where \(g(r) = ar + b\).
The coefficients \(a\) and \(b\) are chosen so that the function \(g(r) = ar + b\) falls off linearly from 1 at r_min
to 0 at r_max
. This means that \(f(r)\) falls off from \(1/r_{\text{min}}\) at r_min
to 0 at r_max
. The coefficients are
\begin{align} a &= \frac{-1}{r_{\text{max}} - r_{\text{min}}} \\ b &= \frac{r_{\text{max}}}{r_{\text{max}} - r_{\text{min}}} = -a r_{\text{max}} \end{align}
|
inlineoverridevirtual |
Evaluate the gradient of the transition function with respect to the Cartesian coordinates x, y and z at the Cartesian coordinates source_coords
.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
Evaluate the gradient of the transition function with respect to the Cartesian coordinates x, y and z at the Cartesian coordinates source_coords
.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
Evaluate the gradient of the transition function with respect to the Cartesian coordinates x, y and z at the Cartesian coordinates source_coords
.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
|
overridevirtual |
Evaluate the transition function at the Cartesian coordinates source_coords
.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
Evaluate the transition function at the Cartesian coordinates source_coords
.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
|
overridevirtual |
Given the mapped coordinates target_coords
and the corresponding spherical harmonic expansion \(\sum_{lm} \lambda_{lm}(t)Y_{lm}\), distorted_radius
, this method evaluates the original radius from the mapped radius by inverting the domain::CoordinateMaps::TimeDependent::Shape map. It also divides by the mapped radius to simplify calculations in the shape map.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.