|
SpECTRE
2021.08.02
|
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 domain::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 | |
| CoordinateMap & | operator= (const CoordinateMap &)=default |
| CoordinateMap (CoordinateMap &&)=default | |
| CoordinateMap & | operator= (CoordinateMap &&)=default |
| CoordinateMap (Maps... maps) | |
| std::unique_ptr< CoordinateMapBase< SourceFrame, TargetFrame, dim > > | get_clone () const override |
| std::unique_ptr< CoordinateMapBase< SourceFrame, Frame::Grid, dim > > | get_to_grid_frame () const override |
Retrieve the same map but going from SourceFrame to Frame::Grid. More... | |
| bool | is_identity () const noexcept override |
Returns true if the map is the identity. More... | |
| bool | inv_jacobian_is_time_dependent () const noexcept override |
Returns true if the inverse Jacobian depends on time. More... | |
| bool | jacobian_is_time_dependent () const noexcept override |
Returns true if the Jacobian depends on time. More... | |
| WRAPPED_PUPable_decl_base_template (SINGLE_ARG(CoordinateMapBase< SourceFrame, TargetFrame, dim >), CoordinateMap) | |
| CoordinateMap (CkMigrateMessage *) | |
| void | pup (PUP::er &p) override |
| 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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const noexcept override |
Apply the Maps... to the point(s) source_point | |
| constexpr std::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const noexcept override |
Compute the Jacobian of the Maps... at the point(s) source_point | |
| 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, const 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 noexcept override |
| Compute the mapped coordinates, frame velocity, Jacobian, and inverse Jacobian. | |
| 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, const 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 noexcept override |
| Compute the mapped coordinates, frame velocity, Jacobian, and inverse Jacobian. | |
Public Member Functions inherited from domain::CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > > | |
| WRAPPED_PUPable_abstract (CoordinateMapBase) | |
| CoordinateMapBase (const CoordinateMapBase &)=default | |
| CoordinateMapBase (CoordinateMapBase &&)=default | |
| CoordinateMapBase & | operator= (const CoordinateMapBase &)=default |
| CoordinateMapBase & | operator= (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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const noexcept=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 noexcept=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 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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::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, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) const noexcept=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 noexcept=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 noexcept=0 |
| Compute the mapped coordinates, frame velocity, Jacobian, and inverse Jacobian. | |
Static Public Attributes | |
| static constexpr size_t | dim = CoordinateMaps::map_dim<Maps...> |
Static Public Attributes inherited from domain::CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > > | |
| static constexpr size_t | dim |
Friends | |
| bool | operator== (const CoordinateMap &lhs, const CoordinateMap &rhs) noexcept |
| template<typename NewMap , typename LocalSourceFrame , typename LocalTargetFrame , typename... LocalMaps, size_t... Is> | |
| CoordinateMap< LocalSourceFrame, LocalTargetFrame, LocalMaps..., NewMap > | push_back_impl (CoordinateMap< LocalSourceFrame, LocalTargetFrame, LocalMaps... > &&old_map, NewMap new_map, std::index_sequence< Is... >) noexcept |
| template<typename... NewMaps, typename LocalSourceFrame , typename LocalTargetFrame , typename... LocalMaps, size_t... Is, size_t... Js> | |
| CoordinateMap< LocalSourceFrame, LocalTargetFrame, LocalMaps..., NewMaps... > | push_back_impl (CoordinateMap< LocalSourceFrame, LocalTargetFrame, LocalMaps... > &&old_map, CoordinateMap< LocalSourceFrame, LocalTargetFrame, NewMaps... > new_map, std::index_sequence< Is... >, std::index_sequence< Js... >) noexcept |
| template<typename NewMap , typename LocalSourceFrame , typename LocalTargetFrame , typename... LocalMaps, size_t... Is> | |
| CoordinateMap< LocalSourceFrame, LocalTargetFrame, NewMap, LocalMaps... > | push_front_impl (CoordinateMap< LocalSourceFrame, LocalTargetFrame, LocalMaps... > &&old_map, NewMap new_map, std::index_sequence< Is... >) noexcept |
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...`.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
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.
Implements domain::CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > >.
|
overridevirtualnoexcept |
Returns true if the inverse Jacobian depends on time.
Implements domain::CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > >.
|
overridevirtualnoexcept |
Returns true if the map is the identity.
Implements domain::CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > >.
|
overridevirtualnoexcept |
Returns true if the Jacobian depends on time.
Implements domain::CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMaps::map_dim< Maps... > >.