SpECTRE  v2021.12.06
domain::creators::RotatedIntervals Class Reference

Create a 1D Domain consisting of two rotated Blocks. The left block has its logical \(\xi\)-axis aligned with the grid x-axis. The right block has its logical \(\xi\)-axis opposite to the grid x-axis. This is useful for testing code that deals with unaligned blocks. More...

#include <RotatedIntervals.hpp>

Classes

struct  BoundaryConditions
 
struct  InitialGridPoints
 
struct  InitialRefinement
 
struct  IsPeriodicIn
 
struct  LowerBound
 
struct  LowerBoundaryCondition
 
struct  Midpoint
 
struct  TimeDependence
 
struct  UpperBound
 
struct  UpperBoundaryCondition
 

Public Types

using maps_list = tmpl::list< domain::CoordinateMap< Frame::BlockLogical, Frame::Inertial, domain::CoordinateMaps::DiscreteRotation< 1 >, CoordinateMaps::Affine > >
 
using common_options = tmpl::list< LowerBound, Midpoint, UpperBound, InitialRefinement, InitialGridPoints >
 
using options_periodic = tmpl::list< IsPeriodicIn >
 
template<typename System >
using options_boundary_conditions = tmpl::list< LowerBoundaryCondition< domain::BoundaryConditions::get_boundary_conditions_base< System > >, UpperBoundaryCondition< domain::BoundaryConditions::get_boundary_conditions_base< System > > >
 
template<typename Metavariables >
using options = tmpl::append< common_options, tmpl::conditional_t< domain::BoundaryConditions::has_boundary_conditions_base_v< typename Metavariables::system >, options_boundary_conditions< typename Metavariables::system >, options_periodic >, tmpl::list< TimeDependence > >
 

Public Member Functions

 RotatedIntervals (std::array< double, 1 > lower_x, std::array< double, 1 > midpoint_x, std::array< double, 1 > upper_x, std::array< size_t, 1 > initial_refinement_level_x, std::array< std::array< size_t, 2 >, 1 > initial_number_of_grid_points_in_x, std::array< bool, 1 > is_periodic_in, std::unique_ptr< domain::creators::time_dependence::TimeDependence< 1 > > time_dependence)
 
 RotatedIntervals (std::array< double, 1 > lower_x, std::array< double, 1 > midpoint_x, std::array< double, 1 > upper_x, std::array< size_t, 1 > initial_refinement_level_x, std::array< std::array< size_t, 2 >, 1 > initial_number_of_grid_points_in_x, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > lower_boundary_condition, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > upper_boundary_condition, std::unique_ptr< domain::creators::time_dependence::TimeDependence< 1 > > time_dependence, const Options::Context &context={})
 
 RotatedIntervals (const RotatedIntervals &)=delete
 
 RotatedIntervals (RotatedIntervals &&)=default
 
RotatedIntervalsoperator= (const RotatedIntervals &)=delete
 
RotatedIntervalsoperator= (RotatedIntervals &&)=default
 
Domain< 1 > create_domain () const override
 
std::vector< std::array< size_t, 1 > > initial_extents () const override
 Obtain the initial grid extents of the Elements in each block. More...
 
std::vector< std::array< size_t, 1 > > initial_refinement_levels () const override
 Obtain the initial refinement levels of the blocks. 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
 Retrieve the functions of time used for moving meshes. More...
 
- Public Member Functions inherited from DomainCreator< 1 >
 DomainCreator (const DomainCreator< VolumeDim > &)=delete
 
 DomainCreator (DomainCreator< VolumeDim > &&)=default
 
DomainCreator< VolumeDim > & operator= (const DomainCreator< VolumeDim > &)=delete
 
DomainCreator< VolumeDim > & operator= (DomainCreator< VolumeDim > &&)=default
 
virtual Domain< VolumeDim > create_domain () const=0
 
virtual std::vector< std::stringblock_names () const
 A human-readable name for every block, or empty if the domain creator doesn't support block names (yet).
 
virtual std::unordered_map< std::string, std::unordered_set< std::string > > block_groups () const
 Labels to refer to groups of blocks. The groups can overlap, and they don't have to cover all blocks in the domain. The groups can be used to refer to multiple blocks at once when specifying input-file options.
 
virtual std::vector< std::array< size_t, VolumeDim > > initial_extents () const=0
 Obtain the initial grid extents of the Elements in each block. More...
 
virtual std::vector< std::array< size_t, VolumeDim > > initial_refinement_levels () const=0
 Obtain the initial refinement levels of the blocks. 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 > >
 Retrieve the functions of time used for moving meshes. More...
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

Create a 1D Domain consisting of two rotated Blocks. The left block has its logical \(\xi\)-axis aligned with the grid x-axis. The right block has its logical \(\xi\)-axis opposite to the grid x-axis. This is useful for testing code that deals with unaligned blocks.

Member Function Documentation

◆ create_domain()

Domain< 1 > domain::creators::RotatedIntervals::create_domain ( ) const
overridevirtual

Implements DomainCreator< 1 >.

◆ functions_of_time()

auto domain::creators::RotatedIntervals::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

Retrieve the functions of time used for moving meshes.

Reimplemented from DomainCreator< 1 >.

◆ initial_extents()

std::vector< std::array< size_t, 1 > > domain::creators::RotatedIntervals::initial_extents ( ) const
overridevirtual

Obtain the initial grid extents of the Elements in each block.

Implements DomainCreator< 1 >.

◆ initial_refinement_levels()

std::vector< std::array< size_t, 1 > > domain::creators::RotatedIntervals::initial_refinement_levels ( ) const
overridevirtual

Obtain the initial refinement levels of the blocks.

Implements DomainCreator< 1 >.

Member Data Documentation

◆ help

constexpr Options::String domain::creators::RotatedIntervals::help
staticconstexpr
Initial value:
= {
"A DomainCreator useful for testing purposes.\n"
"RotatedIntervals creates the interval [LowerX,UpperX] from two\n"
"rotated Blocks. The outermost index to InitialGridPoints is the\n"
"dimension index (of which there is only one in the case of\n"
"RotatedIntervals), and the innermost index is the block index\n"
"along that dimension."}

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