SpECTRE  v2024.04.12
ExcisionSphere< VolumeDim > Class Template Reference

The excision sphere information of a computational domain. The excision sphere is assumed to be a coordinate sphere in the grid frame. More...

#include <ExcisionSphere.hpp>

Public Member Functions

 ExcisionSphere (double radius, tnsr::I< double, VolumeDim, Frame::Grid > center, std::unordered_map< size_t, Direction< VolumeDim > > abutting_directions)
 Constructor. More...
 
 ExcisionSphere ()=default
 Default constructor needed for Charm++ serialization.
 
 ExcisionSphere (const ExcisionSphere< VolumeDim > &)
 
 ExcisionSphere (ExcisionSphere< VolumeDim > &&)=default
 
ExcisionSphere< VolumeDim > & operator= (const ExcisionSphere< VolumeDim > &)
 
ExcisionSphere< VolumeDim > & operator= (ExcisionSphere< VolumeDim > &&)=default
 
void inject_time_dependent_maps (std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > > moving_mesh_grid_to_inertial_map)
 Add time dependent coordinate maps to the ExcisionSphere. 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 is_time_dependent() is true.
 
bool is_time_dependent () const
 Return whether or not time dependent maps have been injected.
 
double radius () const
 The radius of the ExcisionSphere.
 
const tnsr::I< double, VolumeDim, Frame::Grid > & center () const
 The coordinate center of the ExcisionSphere.
 
const std::unordered_map< size_t, Direction< VolumeDim > > & abutting_directions () const
 The set of blocks that touch the excision sphere, along with the direction in which they touch it.
 
std::optional< Direction< VolumeDim > > abutting_direction (const ElementId< VolumeDim > &element_id) const
 Checks whether an element abuts the excision sphere. If it does, returns the corresponding direction. Else, nullopt is returned.
 
void pup (PUP::er &p)
 

Friends

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

Detailed Description

template<size_t VolumeDim>
class ExcisionSphere< VolumeDim >

The excision sphere information of a computational domain. The excision sphere is assumed to be a coordinate sphere in the grid frame.

Template Parameters
VolumeDimthe volume dimension.

Constructor & Destructor Documentation

◆ ExcisionSphere()

template<size_t VolumeDim>
ExcisionSphere< VolumeDim >::ExcisionSphere ( double  radius,
tnsr::I< double, VolumeDim, Frame::Grid center,
std::unordered_map< size_t, Direction< VolumeDim > >  abutting_directions 
)

Constructor.

Parameters
radiusthe radius of the excision sphere in the computational domain.
centerthe coordinate center of the excision sphere in the computational domain.
abutting_directionsthe set of blocks that touch the excision sphere, along with the direction in which they touch it.

Member Function Documentation

◆ inject_time_dependent_maps()

template<size_t VolumeDim>
void ExcisionSphere< VolumeDim >::inject_time_dependent_maps ( std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > >  moving_mesh_grid_to_inertial_map)

Add time dependent coordinate maps to the ExcisionSphere.

Note
There is no actual mesh that is inside an excision sphere, but this region moves along with the domain just the same. Meaning that we should be able to take a point inside the excision sphere and map it to the Inertial frame.

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