Define the geometry of a unit cube that is subdivided into several orthotopes.
More...
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
class Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >
Define the geometry of a unit cube that is subdivided into several orthotopes.
This class defines the geometry of a unit cube which is subdivided into several orthotopes. The number of orthotopes in each spatial dimension is defined by the vector that serves as the argument of the constructor.
- Template Parameters
-
hyEdge_dimT | Dimension of a hyperedge, i.e., 1 is for PDEs defined on graphs, 2 is for PDEs defined on surfaces, and 3 is for PDEs defined on volumes, .... |
space_dimT | The dimension of the space, the object is located in. This number should be larger than or equal to hyEdge_dimT. |
pt_coord_t | The floating point type in which the coordinates of vertices are given. Defaults to double. |
ConstructorVecT | The vector/array type of the constructor. Defaults to SmallVec<space_dimT, unsigned int>. |
hyEdge_index_t | The integer type in which the indices of hyperedges are represented. Defaults to unsigne int. |
- Authors
- Guido Kanschat, Heidelberg University, 2019–2020.
-
Andreas Rupp, Heidelberg University, 2019–2020.
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
Defines the value type of input argument for standard constructor.
To receive very general global loops, constructors need to account for the fact that the specific topology / geometry of a hypergraph influences the way in which the hypergraph needs to be constructed. The typedef
implements the aspect, that a cubic hypergraph geometry which is a unit cube is by default constructed by a vector / array that contains the numbers of elements in the different dimensions.
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
Defines the return value of the class.
The class
UnitCube
defines the geometry of the hypergraph. It contains the different hyperedges (that actually are constructed everytime access is needed from e.g. the solver class). Thus, its main purpose is to provide a structure that administrates the hyperedges that are the return value of this structure.
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
Construct a cubic that describes a unit cube hypergraph.
Constructs a hypergraph from a constructor_value_type
containing the elementens per spatial dimension.
- Parameters
-
n_elements | The number of elements per spatial dimension. |
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
Construct a unit cube from its topological information.
Constructs a hypergraph from a Topology::Cubic
containing the elementens per spatial dimension.
- Parameters
-
other | The topology of the hypergraph that has the geometry of the unit cube. |
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
unsigned int Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::get_refinement |
( |
| ) |
const |
|
inline |
Return the refinement level (equal to number of subintervals).
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
static constexpr unsigned int Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::hyEdge_dim |
( |
| ) |
|
|
inlinestaticconstexpr |
Return the template parameter representing the dimension of a hyperedge.
- Return values
-
hyEdge_dimT | The dimension of a hyperedge. |
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
const value_type Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::operator[] |
( |
const hyEdge_index_t |
index | ) |
const |
|
inline |
Get geometrical hyperedge of given index.
This function returns the hyperedge of the given index, i.e., it returns the geometrical hyperedge (not the topological information). The geometrical informatiom comprises the indices of adjacent vertices (i.e. points) and information about their respective positions.
- Parameters
-
index | The index of the hyperedge to be returned. |
- Return values
-
hyperedge | Geometrical information on the hyperedge (cf. value_type ). |
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
void Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::set_refinement |
( |
unsigned int |
level | ) |
|
|
inline |
Set the refinement level (equal to number of subintervals).
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
static constexpr unsigned int Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::space_dim |
( |
| ) |
|
|
inlinestaticconstexpr |
Return the template parameter representing the dimension of the space.
- Return values
-
space_dimT | The dimension of the space. |
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
const SmallVec<space_dimT, unsigned int> Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::n_elements_ |
|
private |
Number of elements per spatial dimension.
A vector / array comprising the number of elements in each spatial dimension.
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
unsigned int Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::n_loc_ref_elem |
|
private |
Number of refined elements per element.
template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename pt_coord_t = double, typename ConstructorVecT = SmallVec<space_dimT, unsigned int>, typename hyEdge_index_t = unsigned int>
unsigned int Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::n_subintervals_ |
|
private |
Refinment level corresponds to number of subintervals per dimension.