SpECTRE  v2022.05.05
domain::creators::time_dependence::ScalingAndZRotation< MeshDim > Class Template Referencefinal

Cubic scaling, followed by uniform rotation about the \(z\) axis: More...

#include <ScalingAndZRotation.hpp>

Classes

struct  Acceleration
 The acceleration of the expansion factors. More...
 
struct  AngularVelocity
 The \(x\)-, \(y\)-, and \(z\)-velocity. More...
 
struct  InitialExpansion
 The initial values of the expansion factors. More...
 
struct  InitialTime
 The initial time of the function of time. More...
 
struct  OuterBoundary
 The outer boundary or pivot point of the domain::CoordinateMaps::TimeDependent::CubicScale map. More...
 
struct  UseLinearScaling
 Whether to use linear scaling or cubic scaling. More...
 
struct  Velocity
 The velocity of the expansion factors. More...
 

Public Types

using maps_list = tmpl::list< domain::CoordinateMap< Frame::Grid, Frame::Inertial, Rotation >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CubicScaleMap >, domain::CoordinateMap< Frame::Grid, Frame::Inertial, CoordinateMaps::TimeDependent::ProductOf2Maps< Rotation, Identity > > >
 
using GridToInertialMap = detail::generate_coordinate_map_t< Frame::Grid, Frame::Inertial, tmpl::list< CubicScaleMap, tmpl::conditional_t< MeshDim==2, Rotation, domain::CoordinateMaps::TimeDependent::ProductOf2Maps< Rotation, Identity > > > >
 
using GridToDistortedMap = domain::CoordinateMap< Frame::Grid, Frame::Distorted, CubicScaleMap >
 
using DistortedToInertialMap = detail::generate_coordinate_map_t< Frame::Distorted, Frame::Inertial, tmpl::list< tmpl::conditional_t< MeshDim==2, Rotation, domain::CoordinateMaps::TimeDependent::ProductOf2Maps< Rotation, Identity > > > >
 
using options = tmpl::list< InitialTime, AngularVelocity, OuterBoundary, UseLinearScaling, InitialExpansion, Velocity, Acceleration >
 
- Public Types inherited from domain::creators::time_dependence::TimeDependence< MeshDim >
using creatable_classes = tmpl::append< creatable_classes_any_dim, tmpl::conditional_t< MeshDim==1, creatable_classes_1d, tmpl::conditional_t< MeshDim==2, creatable_classes_2d, creatable_classes_3d > > >
 

Public Member Functions

 ScalingAndZRotation (const ScalingAndZRotation &)=delete
 
 ScalingAndZRotation (ScalingAndZRotation &&)=default
 
ScalingAndZRotationoperator= (const ScalingAndZRotation &)=delete
 
ScalingAndZRotationoperator= (ScalingAndZRotation &&)=default
 
 ScalingAndZRotation (double initial_time, double angular_velocity, double outer_boundary, bool use_linear_scaling, const std::array< double, 2 > &initial_expansion, const std::array< double, 2 > &velocity, const std::array< double, 2 > &acceleration)
 
auto get_clone () const -> std::unique_ptr< TimeDependence< MeshDim > > override
 Returns a std::unique_ptr pointing to a copy of the TimeDependence. More...
 
