SpECTRE  v2023.05.16
amr Namespace Reference

Items for adaptive mesh refinement. More...

Namespaces

namespace  Actions
 Actions for adaptive mesh refinement
 
namespace  Criteria
 Criteria for deciding how a mesh should be adapted.
 
namespace  Initialization
 Mutators used for initialization of adaptive mesh refinement
 
namespace  OptionTags
 Options for AMR.
 
namespace  Tags
 Tags for adaptive mesh refinement
 

Classes

struct  Component
 A singleton parallel component to manage adaptive mesh refinement. More...
 
class  Criterion
 Base class for something that determines how an adaptive mesh should be changed. More...
 

Enumerations

enum class  Flag {
  Flag::Undefined , Flag::Join , Flag::DecreaseResolution , Flag::DoNothing ,
  Flag::IncreaseResolution , Flag::Split
}
 Flags that represent decisions about mesh refinement. More...
 

Functions

std::ostreamoperator<< (std::ostream &os, const Flag &flag)
 Output operator for a Flag.
 
template<size_t VolumeDim>
std::array< size_t, VolumeDim > desired_refinement_levels (const ElementId< VolumeDim > &id, const std::array< Flag, VolumeDim > &flags)
 Computes the desired refinement level of the Element with ElementId id given the desired amr::Flags flags
 
template<size_t VolumeDim>
std::array< size_t, VolumeDim > desired_refinement_levels_of_neighbor (const ElementId< VolumeDim > &neighbor_id, const std::array< Flag, VolumeDim > &neighbor_flags, const OrientationMap< VolumeDim > &orientation)
 Computes the desired refinement level of a neighboring Element with ElementId neighbor_id given its desired amr::Flags neighbor_flags taking into account the OrientationMap orientation of the neighbor. More...
 
template<size_t VolumeDim>
boost::rational< size_t > fraction_of_block_volume (const ElementId< VolumeDim > &element_id)
 Fraction of the logical volume of a block covered by an element. More...
 
template<size_t VolumeDim>
bool has_potential_sibling (const ElementId< VolumeDim > &element_id, const Direction< VolumeDim > &direction)
 Whether or not the Element with element_id can have a sibling in the given direction
 
template<size_t VolumeDim>
ElementId< VolumeDim > id_of_parent (const ElementId< VolumeDim > &element_id, const std::array< Flag, VolumeDim > &flags)
 Returns the ElementId of the parent of the Element with element_id using the refinement flags associated with element_id More...
 
template<size_t VolumeDim>
std::vector< ElementId< VolumeDim > > ids_of_children (const ElementId< VolumeDim > &element_id, const std::array< Flag, VolumeDim > &flags)
 Returns the ElementIds of the children of the Element with element_id using the refinement flags associated with element_id More...
 
template<size_t VolumeDim>
std::deque< ElementId< VolumeDim > > ids_of_joining_neighbors (const Element< VolumeDim > &element, const std::array< Flag, VolumeDim > &flags)
 The ElementIds of the neighbors of element that will join with it given refinement flags More...
 
template<size_t VolumeDim>
bool is_child_that_creates_parent (const ElementId< VolumeDim > &element_id, const std::array< Flag, VolumeDim > &flags)
 Whether or not the Element is the child that should create the parent Element when joining elements. More...
 
template<size_t VolumeDim>
bool prevent_element_from_joining_while_splitting (gsl::not_null< std::array< Flag, VolumeDim > * > flags)
 Prevent an Element from splitting in one dimension, while joining in another. More...
 
template<size_t VolumeDim>
DirectionMap< VolumeDim, Neighbors< VolumeDim > > neighbors_of_child (const Element< VolumeDim > &parent, const std::array< Flag, VolumeDim > &parent_flags, const std::unordered_map< ElementId< VolumeDim >, std::array< Flag, VolumeDim > > &parent_neighbor_flags, const ElementId< VolumeDim > &child_id)
 returns the neighbors of the Element with ElementId child_id, whose parent Element is parent which has refinement flags parent_flags and neighbor flags parent_neighbor_flags
 
template<size_t VolumeDim>
DirectionMap< VolumeDim, Neighbors< VolumeDim > > neighbors_of_parent (const ElementId< VolumeDim > &parent_id, const std::vector< std::tuple< const Element< VolumeDim > &, const std::unordered_map< ElementId< VolumeDim >, std::array< Flag, VolumeDim > > & > > &children_elements_and_neighbor_flags)
 returns the neighbors of the Element with ElementId parent_id, that is created from its children_elements_and_neighbor_flags
 
template<size_t VolumeDim>
std::unordered_set< ElementId< VolumeDim > > new_neighbor_ids (const ElementId< VolumeDim > &my_id, const Direction< VolumeDim > &direction, const Neighbors< VolumeDim > &previous_neighbors_in_direction, const std::unordered_map< ElementId< VolumeDim >, std::array< amr::Flag, VolumeDim > > &previous_neighbors_amr_flags)
 returns the ElementIds of the neighbors in the given direction of the Element whose ElementId is my_id given the previous_neighbors_in_direction and their amr::Flags. More...
 
template<size_t VolumeDim>
bool update_amr_decision (gsl::not_null< std::array< Flag, VolumeDim > * > my_current_amr_flags, const Element< VolumeDim > &element, const ElementId< VolumeDim > &neighbor_id, const std::array< Flag, VolumeDim > &neighbor_amr_flags)
 Updates the AMR decisions my_current_amr_flags of the Element element based on the AMR decisions neighbor_amr_flags of a neighbor Element with ElementId neighbor_id. More...
 

Detailed Description

Items for adaptive mesh refinement.