HyperHDG
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t > Class Template Reference

Define the geometry of a unit cube that is subdivided into several orthotopes. More...

#include <unit_cube.hxx>

Collaboration diagram for Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >:
Collaboration graph
[legend]

Classes

class  hyEdge
 Definition of the geometry of a single hyperedge. More...
 

Public Types

typedef hyEdge value_type
 Defines the return value of the class. More...
 
typedef ConstructorVecT constructor_value_type
 Defines the value type of input argument for standard constructor. More...
 

Public Member Functions

 UnitCube (const constructor_value_type &n_elements)
 Construct a cubic that describes a unit cube hypergraph. More...
 
 UnitCube (const Topology::Cubic< hyEdge_dimT, space_dimT > &other)
 Construct a unit cube from its topological information. More...
 
const value_type operator[] (const hyEdge_index_t index) const
 Get geometrical hyperedge of given index. More...
 
unsigned int get_refinement () const
 Return the refinement level (equal to number of subintervals). More...
 
void set_refinement (unsigned int level)
 Set the refinement level (equal to number of subintervals). More...
 

Static Public Member Functions

static constexpr unsigned int hyEdge_dim ()
 Return the template parameter representing the dimension of a hyperedge. More...
 
static constexpr unsigned int space_dim ()
 Return the template parameter representing the dimension of the space. More...
 

Private Attributes

const SmallVec< space_dimT, unsigned int > n_elements_
 Number of elements per spatial dimension. More...
 
const Wrapper::tpcc_t< hyEdge_dimT, space_dimT, TPCC::boundaries::both, hyEdge_index_t > tpcc_elements_
 Tensor product chain complex for elements. More...
 
unsigned int n_subintervals_
 Refinment level corresponds to number of subintervals per dimension. More...
 
Wrapper::tpcc_t< hyEdge_dimT, hyEdge_dimT, TPCC::boundaries::both, hyEdge_index_t > tpcc_ref_elem_
 Tensor product chain complex for refined elements. More...
 
unsigned int n_loc_ref_elem
 Number of refined elements per element. More...
 

Detailed Description

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_dimTDimension 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_dimTThe dimension of the space, the object is located in. This number should be larger than or equal to hyEdge_dimT.
pt_coord_tThe floating point type in which the coordinates of vertices are given. Defaults to double.
ConstructorVecTThe vector/array type of the constructor. Defaults to SmallVec<space_dimT, unsigned int>.
hyEdge_index_tThe 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.

Member Typedef Documentation

◆ constructor_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>
typedef ConstructorVecT Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::constructor_value_type

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.

◆ 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>
typedef hyEdge Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::value_type

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.

Constructor & Destructor Documentation

◆ UnitCube() [1/2]

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>
Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::UnitCube ( const constructor_value_type n_elements)
inline

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_elementsThe number of elements per spatial dimension.

◆ UnitCube() [2/2]

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>
Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::UnitCube ( const Topology::Cubic< hyEdge_dimT, space_dimT > &  other)
inline

Construct a unit cube from its topological information.


Constructs a hypergraph from a Topology::Cubic containing the elementens per spatial dimension.

Parameters
otherThe topology of the hypergraph that has the geometry of the unit cube.

Member Function Documentation

◆ get_refinement()

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).


◆ hyEdge_dim()

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_dimTThe dimension of a hyperedge.

◆ operator[]()

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
indexThe index of the hyperedge to be returned.
Return values
hyperedgeGeometrical information on the hyperedge (cf. value_type).

◆ set_refinement()

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).


Here is the call graph for this function:

◆ space_dim()

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_dimTThe dimension of the space.

Member Data Documentation

◆ n_elements_

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.

◆ n_loc_ref_elem

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.


◆ n_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>
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.


◆ tpcc_elements_

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 Wrapper::tpcc_t<hyEdge_dimT, space_dimT, TPCC::boundaries::both, hyEdge_index_t> Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::tpcc_elements_
private

Tensor product chain complex for elements.


◆ tpcc_ref_elem_

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>
Wrapper::tpcc_t<hyEdge_dimT, hyEdge_dimT, TPCC::boundaries::both, hyEdge_index_t> Geometry::UnitCube< hyEdge_dimT, space_dimT, pt_coord_t, ConstructorVecT, hyEdge_index_t >::tpcc_ref_elem_
private

Tensor product chain complex for refined elements.



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