SpECTRE
v2023.05.16
|
A transition function that falls off as \(f(r) = (ar + b) / r\). The coefficients \(a\) and \(b\) are chosen so that the map falls off linearly from 1 at r_min
to 0 at r_max
.
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 |
double | map_over_radius (const std::array< double, 3 > &source_coords) const override |
DataVector | map_over_radius (const std::array< DataVector, 3 > &source_coords) 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) = (ar + b) / r\). The coefficients \(a\) and \(b\) are chosen so that the map falls off linearly from 1 at r_min
to 0 at 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 |
Evaluate the transition function at the Cartesian coordinates divided by the radius. All divisions over the radius which could potentially be zero divisions are left to the transition function which uses its knowledge of the domain to do this safely or throw an appropriate error.
Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.
|
overridevirtual |
Evaluate the transition function at the Cartesian coordinates divided by the radius. All divisions over the radius which could potentially be zero divisions are left to the transition function which uses its knowledge of the domain to do this safely or throw an appropriate error.
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.