SpECTRE
v2025.01.30
|
A transition function that falls off as
#include <SphereTransition.hpp>
Public Member Functions | |
SphereTransition (double r_min, double r_max, bool reverse=false) | |
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 radial_distortion) const override |
The inverse of the transition function. More... | |
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 radial_distortion) const =0 |
The inverse of the transition function. More... | |
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
The coefficients r_min
to 0 at r_max
. The coefficients are
If reverse
is set to true
, then the function falls off from 0 at r_min
to 1 at r_max
. To do this, the coefficients are modified as
The function can be called beyond r_min
and r_max
. Within r_min
the value is 1, and outside r_max
the value is 0. This is reversed if reverse
is true. However, the gradient function cannot be called with a point beyond r_min
and r_max
.
|
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 source_coords
.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
Evaluate the transition function source_coords
.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
|
overridevirtual |
The inverse of the transition function.
This method returns target_coords
) and the spherical harmonic expansion radial_distortion
). See domain::CoordinateMaps::TimeDependent::Shape for details on how this quantity is used to compute the inverse of the Shape map.
To derive the expression for this inverse, solve Eq. (
target_coords | The mapped Cartesian coordinates |
radial_distortion | The spherical harmonic expansion |
Returns: The quantity
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.