Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
CoordinateMap< SourceFrame, TargetFrame, Maps > Class Template Reference

A coordinate map or composition of coordinate maps. More...

#include <CoordinateMap.hpp>

Public Types

using source_frame = SourceFrame
 
using target_frame = TargetFrame
 
using maps_list = tmpl::list< Maps... >
 
- Public Types inherited from CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > >
using source_frame = SourceFrame
 
using target_frame = TargetFrame
 

Public Member Functions

 CoordinateMap ()=default
 Used for Charm++ serialization.
 
 CoordinateMap (const CoordinateMap &)=default
 
CoordinateMapoperator= (const CoordinateMap &)=default
 
 CoordinateMap (CoordinateMap &&)=default
 
CoordinateMapoperator= (CoordinateMap &&)=default
 
constexpr CoordinateMap (Maps... maps)
 
std::unique_ptr< CoordinateMapBase< SourceFrame, TargetFrame, dim > > get_clone () const override
 
 WRAPPED_PUPable_decl_base_template (SINGLE_ARG(CoordinateMapBase< SourceFrame, TargetFrame, dim >), CoordinateMap)
 
 CoordinateMap (CkMigrateMessage *)
 
void pup (PUP::er &p) override
 
template<typename T , size_t... Is>
constexpr tnsr::I< T, CoordinateMap< SourceFrame, TargetFrame, Maps... >::dim, TargetFrame > call_impl (tnsr::I< T, dim, SourceFrame > &&source_point, const double time, const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list, std::index_sequence< Is... >) const noexcept
 
template<typename T , size_t... Is>
constexpr boost::optional< tnsr::I< T, CoordinateMap< SourceFrame, TargetFrame, Maps... >::dim, SourceFrame > > inverse_impl (tnsr::I< T, dim, TargetFrame > &&target_point, const double time, const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list, std::index_sequence< Is... >) const noexcept
 
template<typename T >
constexpr auto inv_jacobian_impl (tnsr::I< T, dim, SourceFrame > &&source_point, const double time, const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list) const noexcept -> InverseJacobian< T, dim, SourceFrame, TargetFrame >
 
template<typename T >
constexpr auto jacobian_impl (tnsr::I< T, dim, SourceFrame > &&source_point, const double time, const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list) const noexcept -> Jacobian< T, dim, SourceFrame, TargetFrame >
 
constexpr tnsr::I< double, dim, TargetFrame > operator() (tnsr::I< double, dim, SourceFrame > source_point, const double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list=std::unordered_map< std::string, FunctionOfTime &>{}) const noexcept override
 Apply the Maps... to the point(s) source_point
 
constexpr tnsr::I< DataVector, dim, TargetFrame > operator() (tnsr::I< DataVector, dim, SourceFrame > source_point, const double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list=std::unordered_map< std::string, FunctionOfTime &>{}) const noexcept override
 Apply the Maps... to the point(s) source_point
 
constexpr boost::optional< tnsr::I< double, dim, SourceFrame > > inverse (tnsr::I< double, dim, TargetFrame > target_point, const double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list=std::unordered_map< std::string, FunctionOfTime &>{}) const noexcept override
 Apply the inverse Maps... to the point(s) target_point
 
constexpr InverseJacobian< double, dim, SourceFrame, TargetFrame > inv_jacobian (tnsr::I< double, dim, SourceFrame > source_point, const double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list=std::unordered_map< std::string, FunctionOfTime &>{}) const noexcept override
 Compute the inverse Jacobian of the Maps... at the point(s) source_point
 
constexpr InverseJacobian< DataVector, dim, SourceFrame, TargetFrame > inv_jacobian (tnsr::I< DataVector, dim, SourceFrame > source_point, const double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list=std::unordered_map< std::string, FunctionOfTime &>{}) const noexcept override
 Compute the inverse Jacobian of the Maps... at the point(s) source_point
 
constexpr Jacobian< double, dim, SourceFrame, TargetFrame > jacobian (tnsr::I< double, dim, SourceFrame > source_point, const double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list=std::unordered_map< std::string, FunctionOfTime &>{}) const noexcept override
 Compute the Jacobian of the Maps... at the point(s) source_point
 
constexpr Jacobian< DataVector, dim, SourceFrame, TargetFrame > jacobian (tnsr::I< DataVector, dim, SourceFrame > source_point, const double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, FunctionOfTime &> &f_of_t_list=std::unordered_map< std::string, FunctionOfTime &>{}) const noexcept override
 Compute the Jacobian of the Maps... at the point(s) source_point
 
- Public Member Functions inherited from CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > >
 WRAPPED_PUPable_abstract (CoordinateMapBase)
 
 CoordinateMapBase (const CoordinateMapBase &)=default
 
 CoordinateMapBase (CoordinateMapBase &&)=default
 
CoordinateMapBaseoperator= (const CoordinateMapBase &)=default
 
CoordinateMapBaseoperator= (CoordinateMapBase &&)=default
 
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, FunctionOfTime & > &f_of_t_list=std::unordered_map< std::string, FunctionOfTime & >{}) const noexcept=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, FunctionOfTime & > &f_of_t_list=std::unordered_map< std::string, FunctionOfTime & >{}) const noexcept=0
 Apply the Maps to the point(s) source_point
 
virtual boost::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, FunctionOfTime & > &f_of_t_list=std::unordered_map< std::string, FunctionOfTime & >{}) const noexcept=0
 Apply the inverse Maps to the point(s) target_point. The returned boost::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 Wedge3D inverse map.
 
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, FunctionOfTime & > &f_of_t_list=std::unordered_map< std::string, FunctionOfTime & >{}) const noexcept=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, FunctionOfTime & > &f_of_t_list=std::unordered_map< std::string, FunctionOfTime & >{}) const noexcept=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, FunctionOfTime & > &f_of_t_list=std::unordered_map< std::string, FunctionOfTime & >{}) const noexcept=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, FunctionOfTime & > &f_of_t_list=std::unordered_map< std::string, FunctionOfTime & >{}) const noexcept=0
 Compute the Jacobian of the Maps at the point(s) source_point
 

Static Public Attributes

static constexpr size_t dim = CoordinateMaps::map_dim<Maps...>
 
- Static Public Attributes inherited from CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > >
static constexpr size_t dim
 

Friends

bool operator== (const CoordinateMap &lhs, const CoordinateMap &rhs) noexcept
 

Detailed Description

template<typename SourceFrame, typename TargetFrame, typename... Maps>
class CoordinateMap< SourceFrame, TargetFrame, Maps >

A coordinate map or composition of coordinate maps.

Maps coordinates from the SourceFrame to the TargetFrame using the coordinate maps Maps.... The individual maps are applied left to right from the source to the target Frame. The inverse map, as well as Jacobian and inverse Jacobian are also provided. The CoordinateMap class must be used even if just wrapping a single coordinate map. It is designed to be an extremely minimal interface to the underlying coordinate maps. For a list of all coordinate maps see the CoordinateMaps group or namespace.

Each coordinate map must contain a static constexpr size_t dim variable that is equal to the dimensionality of the map. The Coordinatemap class contains a member static constexpr size_t dim, a type alias source_frame, a type alias target_frame and typelist of theMaps...`.


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