The class template uniting topology and geometry of a hypergraph with the topology of the skeleton space of the HDG method.
More...
|
| HDGHyperGraph (const typename TopoT::constructor_value_type &construct_topo) |
| Construct HDGHyperGraph from constructor_value_type . More...
|
|
| HDGHyperGraph (const typename TopoT::constructor_value_type &construct_topo, const typename GeomT::constructor_value_type &construct_geom) |
| Construct HDGHyperGraph from constructor_value_type . More...
|
|
| HDGHyperGraph (std::shared_ptr< TopoT > topo, std::shared_ptr< GeomT > geom, std::shared_ptr< NodeT > node) |
| Construct HDGHyperGraph from existing topology and geometry. More...
|
|
value_type | operator[] (const hyEdge_index_t index) |
| Subscript operator of a HDGHyperGraph. More...
|
|
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator | begin () |
| Return iterator to first hyEdge of HDGHyperGraph. More...
|
|
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator | end () |
| Return iterator to the end of hyEdge list. More...
|
|
const HyperNodeFactory< n_dofs_per_nodeT, hyEdge_index_t > & | hyNode_factory () const |
| Return const reference to HyperNodeFactory. More...
|
|
const TopoT::value_type | hyEdge_topology (const hyEdge_index_t index) const |
| Topological information of prescribed hyperedge. More...
|
|
const GeomT::value_type | hyEdge_geometry (const hyEdge_index_t index) const |
| Geometrical information of prescribed hyperedge. More...
|
|
const NodeT::value_type | hyNode_descriptor (const hyEdge_index_t index) const |
| Nodal information of prescribed hyperedge. More...
|
|
DataT & | hyEdge_data (const hyEdge_index_t index) |
| Data of prescribed hyperedge. More...
|
|
const hyEdge_index_t | n_hyEdges () const |
| Return the number of hyperedges making up the hypergraph. More...
|
|
const hyEdge_index_t | n_hyNodes () const |
| Return the number of hypernodes making up the hypergraph. More...
|
|
template<typename dof_index_t = unsigned int> |
const dof_index_t | n_global_dofs () const |
| Returns the total amount of degrees of freedom in the considered hypergraph. More...
|
|
unsigned int | get_refinement () const |
| Return the refinement level of the hypergraph. More...
|
|
void | set_refinement (unsigned int level) |
| Set the refinement level of the hypergraph. More...
|
|
template<unsigned int n_dofs_per_nodeT, class TopoT, class GeomT, class NodeT, class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
class HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >
The class template uniting topology and geometry of a hypergraph with the topology of the skeleton space of the HDG method.
The main class representing a hypergraph. It uses a class Topology
to represent the collection of nodes and edges as well as a class Geometry
presenting the physical coordinates of the edges. It behaves like a random access container of hyperedges and has additional access to its nodes.
In our abstraction, nodes only carry degrees of freedom. Thus, they can be obtained from one object HyperNodeFactory
for any graph. Their location, if such a notion is reasonable, must be determined by that of the boundaries of an edge. The meaning of their degrees of freedom is decided by the local solvers of the HDG method applied. The Geometry
class may use degrees of freedom of the nodes as well.
- Template Parameters
-
n_dofs_per_nodeT | The number of degrees of freedom of a single hypernode which is assumed to be the same for all hypernodes. |
TopoT | Class that contains the topology of the hypergraph. This class is needs to provide a getter function to the topological information of a hyperedge of given index and can be arbitrarily implemented. |
GeomT | Class that contains the topology of the hypergraph. This class is needs to provide a getter function to the topological information of a hyperedge of given index and can be arbitrarily implemented. |
NodeDescT | Class that contains the descriptions of hyperedges' faces. |
hyEdge_index_t | Unsigned integer type specification. Default is unsigned int. |
- Authors
- Guido Kanschat, Heidelberg University, 2019–2020.
-
Andreas Rupp, Heidelberg University, 2019–2020.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
The type for a hyperedge returned by operator
[].
This typedef
struct
is returned by the operator
[] of an HDGHyperGraph
. It contains topological and geometrical information about a single hyperedge. It is therefore defined as the value_type
of class HDGHyperGraph
.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::HDGHyperGraph |
( |
const typename TopoT::constructor_value_type & |
construct_topo | ) |
|
|
inline |
Construct HDGHyperGraph from constructor_value_type
.
This is one of two standard ways of constructing a hypergraph. That is, a hypergraph is constructed by providing the necessary data in form of the respective constructor_value_type
.
- Parameters
-
construct_topo | Information needed to deduce topological and geometrical data to construct a HDGHyperGraph . |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::HDGHyperGraph |
( |
const typename TopoT::constructor_value_type & |
construct_topo, |
|
|
const typename GeomT::constructor_value_type & |
construct_geom |
|
) |
| |
|
inline |
Construct HDGHyperGraph from constructor_value_type
.
This is one of two standard ways of constructing a hypergraph. That is, a hypergraph is constructed by providing the necessary data to construct its topology and its geometry seperately in form of the respective constructor_value_type
(plural, two).
- Parameters
-
construct_topo | Information needed to deduce topological data. |
construct_geom | Information needed to deduce geometrical data. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::HDGHyperGraph |
( |
std::shared_ptr< TopoT > |
topo, |
|
|
std::shared_ptr< GeomT > |
geom, |
|
|
std::shared_ptr< NodeT > |
node |
|
) |
| |
|
inline |
Construct HDGHyperGraph from existing topology and geometry.
This is one of two standard ways of constructing a hypergraph. That is, a hypergraph is constructed by providing the necessary data to construct its topology and its geometry seperately in form of the respective constructor_value_type
(plural, two).
- Parameters
-
topo | Information needed to deduce topological data. |
geom | Information needed to deduce geometrical data. |
node | Information needed to deduce nodal data. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HDGHyperGraph<n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t>::iterator HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::begin |
( |
| ) |
|
|
inline |
Return iterator to first hyEdge of HDGHyperGraph.
This function returns an HDGHyperGraph::iterator that refers to the first hyEdge
of the hypergraph (index = 0). Thus, it can be used to mark the starting point in for_each
loops.
- Return values
-
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HDGHyperGraph<n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t>::iterator HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::end |
( |
| ) |
|
|
inline |
Return iterator to the end of hyEdge list.
This function returns an HDGHyperGraph::iterator that refers to the position of an (non- existing) hyEdge
of the hypergraph (index = n_hyEdges), i.e., the position directly after the last valid entry of the HDGHyperGraph. Thus, it can be used to mark the ending point in for_each
loops.
- Return values
-
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
unsigned int HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::get_refinement |
( |
| ) |
const |
|
inline |
Return the refinement level of the hypergraph.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
DataT& HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyEdge_data |
( |
const hyEdge_index_t |
index | ) |
|
|
inline |
Data of prescribed hyperedge.
- Parameters
-
index | Index of the hyperedge to be returned. |
- Return values
-
hyEdge_data | The data saved with respect to a hyperede. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
static constexpr unsigned int HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyEdge_dim |
( |
| ) |
|
|
inlinestaticconstexpr |
Returns the template parameter representing the dimension of a hyperedge.
- Return values
-
hyEdge_dim | The dimension of a hyperedge. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
const GeomT::value_type HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyEdge_geometry |
( |
const hyEdge_index_t |
index | ) |
const |
|
inline |
Geometrical information of prescribed hyperedge.
Return the geometrical information of a specific hyperedge identified via its index. This function can be used to bypass the subscript operator which returns topological and geometric information about a hyperedge of given index.
- Parameters
-
index | Index of the hyperedge to be returned. |
- Return values
-
hyEdge_geometry | Geometrical information about hyperedge. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
const TopoT::value_type HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyEdge_topology |
( |
const hyEdge_index_t |
index | ) |
const |
|
inline |
Topological information of prescribed hyperedge.
Return the topological information of a specific hyperedge identified via its index. This function can be used to bypass the subscript operator which returns topological and geometric information about a hyperedge of given index.
- Parameters
-
index | Index of the hyperedge to be returned. |
- Return values
-
hyEdge_topology | Topological information about hyperedge. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
const NodeT::value_type HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyNode_descriptor |
( |
const hyEdge_index_t |
index | ) |
const |
|
inline |
Nodal information of prescribed hyperedge.
- Parameters
-
index | Index of the hyperedge to be returned. |
- Return values
-
hyEdge_nodedescriptor | Node types of nodes of a hyperedge. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
const HyperNodeFactory<n_dofs_per_nodeT, hyEdge_index_t>& HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyNode_factory |
( |
| ) |
const |
|
inline |
Return const reference to HyperNodeFactory.
This function returns an HyperNodeFactory
handling the access to the degrees of freedom encoded in some vector type.
- Return values
-
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
static constexpr unsigned int HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::n_dofs_per_node |
( |
| ) |
|
|
inlinestaticconstexpr |
Returns the template parameter representing the amount of dofs per node.
- Return values
-
n_dofs_per_nodeT | The amount of degrees of freedom per node. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
template<typename dof_index_t = unsigned int>
const dof_index_t HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::n_global_dofs |
( |
| ) |
const |
|
inline |
Returns the total amount of degrees of freedom in the considered hypergraph.
- Return values
-
n_global_dofs | The total amount of degreees of freedom in the considered hypergraph. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
const hyEdge_index_t HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::n_hyEdges |
( |
| ) |
const |
|
inline |
Return the number of hyperedges making up the hypergraph.
- Return values
-
n_hyEdges | The total amount of hyperedges of a hypergraph. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
const hyEdge_index_t HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::n_hyNodes |
( |
| ) |
const |
|
inline |
Return the number of hypernodes making up the hypergraph.
- Return values
-
n_hypernodes | The total amount of hypernodes of a hypergraph. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
value_type HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::operator[] |
( |
const hyEdge_index_t |
index | ) |
|
|
inline |
Subscript operator of a HDGHyperGraph.
The subscript operator takes an index referring to an hyperedge and returns the respective hyEdge containing its topological and geometrical information. Thus, this operator can be bypassed by using the functions hyEdge_topology
(only returning the topological data) and hyEdge_geometry (ony returning the geometrical data).
- Parameters
-
index | Index of the hyEdge to be returned. |
- Return values
-
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
static constexpr unsigned int HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::space_dim |
( |
| ) |
|
|
inlinestaticconstexpr |
Returns the template parameter representing the dimension of the space.
- Return values
-
space_dim | The dimension of the space. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
Hypernode factory administrating the access to degrees of freedom.
A HyperNodeFactory
allowing to connect nodes of the hypergraph to degrees of freedom which are located in some std::vector
. Note that this HyperNodeFactory has the same index type for the hypernodes as this class for the hyperedges.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
std::shared_ptr<GeomT> HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyGraph_geometry_ |
|
private |
Geometry of the hypergraph.
This object contains the geometry of the hypergraph, i.e., it encodes the geometry of the various hyperedges.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
std::shared_ptr<NodeT> HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyGraph_node_des_ |
|
private |
Node descriptions of the hypergraph.
This object contains the nodal information of the hypergraph.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
std::shared_ptr<TopoT> HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyGraph_topology_ |
|
private |
Topology of the hypergraph.
This object contains the topology of the hypergraph, i.e., it encodes which hyperedges connect which hypernodes.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HyperNodeFactory<n_dofs_per_nodeT, hyEdge_index_t> HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyNode_factory_ |
|
private |
Hypernode factory administrating the access to degrees of freedom.
A HyperNodeFactory
allowing to connect nodes of the hypergraph to degrees of freedom which are located in some std::vector
. Note that this HyperNodeFactory has the same index type for the hypernodes as this class for the hyperedges.