SpECTRE  v2021.11.01
Block< VolumeDim > Class Template Reference

A Block<VolumeDim> is a region of a VolumeDim-dimensional computational domain that defines the root node of a tree which is used to construct the Elements that cover a region of the computational domain. More...

#include <Block.hpp>

Public Member Functions

 Block (std::unique_ptr< domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > > &&stationary_map, size_t id, DirectionMap< VolumeDim, BlockNeighbor< VolumeDim > > neighbors, DirectionMap< VolumeDim, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > > external_boundary_conditions={})
 
 Block (const Block &)=delete
 
 Block (Block &&)=default
 
Blockoperator= (const Block &)=delete
 
Blockoperator= (Block &&)=default
 
const domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > & stationary_map () const
 The map used when the coordinate map is time-independent. More...
 
const domain::CoordinateMapBase< Frame::BlockLogical, Frame::Grid, VolumeDim > & moving_mesh_logical_to_grid_map () const
 The map going from the block logical frame to the last time independent frame. Only used when the coordinate map is time-dependent. More...
 
const domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > & moving_mesh_grid_to_inertial_map () const
 The map going from the last time independent frame to the frame in which the equations are solved. Only used when the coordinate map is time-dependent. More...
 
bool is_time_dependent () const
 Returns true if the block has time-dependent maps.
 
void inject_time_dependent_map (std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > > moving_mesh_inertial_map)
 Given a Block that has a time-independent map, injects the time-dependent map into the Block.
 
size_t id () const
 A unique identifier for the Block that is in the range [0, number_of_blocks -1] where number_of_blocks is the number of Blocks that cover the computational domain.
 
const DirectionMap< VolumeDim, BlockNeighbor< VolumeDim > > & neighbors () const
 Information about the neighboring Blocks.
 
const std::unordered_set< Direction< VolumeDim > > & external_boundaries () const
 The directions of the faces of the Block that are external boundaries.
 
const DirectionMap< VolumeDim, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > > & external_boundary_conditions () const
 The boundary conditions to apply at the external boundaries of the Block.
 
void pup (PUP::er &p)
 Serialization for Charm++.
 

Friends

template<size_t LocalVolumeDim>
bool operator== (const Block< LocalVolumeDim > &lhs, const Block< LocalVolumeDim > &rhs)
 

Detailed Description

template<size_t VolumeDim>
class Block< VolumeDim >

A Block<VolumeDim> is a region of a VolumeDim-dimensional computational domain that defines the root node of a tree which is used to construct the Elements that cover a region of the computational domain.

Each codimension 1 boundary of a Block<VolumeDim> is either an external boundary or identical to a boundary of one other Block.

A Block has logical coordinates that go from -1 to +1 in each dimension. The global coordinates are obtained from the logical coordinates from the Coordinatemap: CoordinateMap::operator() takes Points in the BlockLogical Frame (i.e., block logical coordinates) and returns Points in the Inertial Frame (i.e., the global coordinate frame in which the problem to be solved is set up).

Constructor & Destructor Documentation

◆ Block()

template<size_t VolumeDim>
Block< VolumeDim >::Block ( std::unique_ptr< domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > > &&  stationary_map,
size_t  id,
DirectionMap< VolumeDim, BlockNeighbor< VolumeDim > >  neighbors,
DirectionMap< VolumeDim, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > >  external_boundary_conditions = {} 
)
Parameters
stationary_mapthe CoordinateMap.
ida unique ID.
neighborsinfo about the Blocks that share a codimension 1 boundary with this Block.
external_boundary_conditionsthe boundary conditions to be applied at external boundaries. Can be either empty or one per each external boundary

Member Function Documentation

◆ moving_mesh_grid_to_inertial_map()

template<size_t VolumeDim>
const domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > & Block< VolumeDim >::moving_mesh_grid_to_inertial_map ( ) const

The map going from the last time independent frame to the frame in which the equations are solved. Only used when the coordinate map is time-dependent.

See also
is_time_dependent() moving_mesh_logical_to_grid_map()

◆ moving_mesh_logical_to_grid_map()

template<size_t VolumeDim>
const domain::CoordinateMapBase< Frame::BlockLogical, Frame::Grid, VolumeDim > & Block< VolumeDim >::moving_mesh_logical_to_grid_map ( ) const

The map going from the block logical frame to the last time independent frame. Only used when the coordinate map is time-dependent.

See also
is_time_dependent() moving_mesh_grid_to_inertial_map()

◆ stationary_map()

template<size_t VolumeDim>
const domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > & Block< VolumeDim >::stationary_map ( ) const

The map used when the coordinate map is time-independent.

See also
is_time_dependent()

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