auto block_maps_grid_to_inertial (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, MeshDim > > > override
 Returns the coordinate maps from the Frame::Grid to the Frame::Inertial frame for each block. More...
 
auto block_maps_grid_to_distorted (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Distorted, MeshDim > > > override
 Returns the coordinate maps from the Frame::Grid to the Frame::Distorted frame for each block. Returns vector of nullptr if there is no distorted frame. More...
 
auto block_maps_distorted_to_inertial (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Distorted, Frame::Inertial, MeshDim > > > override
 Returns the coordinate maps from the Frame::Distorted to the Frame::Inertial frame for each block. Returns vector of nullptr if is no distorted frame. More...
 
auto functions_of_time (const std::unordered_map< std::string, double > &initial_expiration_times={}) const -> std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > override
 Returns the functions of time for the domain. More...
 
- Public Member Functions inherited from domain::creators::time_dependence::TimeDependence< MeshDim >
 TimeDependence (const TimeDependence &)=default
 
TimeDependenceoperator= (const TimeDependence &)=default
 
 TimeDependence (TimeDependence &&)=default
 
TimeDependenceoperator= (TimeDependence &&)=default
 
virtual auto get_clone () const -> std::unique_ptr< TimeDependence >=0
 Returns a std::unique_ptr pointing to a copy of the TimeDependence. More...
 
virtual auto block_maps_grid_to_inertial (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, MeshDim > > >=0
 Returns the coordinate maps from the Frame::Grid to the Frame::Inertial frame for each block. More...
 
virtual auto block_maps_grid_to_distorted (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Distorted, MeshDim > > >=0
 Returns the coordinate maps from the Frame::Grid to the Frame::Distorted frame for each block. Returns vector of nullptr if there is no distorted frame. More...
 
virtual auto block_maps_distorted_to_inertial (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Distorted, Frame::Inertial, MeshDim > > >=0
 Returns the coordinate maps from the Frame::Distorted to the Frame::Inertial frame for each block. Returns vector of nullptr if is no distorted frame. More...
 
virtual auto functions_of_time (const std::unordered_map< std::string, double > &initial_expiration_times={}) const -> std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >=0
 Returns the functions of time for the domain. More...
 
bool is_none () const
 Returns true if the instance is None, meaning no time dependence.
 

Static Public Attributes

static constexpr size_t mesh_dim = MeshDim
 
static constexpr Options::String help
 

Friends

template<size_t LocalDim>
bool operator== (const ScalingAndZRotation< LocalDim > &lhs, const ScalingAndZRotation< LocalDim > &rhs)
 

Detailed Description

template<size_t MeshDim>
class domain::creators::time_dependence::ScalingAndZRotation< MeshDim >

Cubic scaling, followed by uniform rotation about the \(z\) axis:

\begin{eqnarray*} x &\to& x \cos \alpha(t) - y \sin \alpha(t)\text{,} \\ y &\to& x \sin \alpha(t) + y \cos \alpha(t)\text{,} \end{eqnarray*}

where \(\alpha(t)\) is a domain::FunctionsOfTime::FunctionOfTime. For 3 spatial dimensions, \(z \to z\), and the rotation is implemented as a product of the 2D rotation and an identity map. The rotation is undefined (and therefore unimplemented here) for 1 spatial dimension.

The expansion is done by the domain::CoordinateMaps::TimeDependent::CubicScale map. A linear radial scaling can be used by specifying the UseLinearScaling bool.

For this map, the cubic scaling goes from the grid frame to the distorted frame, and the rotation goes from the distorted frame to the inertial frame.

Member Function Documentation

◆ block_maps_distorted_to_inertial()

template<size_t MeshDim>
auto domain::creators::time_dependence::ScalingAndZRotation< MeshDim >::block_maps_distorted_to_inertial ( size_t  number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Distorted, Frame::Inertial, MeshDim > > >
overridevirtual

Returns the coordinate maps from the Frame::Distorted to the Frame::Inertial frame for each block. Returns vector of nullptr if is no distorted frame.

Implements domain::creators::time_dependence::TimeDependence< MeshDim >.

◆ block_maps_grid_to_distorted()

template<size_t MeshDim>
auto domain::creators::time_dependence::ScalingAndZRotation< MeshDim >::block_maps_grid_to_distorted ( size_t  number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Distorted, MeshDim > > >
overridevirtual

Returns the coordinate maps from the Frame::Grid to the Frame::Distorted frame for each block. Returns vector of nullptr if there is no distorted frame.

Implements domain::creators::time_dependence::TimeDependence< MeshDim >.

◆ block_maps_grid_to_inertial()

template<size_t MeshDim>
auto domain::creators::time_dependence::ScalingAndZRotation< MeshDim >::block_maps_grid_to_inertial ( size_t  number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, MeshDim > > >
overridevirtual

Returns the coordinate maps from the Frame::Grid to the Frame::Inertial frame for each block.

Implements domain::creators::time_dependence::TimeDependence< MeshDim >.

◆ functions_of_time()

template<size_t MeshDim>
auto domain::creators::time_dependence::ScalingAndZRotation< MeshDim >::functions_of_time ( const std::unordered_map< std::string, double > &  initial_expiration_times = {}) const -> std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >
overridevirtual

Returns the functions of time for the domain.

Implements domain::creators::time_dependence::TimeDependence< MeshDim >.

◆ get_clone()

template<size_t MeshDim>
auto domain::creators::time_dependence::ScalingAndZRotation< MeshDim >::get_clone ( ) const -> std::unique_ptr< TimeDependence< MeshDim > >
overridevirtual

Member Data Documentation

◆ help

template<size_t MeshDim>
constexpr Options::String domain::creators::time_dependence::ScalingAndZRotation< MeshDim >::help
staticconstexpr
Initial value:
= {
"A spatial radial scaling followed by a rotation about the z-axis.\n"
"The spatial radial scaling is either based on a cubic scaling or a\n"
"simple linear scaling. If the two expansion functions of time have\n"
"the same name then the scaling is a linear radial scaling.\n"
"The spatially uniform rotation about is initialized with a\n"
"constant angular velocity."}

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