SpECTRE
v2024.09.29
|
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, std::string name="") | |
Block (const Block &)=delete | |
Block (Block &&)=default | |
Block & | operator= (const Block &)=delete |
Block & | operator= (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... | |
const domain::CoordinateMapBase< Frame::Grid, Frame::Distorted, VolumeDim > & | moving_mesh_grid_to_distorted_map () const |
The map going from the last time independent frame to the distorted frame. Only used when the coordinate map is time-dependent. See Domain Concepts to see how the distorted frame is defined. More... | |
const domain::CoordinateMapBase< Frame::Distorted, Frame::Inertial, VolumeDim > & | moving_mesh_distorted_to_inertial_map () const |
The map going from the distorted frame to the frame in which the equations are solved. Only used when the coordinate map is time-dependent. See Domain Concepts to see how the distorted frame is defined. More... | |
bool | is_time_dependent () const |
Returns true if the block has time-dependent maps. | |
bool | has_distorted_frame () const |
Returns true if the block has a distorted frame. More... | |
void | inject_time_dependent_map (std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > > moving_mesh_grid_to_inertial_map, std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Distorted, VolumeDim > > moving_mesh_grid_to_distorted_map=nullptr, std::unique_ptr< domain::CoordinateMapBase< Frame::Distorted, Frame::Inertial, VolumeDim > > moving_mesh_distorted_to_inertial_map=nullptr) |
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 std::string & | name () const |
void | pup (PUP::er &p) |
Serialization for Charm++. | |
Friends | |
template<size_t LocalVolumeDim> | |
bool | operator== (const Block< LocalVolumeDim > &lhs, const Block< LocalVolumeDim > &rhs) |
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).
Block< VolumeDim >::Block | ( | std::unique_ptr< domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > > && | stationary_map, |
size_t | id, | ||
DirectionMap< VolumeDim, BlockNeighbor< VolumeDim > > | neighbors, | ||
std::string | name = "" |
||
) |
stationary_map | the CoordinateMap. |
id | a unique ID. |
neighbors | info about the Blocks that share a codimension 1 boundary with this Block. |
name | Human-readable name for the block |
|
inline |
Returns true
if the block has a distorted frame.
If a block has a distorted frame, then
If a block does not have a distorted frame, then
const domain::CoordinateMapBase< Frame::Distorted, Frame::Inertial, VolumeDim > & Block< VolumeDim >::moving_mesh_distorted_to_inertial_map | ( | ) | const |
The map going from the distorted frame to the frame in which the equations are solved. Only used when the coordinate map is time-dependent. See Domain Concepts to see how the distorted frame is defined.
const domain::CoordinateMapBase< Frame::Grid, Frame::Distorted, VolumeDim > & Block< VolumeDim >::moving_mesh_grid_to_distorted_map | ( | ) | const |
The map going from the last time independent frame to the distorted frame. Only used when the coordinate map is time-dependent. See Domain Concepts to see how the distorted frame is defined.
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.
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.
const domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > & Block< VolumeDim >::stationary_map | ( | ) | const |
The map used when the coordinate map is time-independent.