SpECTRE  v2021.12.06
domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition Class Referencefinal

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
 
bool operator== (const ShapeMapTransitionFunction &other) const override
 
bool operator!= (const ShapeMapTransitionFunction &other) const override
 
- Public Member Functions inherited from domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction
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)
 

Detailed Description

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.

Member Function Documentation

◆ gradient() [1/2]

std::array< DataVector, 3 > domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::gradient ( const std::array< DataVector, 3 > &  source_coords) const
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.

◆ gradient() [2/2]

std::array< double, 3 > domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::gradient ( const std::array< double, 3 > &  source_coords) const
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.

◆ map_over_radius() [1/2]

DataVector domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::map_over_radius ( const std::array< DataVector, 3 > &  source_coords) const
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.

◆ map_over_radius() [2/2]

double domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::map_over_radius ( const std::array< double, 3 > &  source_coords) const
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.

◆ operator!=()

bool domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::operator!= ( const ShapeMapTransitionFunction other) const
overridevirtual

◆ operator()() [1/2]

DataVector domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::operator() ( const std::array< DataVector, 3 > &  source_coords) const
overridevirtual

Evaluate the transition function at the Cartesian coordinates source_coords.

Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.

◆ operator()() [2/2]

double domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::operator() ( const std::array< double, 3 > &  source_coords) const
overridevirtual

Evaluate the transition function at the Cartesian coordinates source_coords.

Implements domain::CoordinateMaps::ShapeMapTransitionFunctions::ShapeMapTransitionFunction.

◆ operator==()

bool domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::operator== ( const ShapeMapTransitionFunction other) const
overridevirtual

◆ original_radius_over_radius()

std::optional< double > domain::CoordinateMaps::ShapeMapTransitionFunctions::SphereTransition::original_radius_over_radius ( const std::array< double, 3 > &  target_coords,
double  distorted_radius 
) const
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.


The documentation for this class was generated from the following file: