SpECTRE  v2024.09.29
domain::creators::Rectilinear< Dim > Class Template Reference

Create a domain consisting of a single Block in Dim dimensions. More...

#include <Rectilinear.hpp>

Classes

struct  BoundaryConditions
 
struct  Distribution
 
struct  InitialGridPoints
 
struct  InitialRefinement
 
struct  IsPeriodicIn
 
struct  LowerBound
 
struct  LowerUpperBoundaryCondition
 
struct  TimeDependence
 
struct  UpperBound
 

Public Types

using maps_list = tmpl::list< domain::CoordinateMap< Frame::BlockLogical, Frame::Inertial, tmpl::conditional_t< Dim==1, Interval, tmpl::conditional_t< Dim==2, Interval2D, Interval3D > > >, domain::CoordinateMap< Frame::BlockLogical, Frame::Inertial, tmpl::conditional_t< Dim==1, Affine, tmpl::conditional_t< Dim==2, Affine2D, Affine3D > > > >
 
template<typename Metavariables >
using options = tmpl::list< LowerBound, UpperBound, InitialRefinement, InitialGridPoints, tmpl::conditional_t< domain::BoundaryConditions::has_boundary_conditions_base_v< typename Metavariables::system >, BoundaryConditions< domain::BoundaryConditions::get_boundary_conditions_base< typename Metavariables::system > >, IsPeriodicIn >, Distribution, TimeDependence >
 

Public Member Functions

 Rectilinear (std::array< double, Dim > lower_bounds, std::array< double, Dim > upper_bounds, std::array< size_t, Dim > initial_refinement_levels, std::array< size_t, Dim > initial_num_points, std::array< bool, Dim > is_periodic=make_array< Dim >(false), std::array< CoordinateMaps::DistributionAndSingularityPosition, Dim > distributions={}, std::unique_ptr< domain::creators::time_dependence::TimeDependence< Dim > > time_dependence=nullptr, const Options::Context &context={})
 
 Rectilinear (std::array< double, Dim > lower_bounds, std::array< double, Dim > upper_bounds, std::array< size_t, Dim > initial_refinement_levels, std::array< size_t, Dim > initial_num_points, std::array< std::array< std::unique_ptr< domain::BoundaryConditions::BoundaryCondition >, 2 >, Dim > boundary_conditions, std::array< CoordinateMaps::DistributionAndSingularityPosition, Dim > distributions={}, std::unique_ptr< domain::creators::time_dependence::TimeDependence< Dim > > time_dependence=nullptr, const Options::Context &context={})
 
template<typename BoundaryConditionsBase >
 Rectilinear (std::array< double, Dim > lower_bounds, std::array< double, Dim > upper_bounds, std::array< size_t, Dim > initial_refinement_levels, std::array< size_t, Dim > initial_num_points, std::array< std::variant< std::unique_ptr< BoundaryConditionsBase >, LowerUpperBoundaryCondition< BoundaryConditionsBase > >, Dim > boundary_conditions, std::array< CoordinateMaps::DistributionAndSingularityPosition, Dim > distributions={}, std::unique_ptr< domain::creators::time_dependence::TimeDependence< Dim > > time_dependence=nullptr, const Options::Context &context={})
 
 Rectilinear (const Rectilinear &)=delete
 
 Rectilinear (Rectilinear &&)=default
 
Rectilinearoperator= (const Rectilinear &)=delete
 
Rectilinearoperator= (Rectilinear &&)=default
 
Domain< Dim > create_domain () const override
 
std::vector< DirectionMap< Dim, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > > > external_boundary_conditions () const override
 The set of external boundary condition for every block in the domain. More...
 
std::vector< std::array< size_t, Dim > > initial_extents () const override
 Obtain the initial grid extents of the Elements in each block. More...
 
std::vector< std::array< size_t, Dim > > 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...
 
std::vector< std::stringblock_names () const override
 A human-readable name for every block, or empty if the domain creator doesn't support block names (yet). More...
 
- Public Member Functions inherited from DomainCreator< Dim >
 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::unordered_map< std::string, tnsr::I< double, VolumeDim, Frame::Grid > > grid_anchors () const
 A set of named coordinates in the grid frame, like the center of the domain or the positions of specific objects in a domain.
 
virtual std::vector< DirectionMap< VolumeDim, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > > > external_boundary_conditions () const=0
 The set of external boundary condition for every block in the domain. More...
 
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). More...
 
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 Member Functions

static std::string name ()
 
template<typename BoundaryConditionsBase >
static auto transform_boundary_conditions (std::array< std::variant< std::unique_ptr< BoundaryConditionsBase >, LowerUpperBoundaryCondition< BoundaryConditionsBase > >, Dim > boundary_conditions) -> std::array< std::array< std::unique_ptr< domain::BoundaryConditions::BoundaryCondition >, 2 >, Dim >
 

Static Public Attributes

static constexpr Options::String help {"A rectilinear domain."}
 
- Static Public Attributes inherited from DomainCreator< Dim >
static constexpr size_t volume_dim
 

Detailed Description

template<size_t Dim>
class domain::creators::Rectilinear< Dim >

Create a domain consisting of a single Block in Dim dimensions.

Member Function Documentation

◆ block_names()

template<size_t Dim>
std::vector< std::string > domain::creators::Rectilinear< Dim >::block_names ( ) const
inlineoverridevirtual

A human-readable name for every block, or empty if the domain creator doesn't support block names (yet).

Reimplemented from DomainCreator< Dim >.

◆ create_domain()

template<size_t Dim>
Domain< Dim > domain::creators::Rectilinear< Dim >::create_domain ( ) const
overridevirtual

Implements DomainCreator< Dim >.

◆ external_boundary_conditions()

template<size_t Dim>
std::vector< DirectionMap< Dim, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > > > domain::creators::Rectilinear< Dim >::external_boundary_conditions ( ) const
overridevirtual

The set of external boundary condition for every block in the domain.

Implements DomainCreator< Dim >.

◆ functions_of_time()

template<size_t Dim>
auto domain::creators::Rectilinear< Dim >::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< Dim >.

◆ initial_extents()

template<size_t Dim>
std::vector< std::array< size_t, Dim > > domain::creators::Rectilinear< Dim >::initial_extents ( ) const
overridevirtual

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

Implements DomainCreator< Dim >.

◆ initial_refinement_levels()

template<size_t Dim>
std::vector< std::array< size_t, Dim > > domain::creators::Rectilinear< Dim >::initial_refinement_levels ( ) const
overridevirtual

Obtain the initial refinement levels of the blocks.

Implements DomainCreator< Dim >.


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