SpECTRE  v2021.11.01
domain::creators::AlignedLattice< VolumeDim > Class Template Reference

Create a Domain consisting of multiple aligned Blocks arrayed in a lattice. More...

#include <AlignedLattice.hpp>

Classes

struct  BlockBounds
 
struct  BlocksToExclude
 
struct  BoundaryCondition
 
struct  InitialGridPoints
 
struct  InitialLevels
 
struct  IsPeriodicIn
 
struct  RefinedGridPoints
 
struct  RefinedLevels
 

Public Types

using maps_list = tmpl::list< domain::CoordinateMap< Frame::BlockLogical, Frame::Inertial, CoordinateMaps::Affine >, domain::CoordinateMap< Frame::BlockLogical, Frame::Inertial, CoordinateMaps::ProductOf2Maps< CoordinateMaps::Affine, CoordinateMaps::Affine > >, domain::CoordinateMap< Frame::BlockLogical, Frame::Inertial, CoordinateMaps::ProductOf3Maps< CoordinateMaps::Affine, CoordinateMaps::Affine, CoordinateMaps::Affine > > >
 
using common_options = tmpl::list< BlockBounds, InitialLevels, InitialGridPoints, RefinedLevels, RefinedGridPoints, BlocksToExclude >
 
using options_periodic = tmpl::list< IsPeriodicIn >
 
template<typename Metavariables >
using options = tmpl::append< common_options, tmpl::conditional_t< domain::BoundaryConditions::has_boundary_conditions_base_v< typename Metavariables::system >, tmpl::list< BoundaryCondition< domain::BoundaryConditions::get_boundary_conditions_base< typename Metavariables::system > > >, options_periodic > >
 

Public Member Functions

 AlignedLattice (typename BlockBounds::type block_bounds, typename InitialLevels::type initial_refinement_levels, typename InitialGridPoints::type initial_number_of_grid_points, typename RefinedLevels::type refined_refinement, typename RefinedGridPoints::type refined_grid_points, typename BlocksToExclude::type blocks_to_exclude, typename IsPeriodicIn::type is_periodic_in, const Options::Context &context={})
 
 AlignedLattice (typename BlockBounds::type block_bounds, typename InitialLevels::type initial_refinement_levels, typename InitialGridPoints::type initial_number_of_grid_points, typename RefinedLevels::type refined_refinement, typename RefinedGridPoints::type refined_grid_points, typename BlocksToExclude::type blocks_to_exclude, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > boundary_condition=nullptr, const Options::Context &context={})
 
 AlignedLattice (const AlignedLattice &)=delete
 
 AlignedLattice (AlignedLattice &&)=default
 
AlignedLatticeoperator= (const AlignedLattice &)=delete
 
AlignedLatticeoperator= (AlignedLattice &&)=default
 
Domain< VolumeDim > create_domain () const override
 
std::vector< std::array< size_t, VolumeDim > > initial_extents () const override
 Obtain the initial grid extents of the Elements in each block. More...
 
std::vector< std::array< size_t, VolumeDim > > initial_refinement_levels () const override
 Obtain the initial refinement levels of the blocks. More...
 
- Public Member Functions inherited from DomainCreator< VolumeDim >
 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). 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. More...
 
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, 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

template<size_t VolumeDim>
class domain::creators::AlignedLattice< VolumeDim >

Create a Domain consisting of multiple aligned Blocks arrayed in a lattice.

This is useful for setting up problems with piecewise smooth initial data, problems that specify different boundary conditions on distinct parts of the boundary, or problems that need different length scales initially.

Note
Adaptive mesh refinement can never join Blocks, so use the fewest number of Blocks that your problem needs. More initial Elements can be created by specifying a larger InitialRefinement.

Member Function Documentation

◆ create_domain()

template<size_t VolumeDim>
Domain< VolumeDim > domain::creators::AlignedLattice< VolumeDim >::create_domain ( ) const
overridevirtual

◆ initial_extents()

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

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

Implements DomainCreator< VolumeDim >.

◆ initial_refinement_levels()

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

Obtain the initial refinement levels of the blocks.

Implements DomainCreator< VolumeDim >.

Member Data Documentation

◆ help

template<size_t VolumeDim>
constexpr Options::String domain::creators::AlignedLattice< VolumeDim >::help
staticconstexpr
Initial value:
= {
"AlignedLattice creates a regular lattice of blocks whose corners are\n"
"given by tensor products of the specified BlockBounds. Each Block in\n"
"the lattice is identified by a VolumeDim-tuple of zero-based indices\n"
"Supplying a list of these tuples to BlocksToExclude will result in\n"
"the domain having the corresponding Blocks excluded. See the Domain\n"
"Creation tutorial in the documentation for more information on Block\n"
"numberings in rectilinear domains. Note that if any Blocks are\n"
"excluded, setting the option IsPeriodicIn to `true` in any dimension\n"
"will trigger an error, as periodic boundary\n"
"conditions for this domain with holes is not supported."}

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