Go to the documentation of this file. 1 #pragma once // Ensure that file is included only once in a single compilation.
45 template <
unsigned int n_dofs_per_nodeT,
50 typename hyEdge_index_t =
unsigned int>
98 hyEdge(
const typename TopoT::value_type& topo,
99 const typename GeomT::value_type& geom,
100 const typename NodeT::value_type& node,
243 static constexpr
unsigned int hyEdge_dim() {
return TopoT::hyEdge_dim(); }
249 static constexpr
unsigned int space_dim() {
return TopoT::space_dim(); }
313 static_assert(TopoT::hyEdge_dim() == GeomT::hyEdge_dim(),
314 "The dimension of topology and geometry should be equal!");
316 "The amount of hypernodes known to the hypernode factory is "
317 <<
hyNode_factory_.n_hyNodes() <<
", which is not equal to the amount that the"
320 "A hypergraph is assumed to consist of at least two hypernodes. This graph only "
323 "A hypergraph is supposed to consist of at least one hyperedge. This graph "
338 const typename GeomT::constructor_value_type& construct_geom)
345 static_assert(TopoT::hyEdge_dim() == GeomT::hyEdge_dim(),
346 "The dimension of topology and geometry should be equal!");
348 "The amount of hypernodes known to the hypernode factory is "
349 <<
hyNode_factory_.n_hyNodes() <<
", which is not equal to the amount that the"
352 "A hypergraph is assumed to consist of at least two hypernodes. This graph only "
355 "A hypergraph is supposed to consist of at least one hyperedge. This graph "
371 std::shared_ptr<GeomT> geom,
372 std::shared_ptr<NodeT> node)
379 static_assert(TopoT::hyEdge_dim() == GeomT::hyEdge_dim(),
380 "The dimension of topology and geometry should be equal!");
382 "The amount of hypernodes known to the hypernode factory is "
383 <<
hyNode_factory_.n_hyNodes() <<
", which is not equal to the amount that the"
386 "A hypergraph is assumed to consist of at least two hypernodes. This graph only "
389 "A hypergraph is supposed to consist of at least one hyperedge. This graph "
513 template <
typename dof_index_t =
unsigned int>
std::shared_ptr< TopoT > hyGraph_topology_
Topology of the hypergraph.
Definition: hdg_hypergraph.hxx:264
This file provides the function hy_assert.
std::shared_ptr< GeomT > hyGraph_geometry_
Geometry of the hypergraph.
Definition: hdg_hypergraph.hxx:271
const dof_index_t n_global_dofs() const
Returns the total amount of degrees of freedom in the considered hypergraph.
Definition: hdg_hypergraph.hxx:514
HDGHyperGraph(std::shared_ptr< TopoT > topo, std::shared_ptr< GeomT > geom, std::shared_ptr< NodeT > node)
Construct HDGHyperGraph from existing topology and geometry.
Definition: hdg_hypergraph.hxx:370
HDGHyperGraph::value_type operator*()
Dereference iterator to hyEdge.
Definition: hdg_hypergraph.hxx:220
HyperNodeFactory< n_dofs_per_nodeT, hyEdge_index_t > hyNode_factory_
Hypernode factory administrating the access to degrees of freedom.
Definition: hdg_hypergraph.hxx:285
unsigned int get_refinement() const
Return the refinement level of the hypergraph.
Definition: hdg_hypergraph.hxx:521
void set_refinement(unsigned int level)
Set the refinement level of the hypergraph.
Definition: hdg_hypergraph.hxx:525
index
Definition: check_push_test.py:10
hyEdge(const typename TopoT::value_type &topo, const typename GeomT::value_type &geom, const typename NodeT::value_type &node, DataT &dat)
Construct the struct that contains geometrical and topological information on a hyperedge.
Definition: hdg_hypergraph.hxx:98
HDGHyperGraph(const typename TopoT::constructor_value_type &construct_topo, const typename GeomT::constructor_value_type &construct_geom)
Construct HDGHyperGraph from constructor_value_type.
Definition: hdg_hypergraph.hxx:337
iterator(const iterator &other)
Copy–construct an iterator from another iterator.
Definition: hdg_hypergraph.hxx:152
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator end()
Return iterator to the end of hyEdge list.
Definition: hdg_hypergraph.hxx:433
The class template uniting topology and geometry of a hypergraph with the topology of the skeleton sp...
Definition: hdg_hypergraph.hxx:51
static constexpr unsigned int n_dofs_per_node()
Returns the template parameter representing the amount of dofs per node.
Definition: hdg_hypergraph.hxx:255
HDGHyperGraph & hyGraph_
Reference to the HDGHyperGraph of the iterator.
Definition: hdg_hypergraph.hxx:123
iterator operator++(int)
Increment iterator and return old iterator.
Definition: hdg_hypergraph.hxx:201
HyDataContainer< DataT > hyData_cont_
Hypernode factory administrating the access to degrees of freedom.
Definition: hdg_hypergraph.hxx:293
iterator & operator--()
Decrement iterator and return incremented iterator.
Definition: hdg_hypergraph.hxx:186
const GeomT::value_type hyEdge_geometry(const hyEdge_index_t index) const
Geometrical information of prescribed hyperedge.
Definition: hdg_hypergraph.hxx:474
const NodeT::value_type hyNode_descriptor(const hyEdge_index_t index) const
Nodal information of prescribed hyperedge.
Definition: hdg_hypergraph.hxx:484
bool operator==(const iterator &other)
Check for equality with another iterator.
Definition: hdg_hypergraph.hxx:231
NodeT::value_type node_descriptor
Type of nodes information of a hyperedge.
Definition: hdg_hypergraph.hxx:79
This class is responsible for the mapping of hypernodes to global degrees of freedom.
Definition: hypernodefactory.hxx:21
HDGHyperGraph(const typename TopoT::constructor_value_type &construct_topo)
Construct HDGHyperGraph from constructor_value_type.
Definition: hdg_hypergraph.hxx:306
DataT & data
Type of nodes information of a hyperedge.
Definition: hdg_hypergraph.hxx:85
Class for saving some (abstract) data per hyperedge.
Definition: hy_data_container.hxx:23
const hyEdge_index_t n_hyNodes() const
Return the number of hypernodes making up the hypergraph.
Definition: hdg_hypergraph.hxx:506
iterator(HDGHyperGraph &hyGraph, const hyEdge_index_t index)
Construct an iterator from an HDGHyperGraph and an index.
Definition: hdg_hypergraph.hxx:142
DataT & hyEdge_data(const hyEdge_index_t index)
Data of prescribed hyperedge.
Definition: hdg_hypergraph.hxx:494
hyEdge_index_t index_
Index of the hyEdge of the iterator.
Definition: hdg_hypergraph.hxx:130
value_type operator[](const hyEdge_index_t index)
Subscript operator of a HDGHyperGraph.
Definition: hdg_hypergraph.hxx:403
Iterator for struct hyEdge returned by operator[].
Definition: hdg_hypergraph.hxx:114
struct HDGHyperGraph::hyEdge value_type
The type for a hyperedge returned by operator[].
const hyEdge_index_t n_hyEdges() const
Return the number of hyperedges making up the hypergraph.
Definition: hdg_hypergraph.hxx:500
The type for a hyperedge returned by operator[].
Definition: hdg_hypergraph.hxx:60
TopoT::value_type topology
Topological information of a hyperedge.
Definition: hdg_hypergraph.hxx:67
GeomT::value_type geometry
Geometrical information of a hyperedge.
Definition: hdg_hypergraph.hxx:73
#define hy_assert(Expr, Msg)
The assertion to be used within HyperHDG — deactivate using -DNDEBUG compile flag.
Definition: hy_assert.hxx:38
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator begin()
Return iterator to first hyEdge of HDGHyperGraph.
Definition: hdg_hypergraph.hxx:417
const HyperNodeFactory< n_dofs_per_nodeT, hyEdge_index_t > & hyNode_factory() const
Return const reference to HyperNodeFactory.
Definition: hdg_hypergraph.hxx:446
iterator & operator++()
Increment iterator and return incremented iterator.
Definition: hdg_hypergraph.hxx:171
iterator & operator=(const iterator &other)=default
Copy–assign an iterator from another iterator.
static constexpr unsigned int hyEdge_dim()
Returns the template parameter representing the dimension of a hyperedge.
Definition: hdg_hypergraph.hxx:243
Empty class as defaultd data class.
Definition: hdg_hypergraph.hxx:12
const TopoT::value_type hyEdge_topology(const hyEdge_index_t index) const
Topological information of prescribed hyperedge.
Definition: hdg_hypergraph.hxx:460
iterator operator--(int)
Decrement iterator and return old iterator.
Definition: hdg_hypergraph.hxx:212
static constexpr unsigned int space_dim()
Returns the template parameter representing the dimension of the space.
Definition: hdg_hypergraph.hxx:249
std::shared_ptr< NodeT > hyGraph_node_des_
Node descriptions of the hypergraph.
Definition: hdg_hypergraph.hxx:277