SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
domain::CoordinateMapBase< SourceFrame, TargetFrame, Dim > Class Template Referenceabstract

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
CoordinateMapBaseoperator= (const CoordinateMapBase &)=default
 CoordinateMapBase (CoordinateMapBase &&)=default
CoordinateMapBaseoperator= (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)

Detailed Description

template<typename SourceFrame, typename TargetFrame, size_t Dim>
class domain::CoordinateMapBase< SourceFrame, TargetFrame, Dim >

Abstract base class for CoordinateMap.

Member Function Documentation

◆ function_of_time_names()

◆ get_to_grid_frame()

◆ inv_hessian() [1/2]

template<typename SourceFrame, typename TargetFrame, size_t Dim>
virtual InverseHessian< DataVector, Dim, SourceFrame, TargetFrame > domain::CoordinateMapBase< SourceFrame, TargetFrame, Dim >::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
pure virtual

Compute the inverse Hessian of the Maps at the point(s) source_point

Note
Require SPECTRE_AUTODIFF=ON.

◆ inv_hessian() [2/2]

template<typename SourceFrame, typename TargetFrame, size_t Dim>
virtual InverseHessian< double, Dim, SourceFrame, TargetFrame > domain::CoordinateMapBase< SourceFrame, TargetFrame, Dim >::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
pure virtual

Compute the inverse Hessian of the Maps at the point(s) source_point

Note
Require SPECTRE_AUTODIFF=ON.

◆ inv_jacobian_is_time_dependent()

◆ is_identity()

◆ jacobian_is_time_dependent()

◆ operator()() [1/2]

template<typename SourceFrame, typename TargetFrame, size_t Dim>
virtual tnsr::I< autodiff::HigherOrderDual< 2, double >, Dim, TargetFrame > domain::CoordinateMapBase< SourceFrame, TargetFrame, Dim >::operator() ( tnsr::I< autodiff::HigherOrderDual< 2, double >, Dim, SourceFrame > ,
double = std::numeric_limits<double>::signaling_NaN(),
const FunctionsOfTimeMap & = {} ) const
inlinevirtual

Apply the Maps to the point(s) source_point

Note
Require SPECTRE_AUTODIFF=ON.

◆ operator()() [2/2]

template<typename SourceFrame, typename TargetFrame, size_t Dim>
virtual tnsr::I< autodiff::HigherOrderDual< 2, simd::batch< double > >, Dim, TargetFrame > domain::CoordinateMapBase< SourceFrame, TargetFrame, Dim >::operator() ( tnsr::I< autodiff::HigherOrderDual< 2, simd::batch< double > >, Dim, SourceFrame > ,
double = std::numeric_limits<double>::signaling_NaN(),
const FunctionsOfTimeMap & = {} ) const
inlinevirtual

Apply the Maps to the point(s) source_point

Note
Require SPECTRE_AUTODIFF=ON.

◆ supports_hessian()


The documentation for this class was generated from the following file:
  • src/Domain/CoordinateMaps/CoordinateMap.hpp