HyperHDG
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT > Class Template Reference

Hypergraph topology based on an input file. More...

#include <file.hxx>

Collaboration diagram for Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >:
Collaboration graph
[legend]

Classes

class  hyEdge
 Definition of the topology of a hypergraph's edges. More...
 

Public Types

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

Public Member Functions

 File (const constructor_value_type &filename)
 Construct a topology from a given filename. More...
 
 File (const File< hyEdge_dimT, space_dimT > &other)
 Copy constructor. More...
 
const value_type operator[] (const hyEdge_index_t index) const
 Get topological hyperedge of given index. More...
 
const value_type get_hyEdge (const hyEdge_index_t index) const
 Get topological hyperedge of given index. More...
 
const hyEdge_index_t n_hyEdges () const
 Return the number of hyperedges making up the hypergraph. More...
 
const hyNode_index_t n_hyNodes () const
 Return the number of hypernodes making up the hypergraph. More...
 
const DomainInfo< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t > & domain_info () const
 Return the whole domain info related to a hypergraph. More...
 
const Wrapper::tpcc_t< hyEdge_dimT, hyEdge_dimT, TPCC::boundaries::both, hyNode_index_t > & tpcc_ref_elem () const
 Tensor product chain complex of 'local' / refined elements. 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 local dimension of the hypergraph's hyperedges. More...
 
static constexpr unsigned int space_dim ()
 Return dimension of the surrounding space. More...
 

Private Attributes

const DomainInfo< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t > domain_info_
 Domain Info containing all the information of the hypergraph (cf. ReadDomain.hxx). 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, hyNode_index_t > tpcc_ref_elem_
 Tensor product chain complex for refining a hyperedge into elements. More...
 
Wrapper::tpcc_t< hyEdge_dimT - 1, hyEdge_dimT, TPCC::boundaries::none, hyNode_index_t > tpcc_ref_faces_
 Tensor product chain complex for refining a hyperedge into faces. More...
 
unsigned int n_elem_per_elem
 Number of refined elements per corase element. More...
 
unsigned int n_face_per_face
 Number of refined faces per corase face. More...
 
unsigned int n_face_per_elem
 Number of refined faces per corase element. More...
 
unsigned int n_coarse_elem
 Number of refined corase elements. More...
 
unsigned int n_coarse_face
 Number of refined corase faces. More...
 
hyEdge_index_t n_hyEdges_
 Total amount of hyperedges. More...
 
hyNode_index_t n_hyNodes_
 Total amount of hypernodes. More...
 

Detailed Description

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
class Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >

Hypergraph topology based on an input file.


The topology class File is a set of hyperedges. Each of these tensorial hyperedges is represented by its hypernodes (given within the file). For consistency, it is assumed that the vertices and the hypernodes are assumed to be given in lexicographical order to ensure that geometry and topology of all hyperedges fit.

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.
vectorTThe typename of the large vector type. Defaults to std::vector.
pointTThe typename of a Point class. Defaults to Point<space_dimT, float>.
hyEdge_index_tThe index type for hyperedges. Default is unsigned int.
hyNode_index_tThe index type for hypernodes. Default is hyNode_index_t.
pt_index_tThe index type of points. Default is hyNode_index_t.
NodeOrientationTThe class type that encodes the orientation of the hypernodes with respect to a given hyperedge.
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, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
typedef std::string Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::constructor_value_type

Defines the value type of input argument for standard constructor.


◆ value_type

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
typedef hyEdge Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::value_type

Defines the return value of the class.


Constructor & Destructor Documentation

◆ File() [1/2]

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::File ( const constructor_value_type filename)
inline

Construct a topology from a given filename.


Parameters
filenameName of file containing the information.

◆ File() [2/2]

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::File ( const File< hyEdge_dimT, space_dimT > &  other)
inline

Copy constructor.


Member Function Documentation

◆ domain_info()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
const DomainInfo<hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t>& Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::domain_info ( ) const
inline

Return the whole domain info related to a hypergraph.


Return values
domain_infoConst reference to domain info.

◆ get_hyEdge()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
const value_type Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::get_hyEdge ( const hyEdge_index_t  index) const
inline

Get topological hyperedge of given index.


This is equivalent to operator[].

Parameters
indexThe index of the hyperedge to be returned.
Return values
hyperedgeTopological information on the hyperedge (cf. value_type).

◆ get_refinement()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::get_refinement ( ) const
inline

Return the refinement level (equal to number of subintervals).


◆ hyEdge_dim()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
static constexpr unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::hyEdge_dim ( )
inlinestaticconstexpr

Return local dimension of the hypergraph's hyperedges.


◆ n_hyEdges()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
const hyEdge_index_t Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_hyEdges ( ) const
inline

Return the number of hyperedges making up the hypergraph.


Return values
n_hyperedgesThe total amount of hyperedges of a hypergraph.

◆ n_hyNodes()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
const hyNode_index_t Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::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 hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
const value_type Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::operator[] ( const hyEdge_index_t  index) const
inline

Get topological hyperedge of given index.


This is equivalent to get_hyEdge.

Parameters
indexThe index of the hyperedge to be returned.
Return values
hyperedgeTopological information on the hyperedge (cf. value_type).
Here is the call graph for this function:

◆ set_refinement()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
void Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::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, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
static constexpr unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::space_dim ( )
inlinestaticconstexpr

Return dimension of the surrounding space.


◆ tpcc_ref_elem()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
const Wrapper::tpcc_t<hyEdge_dimT, hyEdge_dimT, TPCC::boundaries::both, hyNode_index_t>& Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::tpcc_ref_elem ( ) const
inline

Tensor product chain complex of 'local' / refined elements.


Member Data Documentation

◆ domain_info_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
const DomainInfo<hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t> Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::domain_info_
private

Domain Info containing all the information of the hypergraph (cf. ReadDomain.hxx).


◆ n_coarse_elem

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_coarse_elem
private

Number of refined corase elements.


◆ n_coarse_face

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_coarse_face
private

Number of refined corase faces.


◆ n_elem_per_elem

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_elem_per_elem
private

Number of refined elements per corase element.


◆ n_face_per_elem

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_face_per_elem
private

Number of refined faces per corase element.


◆ n_face_per_face

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_face_per_face
private

Number of refined faces per corase face.


◆ n_hyEdges_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
hyEdge_index_t Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_hyEdges_
private

Total amount of hyperedges.


◆ n_hyNodes_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
hyNode_index_t Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_hyNodes_
private

Total amount of hypernodes.


◆ n_subintervals_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
unsigned int Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::n_subintervals_
private

Refinment level corresponds to number of subintervals per dimension.


◆ tpcc_ref_elem_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
Wrapper::tpcc_t<hyEdge_dimT, hyEdge_dimT, TPCC::boundaries::both, hyNode_index_t> Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::tpcc_ref_elem_
private

Tensor product chain complex for refining a hyperedge into elements.


◆ tpcc_ref_faces_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dimT, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t, typename NodeOrientationT = SmallVec<2 * hyEdge_dimT - 2, unsigned int>>
Wrapper::tpcc_t<hyEdge_dimT - 1, hyEdge_dimT, TPCC::boundaries::none, hyNode_index_t> Topology::File< hyEdge_dimT, space_dimT, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t, NodeOrientationT >::tpcc_ref_faces_
private

Tensor product chain complex for refining a hyperedge into faces.



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