SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
domain::creators::AlignedLattice< Dim > 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  InitialGridPoints
struct  InitialLevels
struct  IsPeriodicIn
struct  RefinedGridPoints
struct  RefinedLevels

Public Types

using maps_list
template<typename Metavariables>
using options

Public Member Functions

 AlignedLattice (std::array< std::vector< double >, Dim > block_bounds, std::array< size_t, Dim > initial_refinement_levels, std::array< size_t, Dim > initial_number_of_grid_points, std::vector< RefinementRegion< Dim > > refined_refinement, std::vector< RefinementRegion< Dim > > refined_grid_points, std::vector< std::array< size_t, Dim > > blocks_to_exclude, std::array< bool, Dim > is_periodic_in=make_array< Dim >(false), const Options::Context &context={})
 AlignedLattice (std::array< std::vector< double >, Dim > block_bounds, std::array< size_t, Dim > initial_refinement_levels, std::array< size_t, Dim > initial_number_of_grid_points, std::vector< RefinementRegion< Dim > > refined_refinement, std::vector< RefinementRegion< Dim > > refined_grid_points, std::vector< std::array< size_t, Dim > > blocks_to_exclude, std::array< std::array< std::unique_ptr< domain::BoundaryConditions::BoundaryCondition >, 2 >, Dim > boundary_conditions, const Options::Context &context={})
template<typename BoundaryConditionsBase>
 AlignedLattice (std::array< std::vector< double >, Dim > block_bounds, std::array< size_t, Dim > initial_refinement_levels, std::array< size_t, Dim > initial_number_of_grid_points, std::vector< RefinementRegion< Dim > > refined_refinement, std::vector< RefinementRegion< Dim > > refined_grid_points, std::vector< std::array< size_t, Dim > > blocks_to_exclude, std::array< std::variant< std::unique_ptr< BoundaryConditionsBase >, typename Rectilinear< Dim >::template LowerUpperBoundaryCondition< BoundaryConditionsBase > >, Dim > boundary_conditions, const Options::Context &context={})
 AlignedLattice (const AlignedLattice &)=delete
 AlignedLattice (AlignedLattice &&)=default
AlignedLatticeoperator= (const AlignedLattice &)=delete
AlignedLatticeoperator= (AlignedLattice &&)=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.
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).
std::vector< std::array< size_t, Dim > > initial_extents () const override
 Obtain the initial grid extents of the Elements in each block.
std::vector< std::array< size_t, Dim > > initial_refinement_levels () const override
 Obtain the initial refinement levels of the blocks.
Public Member Functions inherited from DomainCreator< Dim >
DomainCreator< VolumeDim > & operator= (const DomainCreator< VolumeDim > &)=delete
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::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 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.

Static Public Attributes

static constexpr Options::String help
Static Public Attributes inherited from DomainCreator< Dim >
static constexpr size_t volume_dim

Detailed Description

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

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 Typedef Documentation

◆ maps_list

template<size_t Dim>
using domain::creators::AlignedLattice< Dim >::maps_list
Initial value:
tmpl::list<
A coordinate map or composition of coordinate maps.
Definition CoordinateMap.hpp:314
Affine map from .
Definition Affine.hpp:37
Product of two codimension=0 CoordinateMaps.
Definition ProductMaps.hpp:35
Product of three one-dimensional CoordinateMaps.
Definition ProductMaps.hpp:92
Definition IndexType.hpp:42
Definition IndexType.hpp:46

◆ options

template<size_t Dim>
template<typename Metavariables>
using domain::creators::AlignedLattice< Dim >::options
Initial value:
tmpl::list<
tmpl::conditional_t<
domain::BoundaryConditions::has_boundary_conditions_base_v<
typename Metavariables::system>,
typename Metavariables::system>>,
Create a domain consisting of a single Block in Dim dimensions.
Definition Rectilinear.hpp:46
Domain support for applying boundary conditions
Definition BoundaryCondition.hpp:14
typename detail::get_boundary_conditions_base< T >::type get_boundary_conditions_base
Returns T::boundary_condition_base or a placeholder class.
Definition GetBoundaryConditionsBase.hpp:32
Definition AlignedLattice.hpp:112
Definition AlignedLattice.hpp:148
Definition AlignedLattice.hpp:124
Definition AlignedLattice.hpp:118
Definition AlignedLattice.hpp:136

Member Function Documentation

◆ block_names()

template<size_t Dim>
std::vector< std::string > domain::creators::AlignedLattice< Dim >::block_names ( ) const
overridevirtual

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::AlignedLattice< 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::AlignedLattice< Dim >::external_boundary_conditions ( ) const
overridevirtual

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

Implements DomainCreator< Dim >.

◆ initial_extents()

template<size_t Dim>
std::vector< std::array< size_t, Dim > > domain::creators::AlignedLattice< 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::AlignedLattice< Dim >::initial_refinement_levels ( ) const
overridevirtual

Obtain the initial refinement levels of the blocks.

Implements DomainCreator< Dim >.

Member Data Documentation

◆ help

template<size_t Dim>
Options::String domain::creators::AlignedLattice< Dim >::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 Dim-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:
  • src/Domain/Creators/AlignedLattice.hpp