SpECTRE
v2024.09.29
|
Abstract base class for CoordinateMap. More...
#include <CoordinateMap.hpp>
Public Types | |
using | source_frame = SourceFrame |
using | target_frame = TargetFrame |
Public Member Functions | |
WRAPPED_PUPable_abstract (CoordinateMapBase) | |
CoordinateMapBase (const CoordinateMapBase &)=default | |
CoordinateMapBase & | operator= (const CoordinateMapBase &)=default |
CoordinateMapBase (CoordinateMapBase &&)=default | |
CoordinateMapBase & | operator= (CoordinateMapBase &&)=default |
virtual std::unique_ptr< CoordinateMapBase< SourceFrame, TargetFrame, Dim > > | get_clone () const =0 |
virtual std::unique_ptr< CoordinateMapBase< SourceFrame, Frame::Grid, Dim > > | get_to_grid_frame () const =0 |
Retrieve the same map but going from SourceFrame to Frame::Grid . More... | |
virtual bool | is_identity () const =0 |
Returns true if the map is the identity. More... | |
virtual bool | inv_jacobian_is_time_dependent () const =0 |
Returns true if the inverse Jacobian depends on time. More... | |
virtual bool | jacobian_is_time_dependent () const =0 |
Returns true if the Jacobian depends on time. More... | |
virtual const std::unordered_set< std::string > & | function_of_time_names () const =0 |
Get a set of all FunctionOfTime names used in this mapping. More... | |
virtual tnsr::I< double, Dim, TargetFrame > | operator() (tnsr::I< double, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Apply the Maps to the point(s) source_point | |
virtual tnsr::I< DataVector, Dim, TargetFrame > | operator() (tnsr::I< DataVector, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Apply the Maps to the point(s) source_point | |
virtual std::optional< tnsr::I< double, Dim, SourceFrame > > | inverse (tnsr::I< double, Dim, TargetFrame > target_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Apply the inverse Maps to the point(s) target_point . The returned std::optional is invalid if the map is not invertible at target_point , or if target_point can be easily determined to not make sense for the map. An example of the latter is passing a point with a negative value of z into a positive-z Wedge<3> inverse map. The inverse function is only callable with doubles because the inverse might fail if called for a point out of range, and it is unclear what should happen if the inverse were to succeed for some points in a DataVector but fail for other points. | |
virtual InverseJacobian< double, Dim, SourceFrame, TargetFrame > | inv_jacobian (tnsr::I< double, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Compute the inverse Jacobian of the Maps at the point(s) source_point | |
virtual InverseJacobian< DataVector, Dim, SourceFrame, TargetFrame > | inv_jacobian (tnsr::I< DataVector, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Compute the inverse Jacobian of the Maps at the point(s) source_point | |
virtual Jacobian< double, Dim, SourceFrame, TargetFrame > | jacobian (tnsr::I< double, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Compute the Jacobian of the Maps at the point(s) source_point | |
virtual Jacobian< DataVector, Dim, SourceFrame, TargetFrame > | jacobian (tnsr::I< DataVector, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Compute the Jacobian of the Maps at the point(s) source_point | |
virtual std::tuple< tnsr::I< double, Dim, TargetFrame >, InverseJacobian< double, Dim, SourceFrame, TargetFrame >, Jacobian< double, Dim, SourceFrame, TargetFrame >, tnsr::I< double, Dim, TargetFrame > > | coords_frame_velocity_jacobians (tnsr::I< double, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Compute the mapped coordinates, frame velocity, Jacobian, and inverse Jacobian. | |
virtual std::tuple< tnsr::I< DataVector, Dim, TargetFrame >, InverseJacobian< DataVector, Dim, SourceFrame, TargetFrame >, Jacobian< DataVector, Dim, SourceFrame, TargetFrame >, tnsr::I< DataVector, Dim, TargetFrame > > | coords_frame_velocity_jacobians (tnsr::I< DataVector, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const =0 |
Compute the mapped coordinates, frame velocity, Jacobian, and inverse Jacobian. | |
Static Public Attributes | |
static constexpr size_t | dim = Dim |
Friends | |
bool | operator== (const CoordinateMapBase &lhs, const CoordinateMapBase &rhs) |
bool | operator!= (const CoordinateMapBase &lhs, const CoordinateMapBase &rhs) |
Abstract base class for CoordinateMap.
|
pure virtual |
Get a set of all FunctionOfTime names used in this mapping.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >.
|
pure virtual |
Retrieve the same map but going from SourceFrame
to Frame::Grid
.
This functionality is needed when composing time-dependent maps with time-independent maps, where the target frame of the time-independent map is Frame::Grid
.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >.
|
pure virtual |
Returns true
if the inverse Jacobian depends on time.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >.
|
pure virtual |
Returns true
if the map is the identity.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >.
|
pure virtual |
Returns true
if the Jacobian depends on time.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >.