|
SpECTRE
2021.08.02
|
The building blocks used to describe the computational domain. More...
Namespaces | |
| namespace | amr |
| Items for adaptive mesh refinement. | |
| namespace | domain::BoundaryConditions |
| Domain support for applying boundary conditions | |
| namespace | domain::CoordinateMaps::Tags |
| Tags for the coordinate maps. | |
| namespace | domain::creators |
| Defines classes that create Domains. | |
| namespace | domain::creators::time_dependence |
| Classes and functions for adding time dependence to a domain. | |
| namespace | domain::FunctionsOfTime |
| Contains functions of time to support the dual frame system. | |
| namespace | domain::Tags |
| Tags for the domain. | |
Classes | |
| 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. More... | |
| struct | domain::CoordinateMaps::Tags::CoordinateMap< VolumeDim, SourceFrame, TargetFrame > |
| The coordinate map from source to target coordinates. More... | |
| class | domain::creators::BinaryCompactObject |
| A general domain for two compact objects. More... | |
| class | domain::creators::CylindricalBinaryCompactObject |
| A general domain for two compact objects based on cylinders. More... | |
| class | DomainCreator< VolumeDim > |
| Base class for creating Domains from an option string. More... | |
| class | Domain< VolumeDim > |
| A wrapper around a vector of Blocks that represent the computational domain. More... | |
| struct | PairOfFaces |
Each member in PairOfFaces holds the global corner ids of a block face. PairOfFaces is used in setting up periodic boundary conditions by identifying the two faces with each other. More... | |
| class | VolumeCornerIterator< VolumeDim > |
| Iterates over the corners of a VolumeDim-dimensional cube. More... | |
| class | FaceCornerIterator< VolumeDim > |
| Iterates over the 2^(VolumeDim-1) logical corners of the face of a VolumeDim-dimensional cube in the given direction. More... | |
| struct | ElementLogicalCoordHolder< Dim > |
Holds element logical coordinates of an arbitrary set of points on a single Element. The arbitrary set of points is assumed to be a subset of a larger set of points spanning multiple Elements, and this class holds offsets that index into that larger set of points. More... | |
| class | ElementMap< Dim, TargetFrame > |
The CoordinateMap for the Element from the Logical frame to the TargetFrame More... | |
| struct | domain::Tags::UnnormalizedFaceNormal< VolumeDim, Frame > |
| The unnormalized face normal one form. More... | |
| struct | domain::Tags::InterfaceCompute< Tags::BoundaryDirectionsExterior< VolumeDim >, UnnormalizedFaceNormalCompute< VolumeDim, Frame > > |
| Specialisation of UnnormalizedFaceNormal for the external boundaries which inverts the normals. Since ExternalBoundariesDirections are meant to represent ghost elements, the normals should correspond to the normals in said element, which are inverted with respect to the current element. More... | |
| class | domain::FunctionsOfTime::FunctionOfTime |
| Base class for FunctionsOfTime. More... | |
| class | domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv > |
A function that has a piecewise-constant MaxDerivth derivative. More... | |
| struct | domain::Tags::InterfaceCompute< DirectionsTag, Tag > |
Compute tag for representing items computed on a set of interfaces. Can be retrieved using Tags::Interface<DirectionsTag, Tag> More... | |
| struct | domain::Tags::Slice< DirectionsTag, Tag > |
| Compute tag for representing a compute item that slices data from the volume to a set of interfaces. More... | |
| struct | domain::Tags::InterfaceMesh< VolumeDim > |
Computes the VolumeDim-1 dimensional mesh on an interface from the volume mesh. Tags::InterfaceCompute<Dirs, InterfaceMesh<VolumeDim>> is retrievable as Tags::Interface<Dirs, Mesh<VolumeDim>> from the DataBox. More... | |
| struct | domain::Tags::BoundaryCoordinates< VolumeDim, MovingMesh > |
Computes the coordinates in the frame Frame on the faces defined by Direction. Intended to be prefixed by a Tags::InterfaceCompute to define the directions on which to compute the coordinates. More... | |
| struct | domain::Tags::LogicalCoordinates< VolumeDim > |
| The logical coordinates in the Element. More... | |
| struct | domain::Tags::MinimumGridSpacing< Dim, Frame > |
| The minimum coordinate distance between grid points. More... | |
| struct | domain::OptionTags::DomainCreator< Dim > |
| The input file tag for the DomainCreator to use. More... | |
| struct | domain::Tags::SizeOfElement< VolumeDim > |
| The inertial-coordinate size of an element along each of its logical directions. More... | |
| class | domain::BlockId |
| Index a block of the computational domain. More... | |
| class | BlockNeighbor< VolumeDim > |
| Information about the neighbor of a host Block in a particular direction. More... | |
| class | Direction< VolumeDim > |
| A particular Side along a particular coordinate Axis. More... | |
| struct | DirectionHash< Dim > |
Provides a perfect hash if the size of the hash table is 2 * Dim. To take advantage of this, use the FixedHashMap class. More... | |
| class | DirectionMap< Dim, T > |
| An optimized map with Direction keys. More... | |
| class | Element< VolumeDim > |
| A spectral element with knowledge of its neighbors. More... | |
| class | ElementId< VolumeDim > |
| An ElementId uniquely labels an Element. More... | |
| class | Neighbors< VolumeDim > |
| Information about the neighbors of a host Element in a particular direction. More... | |
| class | OrientationMap< VolumeDim > |
| A mapping of the logical coordinate axes of a host to the logical coordinate axes of a neighbor of the host. More... | |
| class | SegmentId |
| A SegmentId labels a segment of the interval [-1,1] and is used to identify the bounds of an Element in a Block in each dimension. More... | |
| struct | domain::Tags::Domain< VolumeDim > |
| The Domain. More... | |
| struct | domain::Tags::InitialExtents< Dim > |
| The number of grid points per dimension for all elements in each block of the initial computational domain. More... | |
| struct | domain::Tags::InitialRefinementLevels< Dim > |
| The initial refinement level per dimension for all elements in each block of the initial computational domain. More... | |
| struct | domain::Tags::Element< VolumeDim > |
| The Element associated with the DataBox. More... | |
| struct | domain::Tags::Mesh< VolumeDim > |
| The computational grid of the Element in the DataBox. More... | |
| struct | domain::Tags::ElementMap< VolumeDim, TargetFrame > |
| The coordinate map from logical to grid coordinate. More... | |
| struct | domain::Tags::Coordinates< Dim, Frame > |
| The coordinates in a given frame. More... | |
| struct | domain::Tags::MappedCoordinates< MapTag, SourceCoordsTag, CoordinatesTag > |
The coordinates in the target frame of MapTag. The SourceCoordsTag's frame must be the source frame of MapTag More... | |
| struct | domain::Tags::InverseJacobian< Dim, SourceFrame, TargetFrame > |
| The inverse Jacobian from the source frame to the target frame. More... | |
| struct | domain::Tags::InverseJacobianCompute< MapTag, SourceCoordsTag > |
Computes the inverse Jacobian of the map held by MapTag at the coordinates held by SourceCoordsTag. The coordinates must be in the source frame of the map. More... | |
| struct | domain::Tags::Jacobian< Dim, SourceFrame, TargetFrame > |
| The Jacobian from the source frame to the target frame. More... | |
| struct | domain::Tags::JacobianCompute< Dim, SourceFrame, TargetFrame > |
Computes the Jacobian of the map from the InverseJacobian<Dim, SourceFrame, TargetFrame> tag. More... | |
| struct | domain::Tags::DetInvJacobian< SourceFrame, TargetFrame > |
| The determinant of the inverse Jacobian from the source frame to the target frame. More... | |
| struct | domain::Tags::DetInvJacobianCompute< Dim, SourceFrame, TargetFrame > |
| Computes the determinant of the inverse Jacobian. More... | |
| struct | domain::Tags::VariablesBoundaryData |
| Base tag for boundary data needed for updating the variables. More... | |
| struct | domain::Tags::InternalDirections< VolumeDim > |
| The set of directions to neighboring Elements. More... | |
| struct | domain::Tags::BoundaryDirectionsInterior< VolumeDim > |
| The set of directions which correspond to external boundaries. Used for representing data on the interior side of the external boundary faces. More... | |
| struct | domain::Tags::BoundaryDirectionsExterior< VolumeDim > |
| The set of directions which correspond to external boundaries. To be used to represent data which exists on the exterior side of the external boundary faces. More... | |
| struct | domain::Tags::Interface< DirectionsTag, Tag > |
| Tag which is either a SimpleTag for quantities on an interface, base tag to a compute item which acts on tags on an interface, or base tag to a compute item which slices a tag from the volume to an interface. More... | |
| struct | domain::Tags::Direction< VolumeDim > |
| Direction to an interface More... | |
Macros | |
| #define | INSTANTIATE_MAPS_SIMPLE_FUNCTIONS(_, data) |
Generate instantiations of member functions of the CoordinateMap class template. More... | |
| #define | INSTANTIATE_MAPS_DATA_TYPE_FUNCTIONS(_, data) |
Generate instantiations of member functions of the CoordinateMap class template. More... | |
| #define | INSTANTIATE_MAPS_FUNCTIONS(MAPS_TUPLE, SOURCE_FRAME, TARGET_FRAMES_TUPLE, TYPES_TUPLE) |
Generate instantiations of member functions of the CoordinateMap class template. More... | |
Enumerations | |
| enum class | amr::Flag { amr::Flag::Undefined , amr::Flag::Join , amr::Flag::DecreaseResolution , amr::Flag::DoNothing , amr::Flag::IncreaseResolution , amr::Flag::Split } |
| Flags that represent decisions about mesh refinement. More... | |
| enum class | ShellWedges { ShellWedges::All , ShellWedges::FourOnEquator , ShellWedges::OneAlongMinusX } |
| The number of wedges to include in the Shell domain. More... | |
| enum class | Side { Lower , Upper } |
| A label for the side of a manifold. More... | |
Functions | |
| template<size_t VolumeDim> | |
| std::array< size_t, VolumeDim > | amr::desired_refinement_levels (const ElementId< VolumeDim > &id, const std::array< amr::Flag, VolumeDim > &flags) noexcept |
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 > | amr::desired_refinement_levels_of_neighbor (const ElementId< VolumeDim > &neighbor_id, const std::array< amr::Flag, VolumeDim > &neighbor_flags, const OrientationMap< VolumeDim > &orientation) noexcept |
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> | |
| bool | amr::has_potential_sibling (const ElementId< VolumeDim > &element_id, const Direction< VolumeDim > &direction) noexcept |
Whether or not the Element with element_id can have a sibling in the given direction | |
| template<size_t VolumeDim> | |
| bool | amr::update_amr_decision (gsl::not_null< std::array< amr::Flag, VolumeDim > * > my_current_amr_flags, const Element< VolumeDim > &element, const ElementId< VolumeDim > &neighbor_id, const std::array< amr::Flag, VolumeDim > &neighbor_amr_flags) noexcept |
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... | |
| template<size_t Dim, typename Frame > | |
| auto | block_logical_coordinates (const Domain< Dim > &domain, const tnsr::I< DataVector, Dim, Frame > &x, double time=std::numeric_limits< double >::signaling_NaN(), const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time=std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >{}) noexcept -> std::vector< std::optional< IdPair< domain::BlockId, tnsr::I< double, Dim, ::Frame::Logical > > > > |
Computes the block logical coordinates and the containing BlockId of a set of points, given coordinates in a particular frame. More... | |
| template<typename SourceFrame , typename TargetFrame , typename... Maps> | |
| auto | domain::make_coordinate_map (Maps &&... maps) noexcept -> CoordinateMap< SourceFrame, TargetFrame, std::decay_t< Maps >... > |
Creates a CoordinateMap of maps... | |
| template<typename SourceFrame , typename TargetFrame , typename... Maps> | |
| auto | domain::make_coordinate_map_base (Maps &&... maps) noexcept -> std::unique_ptr< CoordinateMapBase< SourceFrame, TargetFrame, CoordinateMap< SourceFrame, TargetFrame, std::decay_t< Maps >... >::dim > > |
Creates a std::unique_ptr<CoordinateMapBase> of maps... | |
| template<typename SourceFrame , typename TargetFrame , typename Arg0 , typename... Args> | |
| auto | domain::make_vector_coordinate_map_base (Arg0 &&arg_0, Args &&... remaining_args) noexcept -> std::vector< std::unique_ptr< CoordinateMapBase< SourceFrame, TargetFrame, std::decay_t< Arg0 >::dim > > > |
Creates a std::vector<std::unique_ptr<CoordinateMapBase>> containing the result of make_coordinate_map_base applied to each argument passed in. | |
| template<typename SourceFrame , typename TargetFrame , size_t Dim, typename Map , typename... Maps> | |
| auto | domain::make_vector_coordinate_map_base (std::vector< Map > maps, const Maps &... remaining_maps) noexcept -> std::vector< std::unique_ptr< CoordinateMapBase< SourceFrame, TargetFrame, Dim > > > |
Creates a std::vector<std::unique_ptr<CoordinateMapBase>> containing the result of make_coordinate_map_base applied to each element of the vector of maps composed with the rest of the arguments passed in. | |
| template<typename SourceFrame , typename TargetFrame , typename... Maps, typename NewMap > | |
| CoordinateMap< SourceFrame, TargetFrame, Maps..., NewMap > | domain::push_back (CoordinateMap< SourceFrame, TargetFrame, Maps... > old_map, NewMap new_map) noexcept |
Creates a CoordinateMap by appending the new map to the end of the old maps. | |
| template<typename SourceFrame , typename TargetFrame , typename... Maps, typename NewMap > | |
| CoordinateMap< SourceFrame, TargetFrame, NewMap, Maps... > | domain::push_front (CoordinateMap< SourceFrame, TargetFrame, Maps... > old_map, NewMap new_map) noexcept |
Creates a CoordinateMap by prepending the new map to the beginning of the old maps. | |
| template<size_t VolumeDim> | |
| void | set_internal_boundaries (gsl::not_null< std::vector< DirectionMap< VolumeDim, BlockNeighbor< VolumeDim > > > * > neighbors_of_all_blocks, const std::vector< std::array< size_t, two_to_the(VolumeDim)> > &corners_of_all_blocks) noexcept |
| Sets up the BlockNeighbors using the corner numbering scheme provided by the user to deduce the correct neighbors and orientations. Does not set up periodic boundary conditions. | |
| template<size_t VolumeDim> | |
| void | set_internal_boundaries (gsl::not_null< std::vector< DirectionMap< VolumeDim, BlockNeighbor< VolumeDim > > > * > neighbors_of_all_blocks, const std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Logical, Frame::Inertial, VolumeDim > > > &maps) noexcept |
| Sets up the BlockNeighbors using the corner numbering scheme implied by the maps provided by the user to deduce the correct neighbors and orientations. More... | |
| template<size_t VolumeDim> | |
| void | set_identified_boundaries (const std::vector< PairOfFaces > &identifications, const std::vector< std::array< size_t, two_to_the(VolumeDim)> > &corners_of_all_blocks, gsl::not_null< std::vector< DirectionMap< VolumeDim, BlockNeighbor< VolumeDim > > > * > neighbors_of_all_blocks) noexcept |
| Sets up additional BlockNeighbors corresponding to any identifications of faces provided by the user. Can be used for manually setting up periodic boundary conditions. | |
| template<size_t VolumeDim> | |
| auto | indices_for_rectilinear_domains (const Index< VolumeDim > &domain_extents, const std::vector< Index< VolumeDim > > &block_indices_to_exclude={}) noexcept -> std::vector< Index< VolumeDim > > |
| The multi-indices that identify the individual Blocks in the lattice. | |
| template<size_t VolumeDim> | |
| auto | corners_for_rectilinear_domains (const Index< VolumeDim > &domain_extents, const std::vector< Index< VolumeDim > > &block_indices_to_exclude={}) noexcept -> std::vector< std::array< size_t, two_to_the(VolumeDim)> > |
| The corners for a rectilinear domain made of n-cubes. More... | |
| template<typename TargetFrame > | |
| auto | sph_wedge_coordinate_maps (double inner_radius, double outer_radius, double inner_sphericity, double outer_sphericity, bool use_equiangular_map, double x_coord_of_shell_center=0.0, bool use_half_wedges=false, double aspect_ratio=1.0, const std::vector< double > &radial_partitioning={}, const std::vector< domain::CoordinateMaps::Distribution > &radial_distribution={domain::CoordinateMaps::Distribution::Linear}, ShellWedges which_wedges=ShellWedges::All) noexcept -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Logical, TargetFrame, 3 > > > |
These are the CoordinateMaps of the Wedge<3>s used in the Sphere, Shell, and binary compact object DomainCreators. This function can also be used to wrap the Sphere or Shell in a cube made of six Wedge<3>s. The argument x_coord_of_shell_center specifies a translation of the Shell in the x-direction in the TargetFrame. For example, the BBH DomainCreator uses this to set the position of each BH. When the argument use_half_wedges is set to true, the wedges in the +z,-z,+y,-y directions are cut in half along their xi-axes. The resulting ten CoordinateMaps are used for the outermost Blocks of the BBH Domain. The argument aspect_ratio sets the equatorial compression factor, used by the EquatorialCompression maps which get composed with the Wedges. This is done if aspect_ratio is set to something other than the default value of one. The radial_partitioning specifies the radial boundaries of sub-shells between inner_radius and outer_radius. Set the radial_distribution to select the radial distribution of grid points in the spherical shells. | |
| template<typename TargetFrame > | |
| auto | frustum_coordinate_maps (double length_inner_cube, double length_outer_cube, bool use_equiangular_map, const std::array< double, 3 > &origin_preimage={{0.0, 0.0, 0.0}}, double projective_scale_factor=1.0) noexcept -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Logical, TargetFrame, 3 > > > |
These are the ten Frustums used in the DomainCreators for binary compact objects. The Frustums partition the volume defined by two bounding surfaces: The inner surface is the surface of the two joined inner cubes enveloping the two compact objects, while the outer is the surface of the outer cube. The cubes enveloping the two Shells each have a side length of length_inner_cube. The outer cube has a side length of length_outer_cube. origin_preimage is a parameter that moves the center of the two joined inner cubes away from the origin and to -origin_preimage. projective_scale_factor acts to change the gridpoint distribution in the radial direction. More... | |
| std::vector< std::array< size_t, 8 > > | corners_for_radially_layered_domains (size_t number_of_layers, bool include_central_block, const std::array< size_t, 8 > ¢ral_block_corners={{1, 2, 3, 4, 5, 6, 7, 8}}, ShellWedges which_wedges=ShellWedges::All) noexcept |
| The corners for a domain with radial layers. More... | |
| std::vector< std::array< size_t, 8 > > | corners_for_biradially_layered_domains (size_t number_of_radial_layers, size_t number_of_biradial_layers, bool include_central_block_lhs, bool include_central_block_rhs, const std::array< size_t, 8 > ¢ral_block_corners_lhs={ {1, 2, 3, 4, 5, 6, 7, 8}}) noexcept |
| The corners for a domain with biradial layers. More... | |
| template<typename TargetFrame > | |
| auto | cyl_wedge_coordinate_maps (double inner_radius, double outer_radius, double lower_bound, double upper_bound, bool use_equiangular_map, const std::vector< double > &radial_partitioning={}, const std::vector< double > &height_partitioning={}, const std::vector< domain::CoordinateMaps::Distribution > &radial_distribution={domain::CoordinateMaps::Distribution::Linear}) noexcept -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Logical, TargetFrame, 3 > > > |
| These are the CoordinateMaps used in the Cylinder DomainCreator. More... | |
| template<bool UseEquiangularMap> | |
| auto | cyl_wedge_coord_map_center_blocks (double inner_radius, double lower_bound, double upper_bound, const std::vector< double > &height_partitioning={}, CylindricalDomainParityFlip parity_flip=CylindricalDomainParityFlip::none) noexcept -> tmpl::conditional_t< UseEquiangularMap, std::vector< domain::CoordinateMaps::ProductOf3Maps< domain::CoordinateMaps::Equiangular, domain::CoordinateMaps::Equiangular, domain::CoordinateMaps::Affine > >, std::vector< domain::CoordinateMaps::ProductOf3Maps< domain::CoordinateMaps::Affine, domain::CoordinateMaps::Affine, domain::CoordinateMaps::Affine > > > |
Same as cyl_wedge_coordinate_maps, but only the center square blocks,. More... | |
| auto | cyl_wedge_coord_map_surrounding_blocks (double inner_radius, double outer_radius, double lower_bound, double upper_bound, bool use_equiangular_map, double inner_circularity, const std::vector< double > &radial_partitioning={}, const std::vector< double > &height_partitioning={}, const std::vector< domain::CoordinateMaps::Distribution > &radial_distribution={domain::CoordinateMaps::Distribution::Linear}, CylindricalDomainParityFlip parity_flip=CylindricalDomainParityFlip::none) noexcept -> std::vector< domain::CoordinateMaps::ProductOf2Maps< domain::CoordinateMaps::Wedge< 2 >, domain::CoordinateMaps::Affine > > |
| Same as cyl_wedge_coordinate_maps, but only the surrounding wedge blocks. More... | |
| std::vector< std::array< size_t, 8 > > | corners_for_cylindrical_layered_domains (size_t number_of_shells, size_t number_of_discs) noexcept |
| The corners for a cylindrical domain split into discs with radial shells. More... | |
| template<size_t VolumeDim> | |
| std::array< size_t, two_to_the(VolumeDim)> | discrete_rotation (const OrientationMap< VolumeDim > &orientation, const std::array< size_t, two_to_the(VolumeDim)> &corners_of_aligned) noexcept |
| Permutes the corner numbers of an n-cube. More... | |
| template<typename TargetFrame , size_t VolumeDim> | |
| auto | maps_for_rectilinear_domains (const Index< VolumeDim > &domain_extents, const std::array< std::vector< double >, VolumeDim > &block_demarcations, const std::vector< Index< VolumeDim > > &block_indices_to_exclude={}, const std::vector< OrientationMap< VolumeDim > > &orientations_of_all_blocks={}, bool use_equiangular_map=false) noexcept -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Logical, TargetFrame, VolumeDim > > > |
| The CoordinateMaps for a rectilinear domain of n-cubes. More... | |
| template<size_t VolumeDim> | |
| Domain< VolumeDim > | rectilinear_domain (const Index< VolumeDim > &domain_extents, const std::array< std::vector< double >, VolumeDim > &block_demarcations, std::vector< DirectionMap< VolumeDim, std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > > > boundary_conditions={}, const std::vector< Index< VolumeDim > > &block_indices_to_exclude={}, const std::vector< OrientationMap< VolumeDim > > &orientations_of_all_blocks={}, const std::array< bool, VolumeDim > &dimension_is_periodic=make_array< VolumeDim >(false), const std::vector< PairOfFaces > &identifications={}, bool use_equiangular_map=false) noexcept |
| Create a rectilinear Domain of multicubes. More... | |
| template<size_t Dim> | |
| auto | element_logical_coordinates (const std::vector< ElementId< Dim > > &element_ids, const std::vector< std::optional< IdPair< domain::BlockId, tnsr::I< double, Dim, typename Frame::Logical > > > > &block_coord_holders) noexcept -> std::unordered_map< ElementId< Dim >, ElementLogicalCoordHolder< Dim > > |
Given a set of points in block logical coordinates and their BlockIds, as returned from the function block_logical_coordinates, determines which Elements in a list of ElementIds contains each point, and determines the element logical coordinates of each point. More... | |
| template<size_t VolumeDim> | |
| tnsr::I< DataVector, VolumeDim, Frame::Logical > | interface_logical_coordinates (const Mesh< VolumeDim - 1 > &mesh, const Direction< VolumeDim > &direction) noexcept |
| Compute the logical coordinates on a face of an Element. More... | |
| template<size_t Dim, typename Frame > | |
| double | minimum_grid_spacing (const Index< Dim > &extents, const tnsr::I< DataVector, Dim, Frame > &coords) noexcept |
| Finds the minimum coordinate distance between grid points. | |
| template<size_t Dim> | |
| size_t | index_to_slice_at (const Index< Dim > &extents, const Direction< Dim > &direction, const size_t offset=0) noexcept |
| Finds the index in the perpendicular dimension of an element boundary. More... | |
| template<size_t VolumeDim> | |
| std::vector< ElementId< VolumeDim > > | initial_element_ids (size_t block_id, std::array< size_t, VolumeDim > initial_ref_levs, size_t grid_index=0) noexcept |
Create the ElementIds of the a single Block. | |
| template<size_t VolumeDim> | |
| std::vector< ElementId< VolumeDim > > | initial_element_ids (const std::vector< std::array< size_t, VolumeDim > > &initial_refinement_levels, size_t grid_index=0) noexcept |
Create the ElementIds of the initial computational domain. | |
| constexpr size_t | maximum_number_of_neighbors (const size_t dim) |
Returns the maximum number of neighbors an element can have in dim dimensions. More... | |
| constexpr size_t | maximum_number_of_neighbors_per_direction (const size_t dim) |
Returns the maximum number of neighbors in each direction an element can have in dim dimensions. More... | |
| template<size_t VolumeDim, typename T > | |
| std::array< tt::remove_cvref_wrap_t< T >, VolumeDim > | discrete_rotation (const OrientationMap< VolumeDim > &rotation, std::array< T, VolumeDim > source_coords) noexcept |
OrientationMaps define an active rotation of the logical axes that bring the axes of a host block into alignment with the logical axes of the neighbor block. discrete_rotation applies this active rotation on the coordinates as opposed to the axes. For a two-dimensional example, consider a host block and a neighbor block, where the OrientationMap between them is \(\{-\eta,+\xi\}\). A quarter- turn counterclockwise of the host block's logical axes would bring them into alignment with those of the neighbor. That is, after this active rotation, the blocks would be Aligned. Now consider a point A with coordinates (+1.0,-0.5). An active quarter-turn rotation counter-clockwise about the origin, keeping the axes fixed, brings point A into the coordinates (+0.5,+1.0). This is how discrete_rotation interprets the OrientationMap passed to it. | |
| template<size_t VolumeDim> | |
| tnsr::Ij< double, VolumeDim, Frame::NoFrame > | discrete_rotation_jacobian (const OrientationMap< VolumeDim > &orientation) noexcept |
Computes the Jacobian of the transformation that is computed by discrete_rotation() More... | |
| template<size_t VolumeDim> | |
| tnsr::Ij< double, VolumeDim, Frame::NoFrame > | discrete_rotation_inverse_jacobian (const OrientationMap< VolumeDim > &orientation) noexcept |
Computes the inverse Jacobian of the transformation that is computed by discrete_rotation() | |
| template<size_t VolumeDim, typename TargetFrame > | |
| void | unnormalized_face_normal (gsl::not_null< tnsr::i< DataVector, VolumeDim, TargetFrame > * > result, const Mesh< VolumeDim - 1 > &interface_mesh, const ElementMap< VolumeDim, TargetFrame > &map, const Direction< VolumeDim > &direction) noexcept |
| Compute the outward grid normal on a face of an Element. More... | |
| template<size_t VolumeDim, typename TargetFrame > | |
| tnsr::i< DataVector, VolumeDim, TargetFrame > | unnormalized_face_normal (const Mesh< VolumeDim - 1 > &interface_mesh, const ElementMap< VolumeDim, TargetFrame > &map, const Direction< VolumeDim > &direction) noexcept |
| Compute the outward grid normal on a face of an Element. More... | |
| template<size_t VolumeDim, typename TargetFrame > | |
| void | unnormalized_face_normal (gsl::not_null< tnsr::i< DataVector, VolumeDim, TargetFrame > * > result, const Mesh< VolumeDim - 1 > &interface_mesh, const domain::CoordinateMapBase< Frame::Logical, TargetFrame, VolumeDim > &map, const Direction< VolumeDim > &direction) noexcept |
| Compute the outward grid normal on a face of an Element. More... | |
| template<size_t VolumeDim, typename TargetFrame > | |
| tnsr::i< DataVector, VolumeDim, TargetFrame > | unnormalized_face_normal (const Mesh< VolumeDim - 1 > &interface_mesh, const domain::CoordinateMapBase< Frame::Logical, TargetFrame, VolumeDim > &map, const Direction< VolumeDim > &direction) noexcept |
| Compute the outward grid normal on a face of an Element. More... | |
| template<size_t VolumeDim> | |
| void | unnormalized_face_normal (gsl::not_null< tnsr::i< DataVector, VolumeDim, Frame::Inertial > * > result, const Mesh< VolumeDim - 1 > &interface_mesh, const ElementMap< VolumeDim, Frame::Grid > &logical_to_grid_map, const domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > &grid_to_inertial_map, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time, const Direction< VolumeDim > &direction) noexcept |
| Compute the outward grid normal on a face of an Element. More... | |
| template<size_t VolumeDim> | |
| tnsr::i< DataVector, VolumeDim, Frame::Inertial > | unnormalized_face_normal (const Mesh< VolumeDim - 1 > &interface_mesh, const ElementMap< VolumeDim, Frame::Grid > &logical_to_grid_map, const domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > &grid_to_inertial_map, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time, const Direction< VolumeDim > &direction) noexcept |
| Compute the outward grid normal on a face of an Element. More... | |
| template<size_t VolumeDim> | |
| void | logical_coordinates (gsl::not_null< tnsr::I< DataVector, VolumeDim, Frame::Logical > * > logical_coords, const Mesh< VolumeDim > &mesh) noexcept |
| Compute the logical coordinates in an Element. More... | |
| template<size_t VolumeDim> | |
| tnsr::I< DataVector, VolumeDim, Frame::Logical > | logical_coordinates (const Mesh< VolumeDim > &mesh) noexcept |
| Compute the logical coordinates in an Element. More... | |
| template<size_t VolumeDim> | |
| std::array< double, VolumeDim > | size_of_element (const ElementMap< VolumeDim, Frame::Inertial > &logical_to_inertial_map) noexcept |
| Compute the inertial-coordinate size of an element along each of its logical directions. More... | |
| template<size_t VolumeDim> | |
| std::array< double, VolumeDim > | size_of_element (const ElementMap< VolumeDim, Frame::Grid > &logical_to_grid_map, const domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, VolumeDim > &grid_to_inertial_map, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) noexcept |
| Compute the inertial-coordinate size of an element along each of its logical directions. More... | |
| template<size_t VolumeDim, typename TagsList > | |
| Variables< TagsList > | orient_variables (const Variables< TagsList > &variables, const Index< VolumeDim > &extents, const OrientationMap< VolumeDim > &orientation_of_neighbor) noexcept |
| Orient variables to the data-storage order of a neighbor element with the given orientation. | |
| template<size_t VolumeDim, typename TagsList > | |
| Variables< TagsList > | orient_variables_on_slice (const Variables< TagsList > &variables_on_slice, const Index< VolumeDim - 1 > &slice_extents, const size_t sliced_dim, const OrientationMap< VolumeDim > &orientation_of_neighbor) noexcept |
| Orient variables to the data-storage order of a neighbor element with the given orientation. | |
| template<size_t VolumeDim> | |
| std::vector< double > | orient_variables (const std::vector< double > &variables, const Index< VolumeDim > &extents, const OrientationMap< VolumeDim > &orientation_of_neighbor) noexcept |
Orient data in a std::vector<double> representing one or more tensor components. More... | |
| template<size_t VolumeDim> | |
| std::vector< double > | orient_variables_on_slice (const std::vector< double > &variables_on_slice, const Index< VolumeDim - 1 > &slice_extents, size_t sliced_dim, const OrientationMap< VolumeDim > &orientation_of_neighbor) noexcept |
Orient data in a std::vector<double> representing one or more tensor components. More... | |
The building blocks used to describe the computational domain.
The VolumeDim-dimensional computational Domain is constructed from a set of non-overlapping Blocks. Each Block is a distorted VolumeDim-dimensional hypercube. Each codimension-1 boundary of a Block is either part of the external boundary of the computational domain, or is identical to a boundary of one other Block. Each Block is subdivided into one or more Elements that may be changed dynamically if AMR is enabled.
The VolumeDim-dimensional computational Domain is constructed from a set of non-overlapping Blocks. Each Block is a distorted VolumeDim-dimensional hypercube. Each codimension-1 boundary of a Block is either part of the external boundary of the computational domain, or is identical to a boundary of one other Block. Each Block is subdivided into one or more Elements that may be changed dynamically if AMR is enabled.
| #define INSTANTIATE_MAPS_DATA_TYPE_FUNCTIONS | ( | _, | |
| data | |||
| ) |
Generate instantiations of member functions of the CoordinateMap class template.
Called as follows:
The first tuple passed to GENERATE_INSTANTIATIONS has a bunch of tuples in it that is the list of maps being composed. The reason for defining the type aliases Affine2d and Affine3d is that otherwise the number of maps being composed is calculated incorrectly. The second tuple contains the source frames for the map. The third tuple passed to GENERATE_INSTANTIATIONS contains the target frames to instantiate for, typically Frame::Grid and Frame::Inertial. The last tuple is the data types for which to instantiate the functions, usually double and DataVector.
Instantiates:
call_implinv_jacobian_impljacobian_implcoords_frame_velocity_jacobians_impl | #define INSTANTIATE_MAPS_FUNCTIONS | ( | MAPS_TUPLE, | |
| SOURCE_FRAME, | |||
| TARGET_FRAMES_TUPLE, | |||
| TYPES_TUPLE | |||
| ) |
Generate instantiations of member functions of the CoordinateMap class template.
Called as follows:
The first tuple passed to GENERATE_INSTANTIATIONS has a bunch of tuples in it that is the list of maps being composed. The reason for defining the type aliases Affine2d and Affine3d is that otherwise the number of maps being composed is calculated incorrectly. The second tuple contains the source frames for the map. The third tuple passed to GENERATE_INSTANTIATIONS contains the frames to instantiate for, typically Frame::Grid and Frame::Inertial.
Instantiates:
get_to_grid_frame_implinverse_implclass CoordinateMapcall_implinv_jacobian_impljacobian_implcoords_frame_velocity_jacobians_impl | #define INSTANTIATE_MAPS_SIMPLE_FUNCTIONS | ( | _, | |
| data | |||
| ) |
Generate instantiations of member functions of the CoordinateMap class template.
Called as follows:
The first tuple passed to GENERATE_INSTANTIATIONS has a bunch of tuples in it that is the list of maps being composed. The reason for defining the type aliases Affine2d and Affine3d is that otherwise the number of maps being composed is calculated incorrectly. The second tuple contains the source frames for the map. The third tuple passed to GENERATE_INSTANTIATIONS contains the target frames to instantiate for, typically Frame::Grid and Frame::Inertial.
Instantiates:
get_to_grid_frame_implinverse_implclass CoordinateMap
|
strong |
Flags that represent decisions about mesh refinement.
In order to support anisotropic mesh refinement, a flag is specified for each dimension.
| Enumerator | |
|---|---|
| Undefined | used to initialize flags before a decision is made |
| Join | join the sibling of an Element |
| DecreaseResolution | decrease number of points in an Element |
| DoNothing | stay the same |
| IncreaseResolution | increase number of points in an Element |
| Split | split the Element into two smaller elements |
|
strong |
|
strong |
A label for the side of a manifold.
Lower and Upper are with respect to the logical coordinate whose axis is normal to the side, i.e. beyond the Upper (Lower) side, the logical coordinate is increasing (decreasing).
|
noexcept |
Computes the block logical coordinates and the containing BlockId of a set of points, given coordinates in a particular frame.
Returns a std::vector<std::optional<IdPair<BlockId,coords>>>, where the vector runs over the points and is indexed in the same order as the input coordinates x. For each point, the IdPair holds the block logical coords of that point and the BlockId of the Block that contains that point. The std::optional is invalid if the point is not in any Block. If a point is on a shared boundary of two or more Blocks, it is returned only once, and is considered to belong to the Block with the smaller BlockId.
|
noexcept |
The corners for a domain with biradial layers.
Generates the corners for a BBH-like Domain which is made of one or more layers of Blocks fully enveloping two interior volumes. The number_of_radial_layers gives the number of layers that fully envelop each interior volume with six Blocks each. The number_of_biradial_layers gives the number of layers that fully envelop both volumes at once, using ten Blocks per layer as opposed to six. The central_block_corners_lhs are used as seed values to generate the corners for the surrounding Blocks.
|
noexcept |
The corners for a cylindrical domain split into discs with radial shells.
Generates the corners for a Domain which is made of one or more stacked discs consisting of layers of Blocks enveloping an interior square prism. The number_of_shells specifies how many of these layers of Blocks to have in each disc.
The number_of_discs specifies how many discs make up the domain. The very basic cylinder with one shell and one layer serves as a base to generate the corners for subsequent shells first and discs second.
|
noexcept |
The corners for a domain with radial layers.
Generates the corners for a Domain which is made of one or more layers of Blocks fully enveloping an interior volume, e.g. Shell or Sphere. The number_of_layers specifies how many of these layers of Blocks to have in the final domain. include_central_block is set to true in Sphere, where the interior volume is filled with a central Block, and false in Shell, where the interior volume is left empty. The central_block_corners are used as seed values to generate the corners for the surrounding Blocks.
|
noexcept |
The corners for a rectilinear domain made of n-cubes.
The domain_extents argument holds the number of blocks to have in each dimension. The blocks all have aligned orientations by construction. The block_indices_to_exclude argument allows the user to selectively exclude blocks from the resulting domain. This allows for the creation of non-trivial shapes such as the net for a tesseract.
|
noexcept |
Same as cyl_wedge_coordinate_maps, but only the center square blocks,.
If CylindricalDomainParityFlip::z_direction is specified, then the returned maps describe a cylinder with lower_bound corresponding to logical coordinate upper_zeta and upper_bound corresponding to logical coordinate lower_zeta, and thus the resulting maps are left-handed. CylindricalDomainParityFlip::z_direction is therefore useful only when composing with another map that is also left-handed, so that the composed coordinate system is right-handed.
Returned as a vector of the coordinate maps so that they can be composed with other maps later.
|
noexcept |
Same as cyl_wedge_coordinate_maps, but only the surrounding wedge blocks.
If CylindricalDomainParityFlip::z_direction is specified, then the returned maps describe a cylinder with lower_bound corresponding to logical coordinate upper_zeta and upper_bound corresponding to logical coordinate lower_zeta, and thus the resulting maps are left-handed. CylindricalDomainParityFlip::z_direction is therefore useful only when composing with another map that is also left-handed, so that the composed coordinate system is right-handed.
Returned as a vector of the coordinate maps so that they can be composed with other maps later.
|
noexcept |
These are the CoordinateMaps used in the Cylinder DomainCreator.
The radial_partitioning specifies the radial boundaries of sub-shells between inner_radius and outer_radius, while height_partitioning specifies the z-boundaries, splitting the cylinder into stacked 3-dimensional disks. The circularity of the shell wedges changes from 0 to 1 within the innermost sub-shell.
Set the radial_distribution to select the radial distribution of grid points in the cylindrical shells. The innermost shell must have domain::CoordinateMaps::Distribution::Linear because it changes the circularity.
|
noexcept |
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.
The OrientationMap orientation is that from the Element that has a neighbor with ElementId neighbor_id
|
noexcept |
Permutes the corner numbers of an n-cube.
Returns the correct ordering of global corner numbers for a rotated block in an otherwise aligned edifice of blocks, given the OrientationMap a block aligned with the edifice has relative to this one, and given the corner numbering the rotated block would have if it were aligned. This is useful in creating domains for testing purposes, e.g. RotatedIntervals, RotatedRectangles, and RotatedBricks.
|
noexcept |
Computes the Jacobian of the transformation that is computed by discrete_rotation()
double because the Jacobian is spatially constant.
|
noexcept |
Given a set of points in block logical coordinates and their BlockIds, as returned from the function block_logical_coordinates, determines which Elements in a list of ElementIds contains each point, and determines the element logical coordinates of each point.
Returns a std::unordered_map from ElementIds to ElementLogicalCoordHolders. It is expected that only a subset of the points will be found in the given Elements. If a point is on a shared boundary of two or more Elements, it will be returned only once, and will be considered to belong to the first Element in the list of ElementIds.
|
noexcept |
These are the ten Frustums used in the DomainCreators for binary compact objects. The Frustums partition the volume defined by two bounding surfaces: The inner surface is the surface of the two joined inner cubes enveloping the two compact objects, while the outer is the surface of the outer cube. The cubes enveloping the two Shells each have a side length of length_inner_cube. The outer cube has a side length of length_outer_cube. origin_preimage is a parameter that moves the center of the two joined inner cubes away from the origin and to -origin_preimage. projective_scale_factor acts to change the gridpoint distribution in the radial direction.
|
noexcept |
Finds the index in the perpendicular dimension of an element boundary.
Optionally provide an offset to find an index offset from the element boundary.
|
noexcept |
Compute the logical coordinates on a face of an Element.
Returns: logical-frame vector holding coordinates
|
noexcept |
Compute the logical coordinates in an Element.
The logical coordinates are the collocation points associated to the spectral basis functions and quadrature of the mesh.
|
noexcept |
Compute the logical coordinates in an Element.
The logical coordinates are the collocation points associated to the spectral basis functions and quadrature of the mesh.
|
noexcept |
The CoordinateMaps for a rectilinear domain of n-cubes.
Allows for both Affine and Equiangular maps.
|
constexpr |
Returns the maximum number of neighbors an element can have in dim dimensions.
|
constexpr |
Returns the maximum number of neighbors in each direction an element can have in dim dimensions.
|
noexcept |
Orient data in a std::vector<double> representing one or more tensor components.
In most cases the Variables version of orient_variables should be called. However, in some cases the tags and thus the type of the data being sent is determined at runtime. In these cases the std::vector version of orient_variables is useful. A concrete example of this is when hybridizing DG with finite difference methods, where sometimes the data sent is both the variables for reconstruction and the fluxes for either the DG or finite difference scheme, while at other points only one of these three is sent.
|
noexcept |
Orient data in a std::vector<double> representing one or more tensor components.
In most cases the Variables version of orient_variables should be called. However, in some cases the tags and thus the type of the data being sent is determined at runtime. In these cases the std::vector version of orient_variables is useful. A concrete example of this is when hybridizing DG with finite difference methods, where sometimes the data sent is both the variables for reconstruction and the fluxes for either the DG or finite difference scheme, while at other points only one of these three is sent.
|
noexcept |
Create a rectilinear Domain of multicubes.
Useful for constructing domains for testing non-trivially connected rectilinear domains made up of cubes. We refer to a domain of this type as an edifice. The domain_extents provides the size (in the number of blocks) of the initial aligned edifice to construct. The block_indices_to_exclude parameter is used in refining the shape of the edifice from a cube to sometime more non-trivial, such as an L-shape or the net of a tesseract. The block_demarcations and use_equiangular_map parameters determine the CoordinateMaps to be used. orientations_of_all_blocks contains the OrientationMap of the edifice relative to each block.
The identifications parameter is used when identifying the faces of blocks in an edifice. This is used to identify the 1D boundaries in the 2D net for a 3D cube to construct a domain with topology S2. Note: If the user wishes to rotate the blocks as well as manually identify their faces, the user must provide the PairOfFaces corresponding to the rotated corners.
|
noexcept |
Sets up the BlockNeighbors using the corner numbering scheme implied by the maps provided by the user to deduce the correct neighbors and orientations.
|
noexcept |
Compute the inertial-coordinate size of an element along each of its logical directions.
For each logical direction, compute the distance (in inertial coordinates) between the element's lower and upper faces in that logical direction. The distance is measured between centers of the faces, with the centers defined in the logical coordinates. Note that for curved elements, this is an approximate measurement of size.
Because this quantity is defined in terms of specific coordinates, it is not well represented by a Tensor, so we use a std::array.
|
noexcept |
Compute the inertial-coordinate size of an element along each of its logical directions.
For each logical direction, compute the distance (in inertial coordinates) between the element's lower and upper faces in that logical direction. The distance is measured between centers of the faces, with the centers defined in the logical coordinates. Note that for curved elements, this is an approximate measurement of size.
Because this quantity is defined in terms of specific coordinates, it is not well represented by a Tensor, so we use a std::array.
|
noexcept |
Compute the outward grid normal on a face of an Element.
Computes the grid-frame normal by taking the logical-frame unit one-form in the given Direction and mapping it to the grid frame with the given map.
|
noexcept |
Compute the outward grid normal on a face of an Element.
Computes the grid-frame normal by taking the logical-frame unit one-form in the given Direction and mapping it to the grid frame with the given map.
|
noexcept |
Compute the outward grid normal on a face of an Element.
Computes the grid-frame normal by taking the logical-frame unit one-form in the given Direction and mapping it to the grid frame with the given map.
|
noexcept |
Compute the outward grid normal on a face of an Element.
Computes the grid-frame normal by taking the logical-frame unit one-form in the given Direction and mapping it to the grid frame with the given map.
|
noexcept |
Compute the outward grid normal on a face of an Element.
Computes the grid-frame normal by taking the logical-frame unit one-form in the given Direction and mapping it to the grid frame with the given map.
|
noexcept |
Compute the outward grid normal on a face of an Element.
Computes the grid-frame normal by taking the logical-frame unit one-form in the given Direction and mapping it to the grid frame with the given map.
|
noexcept |
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.
This function is called by each element when it receives the AMR decisions of one of its neighbors. If any of its flags are updated, the element should send its new decisions to each of its neighbors. The following changes are made to the current flags of the element:
Returns: true if any flag is changed
my_current_amr_flags which are the AMR decisions of element.