|
SpECTRE
v2026.04.01
|
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. | |
| virtual bool | is_identity () const =0 |
| Returns true if the map is the identity. | |
| virtual bool | inv_jacobian_is_time_dependent () const =0 |
| Returns true if the inverse Jacobian depends on time. | |
| virtual bool | jacobian_is_time_dependent () const =0 |
| Returns true if the Jacobian depends on time. | |
| virtual const std::unordered_set< std::string > & | function_of_time_names () const =0 |
| Get a set of all FunctionOfTime names used in this mapping. | |
| virtual bool | supports_hessian () const =0 |
| Returns true if this CoordinateMap supports autodiff. | |
| virtual tnsr::I< double, Dim, TargetFrame > | operator() (tnsr::I< double, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &functions_of_time={}) 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 FunctionsOfTimeMap &functions_of_time={}) const =0 |
| Apply the Maps to the point(s) source_point | |
| virtual tnsr::I< autodiff::HigherOrderDual< 2, double >, Dim, TargetFrame > | operator() (tnsr::I< autodiff::HigherOrderDual< 2, double >, Dim, SourceFrame >, double=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &={}) const |
| Apply the Maps to the point(s) source_point | |
| virtual tnsr::I< autodiff::HigherOrderDual< 2, simd::batch< double > >, Dim, TargetFrame > | operator() (tnsr::I< autodiff::HigherOrderDual< 2, simd::batch< double > >, Dim, SourceFrame >, double=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &={}) const |
| 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 FunctionsOfTimeMap &functions_of_time={}) 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 FunctionsOfTimeMap &functions_of_time={}) 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 FunctionsOfTimeMap &functions_of_time={}) const =0 |
| Compute the inverse Jacobian of the Maps at the point(s) source_point | |
| virtual InverseJacobian< autodiff::HigherOrderDual< 2, double >, Dim, SourceFrame, TargetFrame > | inv_jacobian (tnsr::I< autodiff::HigherOrderDual< 2, double >, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &functions_of_time={}) const =0 |
| Compute the inverse Jacobian of the Maps at the point(s) source_point | |
| virtual InverseHessian< double, Dim, SourceFrame, TargetFrame > | inv_hessian (tnsr::I< double, Dim, SourceFrame > source_point, const InverseJacobian< double, Dim, SourceFrame, TargetFrame > &inverse_jac, double time=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &functions_of_time={}) const =0 |
| Compute the inverse Hessian of the Maps at the point(s) source_point | |
| virtual InverseHessian< DataVector, Dim, SourceFrame, TargetFrame > | inv_hessian (tnsr::I< DataVector, Dim, SourceFrame > source_point, const InverseJacobian< DataVector, Dim, SourceFrame, TargetFrame > &inverse_jac, double time=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &functions_of_time={}) const =0 |
| Compute the inverse Hessian 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 FunctionsOfTimeMap &functions_of_time={}) 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 FunctionsOfTimeMap &functions_of_time={}) const =0 |
| Compute the Jacobian of the Maps at the point(s) source_point | |
| virtual auto | coords_frame_velocity_jacobians (tnsr::I< double, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &functions_of_time={}) const -> std::tuple< tnsr::I< double, Dim, TargetFrame >, InverseJacobian< double, Dim, SourceFrame, TargetFrame >, Jacobian< double, Dim, SourceFrame, TargetFrame >, tnsr::I< double, Dim, TargetFrame > >=0 |
| Compute the mapped coordinates, frame velocity, Jacobian, and inverse Jacobian. | |
| virtual auto | coords_frame_velocity_jacobians (tnsr::I< DataVector, Dim, SourceFrame > source_point, double time=std::numeric_limits< double >::signaling_NaN(), const FunctionsOfTimeMap &functions_of_time={}) const -> std::tuple< tnsr::I< DataVector, Dim, TargetFrame >, InverseJacobian< DataVector, Dim, SourceFrame, TargetFrame >, Jacobian< DataVector, Dim, SourceFrame, TargetFrame >, tnsr::I< DataVector, Dim, TargetFrame > >=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 >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap, RotScaleTransMap >, domain::CoordinateMap< SourceFrame, TargetFrame, IdentityMap >, and 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 >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap, RotScaleTransMap >, domain::CoordinateMap< SourceFrame, TargetFrame, IdentityMap >, and domain::CoordinateMap< SourceFrame, TargetFrame, Maps... >.
|
pure virtual |
Compute the inverse Hessian of the Maps at the point(s) source_point
|
pure virtual |
Compute the inverse Hessian of the Maps at the point(s) source_point
|
pure virtual |
Returns true if the inverse Jacobian depends on time.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap, RotScaleTransMap >, domain::CoordinateMap< SourceFrame, TargetFrame, IdentityMap >, and domain::CoordinateMap< SourceFrame, TargetFrame, Maps... >.
|
pure virtual |
Returns true if the map is the identity.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap, RotScaleTransMap >, domain::CoordinateMap< SourceFrame, TargetFrame, IdentityMap >, and domain::CoordinateMap< SourceFrame, TargetFrame, Maps... >.
|
pure virtual |
Returns true if the Jacobian depends on time.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap, RotScaleTransMap >, domain::CoordinateMap< SourceFrame, TargetFrame, IdentityMap >, and domain::CoordinateMap< SourceFrame, TargetFrame, Maps... >.
|
inlinevirtual |
Apply the Maps to the point(s) source_point
|
inlinevirtual |
Apply the Maps to the point(s) source_point
|
pure virtual |
Returns true if this CoordinateMap supports autodiff.
Implemented in domain::CoordinateMap< SourceFrame, TargetFrame, Maps >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Distorted, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Distorted, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, Maps... >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, RotScaleTransMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, ShapeMap, RotScaleTransMap >, domain::CoordinateMap< SourceFrame, TargetFrame, IdentityMap >, and domain::CoordinateMap< SourceFrame, TargetFrame, Maps... >.