SpECTRE
v2024.09.29
|
A wrapper around a vector of Blocks that represent the computational domain. More...
#include <Domain.hpp>
Public Member Functions | |
Domain (std::vector< Block< VolumeDim > > blocks) | |
Domain (std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > > > maps, std::unordered_map< std::string, ExcisionSphere< VolumeDim > > excision_spheres={}, std::vector< std::string > block_names={}, std::unordered_map< std::string, std::unordered_set< std::string > > block_groups={}) | |
Create a Domain using CoordinateMaps to encode the Orientations. This constructor does not support periodic boundary conditions. More... | |
Domain (std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > > > maps, const std::vector< std::array< size_t, two_to_the(VolumeDim)> > &corners_of_all_blocks, const std::vector< PairOfFaces > &identifications={}, std::unordered_map< std::string, ExcisionSphere< VolumeDim > > excision_spheres={}, std::vector< std::string > block_names={}, std::unordered_map< std::string, std::unordered_set< std::string > > block_groups={}) | |
Create a Domain using a corner numbering scheme to encode the Orientations. More... | |
Domain (const Domain &)=delete | |
Domain (Domain &&)=default | |
Domain< VolumeDim > & | operator= (const Domain< VolumeDim > &)=delete |
Domain< VolumeDim > & | operator= (Domain< VolumeDim > &&)=default |
void | inject_time_dependent_map_for_block (size_t block_id, 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) |
void | inject_time_dependent_map_for_excision_sphere (const std::string &excision_sphere_name, std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > > moving_mesh_grid_to_inertial_map) |
const std::vector< Block< VolumeDim > > & | blocks () const |
bool | is_time_dependent () const |
const std::unordered_map< std::string, ExcisionSphere< VolumeDim > > & | excision_spheres () const |
const 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. | |
std::vector< std::string > | block_names () const |
The block names in the current domain. | |
void | pup (PUP::er &p) |
A wrapper around a vector of Blocks that represent the computational domain.
The domain will be serialized and written to output files so it can be used for interpolations, as are domain::FunctionOfTime
classes. To be able to read in domains written by older versions of the code the pup
function in this class and all pup
functions it invokes support lightweight versioning. A version
integer is written alongside the data when serializing, and read back in when deserializing. Increment the version number every time you make changes to the pup
function. Retain support for unpacking data written by previous versions whenever possible. When adding a new field to serialize, you can simply pack/unpack the new field only for newer versions like this:
When removing or changing a field, make sure to deserialize old data consistent with how it was written:
Make sure that all data types you serialize in the pup
function also support versioning. Also make sure to keep all factory-creatable classes registered that were written by old versions of the code.
|
explicit |
Create a Domain using CoordinateMaps to encode the Orientations. This constructor does not support periodic boundary conditions.
A constructor that does not require the user to provide a corner numbering scheme. Constructs a global corner numbering for each pair of abutting Blocks from their maps alone. The numbering is used to set up the corresponding Orientation, and then is discarded; the next pair of blocks uses a new global corner numbering, and so on, until all pairs of abutting Blocks have had their Orientations determined. For more information on setting up domains, see the domain creation tutorial.
maps | The BlockLogical -> Inertial coordinate map for each block. |
excision_spheres | Any ExcisionSpheres in the domain. |
block_names | A human-readable name for every block, or empty if no block names have been chosen (yet). |
block_groups | 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. |
Domain< VolumeDim >::Domain | ( | std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::BlockLogical, Frame::Inertial, VolumeDim > > > | maps, |
const std::vector< std::array< size_t, two_to_the(VolumeDim)> > & | corners_of_all_blocks, | ||
const std::vector< PairOfFaces > & | identifications = {} , |
||
std::unordered_map< std::string, ExcisionSphere< VolumeDim > > | excision_spheres = {} , |
||
std::vector< std::string > | block_names = {} , |
||
std::unordered_map< std::string, std::unordered_set< std::string > > | block_groups = {} |
||
) |
Create a Domain using a corner numbering scheme to encode the Orientations.
maps | The BlockLogical -> Inertial coordinate map for each block. |
corners_of_all_blocks | The corner numbering for each block's corners according to the global corner number scheme. The details of the corner numbering scheme are described in the tutorial. |
identifications | Used to impose periodic boundary conditions on the domain. To identify faces, identifications should contain the PairOfFaces containing the corners of each pair of faces that you wish to identify with one another. The number of identifications must be even. |
excision_spheres | Any ExcisionSpheres in the domain. |
block_names | A human-readable name for every block, or empty if no block names have been chosen (yet). |
block_groups | 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. |