HyperHDG
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t > Class Template Reference

The class template uniting topology and geometry of a hypergraph with the topology of the skeleton space of the HDG method. More...

#include <hdg_hypergraph.hxx>

Collaboration diagram for HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >:
Collaboration graph
[legend]

Classes

struct  hyEdge
 The type for a hyperedge returned by operator[]. More...
 
class  iterator
 Iterator for struct hyEdge returned by operator[]. More...
 

Public Member Functions

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

Static Public Member Functions

static constexpr unsigned int hyEdge_dim ()
 Returns the template parameter representing the dimension of a hyperedge. More...
 
static constexpr unsigned int space_dim ()
 Returns the template parameter representing the dimension of the space. More...
 
static constexpr unsigned int n_dofs_per_node ()
 Returns the template parameter representing the amount of dofs per node. More...
 

Private Types

typedef struct HDGHyperGraph::hyEdge value_type
 The type for a hyperedge returned by operator[]. More...
 

Private Attributes

std::shared_ptr< TopoT > hyGraph_topology_
 Topology of the hypergraph. More...
 
std::shared_ptr< GeomT > hyGraph_geometry_
 Geometry of the hypergraph. More...
 
std::shared_ptr< NodeT > hyGraph_node_des_
 Node descriptions of the hypergraph. More...
 
HyperNodeFactory< n_dofs_per_nodeT, hyEdge_index_t > hyNode_factory_
 Hypernode factory administrating the access to degrees of freedom. More...
 
HyDataContainer< DataT > hyData_cont_
 Hypernode factory administrating the access to degrees of freedom. More...
 

Detailed Description

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_nodeTThe number of degrees of freedom of a single hypernode which is assumed to be the same for all hypernodes.
TopoTClass 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.
GeomTClass 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.
NodeDescTClass that contains the descriptions of hyperedges' faces.
hyEdge_index_tUnsigned integer type specification. Default is unsigned int.
Authors
Guido Kanschat, Heidelberg University, 2019–2020.
Andreas Rupp, Heidelberg University, 2019–2020.

Member Typedef Documentation

◆ value_type

template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
typedef struct HDGHyperGraph::hyEdge HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::value_type
private

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.

Constructor & Destructor Documentation

◆ HDGHyperGraph() [1/3]

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_topoInformation needed to deduce topological and geometrical data to construct a HDGHyperGraph.

◆ HDGHyperGraph() [2/3]

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_topoInformation needed to deduce topological data.
construct_geomInformation needed to deduce geometrical data.

◆ HDGHyperGraph() [3/3]

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
topoInformation needed to deduce topological data.
geomInformation needed to deduce geometrical data.
nodeInformation needed to deduce nodal data.

Member Function Documentation

◆ begin()

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
hyEdgeIterator referring to first hyEdge.

◆ end()

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
hyEdgeIterator referring to position behind last hyEdge.

◆ get_refinement()

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.


◆ hyEdge_data()

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
indexIndex of the hyperedge to be returned.
Return values
hyEdge_dataThe data saved with respect to a hyperede.

◆ hyEdge_dim()

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

◆ hyEdge_geometry()

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
indexIndex of the hyperedge to be returned.
Return values
hyEdge_geometryGeometrical information about hyperedge.

◆ hyEdge_topology()

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
indexIndex of the hyperedge to be returned.
Return values
hyEdge_topologyTopological information about hyperedge.

◆ hyNode_descriptor()

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
indexIndex of the hyperedge to be returned.
Return values
hyEdge_nodedescriptorNode types of nodes of a hyperedge.

◆ hyNode_factory()

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
hypernode_factoryThe HyperNodeFactory belonging the hypergraph.

◆ n_dofs_per_node()

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_nodeTThe amount of degrees of freedom per node.

◆ n_global_dofs()

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_dofsThe total amount of degreees of freedom in the considered hypergraph.

◆ n_hyEdges()

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_hyEdgesThe total amount of hyperedges of a hypergraph.

◆ n_hyNodes()

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_hypernodesThe total amount of hypernodes of a hypergraph.

◆ operator[]()

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
indexIndex of the hyEdge to be returned.
Return values
hyEdgeThe hyEdge of the given index.

◆ set_refinement()

template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
void HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::set_refinement ( unsigned int  level)
inline

Set the refinement level of the hypergraph.


◆ space_dim()

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

Member Data Documentation

◆ hyData_cont_

template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HyDataContainer<DataT> HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::hyData_cont_
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.

◆ hyGraph_geometry_

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.

◆ hyGraph_node_des_

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.

◆ hyGraph_topology_

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.

◆ hyNode_factory_

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.


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