HyperHDG
Classes | Functions
read_domain.hxx File Reference
#include <HyperHDG/epsilon_neighborhood_graph.hxx>
#include <HyperHDG/hy_assert.hxx>
#include <algorithm>
#include <array>
#include <filesystem>
#include <fstream>
#include <sstream>
Include dependency graph for read_domain.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DomainInfo< hyEdge_dim, space_dim, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t >
 Hold all topological and geometrical information of a hypergraph. More...
 

Functions

template<typename vectorT >
bool is_unique (const vectorT &vec)
 Check whether a std::vector does not contain duplicate entries. More...
 
template<unsigned int hyEdge_dim, unsigned int space_dim, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dim, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t>
DomainInfo< hyEdge_dim, space_dim, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t > read_domain_geo (const std::string &filename)
 Function to read geo file. More...
 
template<unsigned int hyEdge_dim, unsigned int space_dim, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dim, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t>
DomainInfo< hyEdge_dim, space_dim, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t > read_domain (std::string filename)
 General Function to read domain from input file. More...
 

Function Documentation

◆ is_unique()

template<typename vectorT >
bool is_unique ( const vectorT &  vec)

Check whether a std::vector does not contain duplicate entries.


This function returns true if the std::vector vec does not contain duplicates, and false if it contains duplicates.

Template Parameters
vectorTClass template for vector.
Parameters
vecGeneral vector to be checked for duplicates.
Return values
is_uniqueTrue if vector does not contain duplicates and false otherwise.
Authors
Guido Kanschat, Heidelberg University, 2020.
Andreas Rupp, Heidelberg University, 2020.

◆ read_domain()

template<unsigned int hyEdge_dim, unsigned int space_dim, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dim, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t>
DomainInfo<hyEdge_dim, space_dim, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t> read_domain ( std::string  filename)

General Function to read domain from input file.


At the moment, only self-defined .geo files are supported. These files are supposed to comprise hypergraphs consisting of hypercuboids only. Other versions have not yet been implemented.

Template Parameters
hyEdge_dimThe local dimension of a hyperedge.
space_dimThe dimension of the surrounding space.
vectorTThe typename of a large vector holding e.g. all points.
pointTThe typename of a point.
hyEdge_index_tThe index type for hyperedges. Default is unsigned int.
hyNode_index_tThe index type for hypernodes. Default is hyEdge_index_t.
pt_index_tThe index type for points. Default is hyNode_index_t.
Parameters
filenameName of the .geo file to be read.
Return values
domain_infoTopological and geometrical information of hypergraph.
Authors
Guido Kanschat, Heidelberg University, 2020.
Andreas Rupp, Heidelberg University, 2020.
Here is the call graph for this function:

◆ read_domain_geo()

template<unsigned int hyEdge_dim, unsigned int space_dim, template< typename... > typename vectorT = std::vector, typename pointT = Point<space_dim, float>, typename hyEdge_index_t = unsigned int, typename hyNode_index_t = hyEdge_index_t, typename pt_index_t = hyNode_index_t>
DomainInfo<hyEdge_dim, space_dim, vectorT, pointT, hyEdge_index_t, hyNode_index_t, pt_index_t> read_domain_geo ( const std::string &  filename)

Function to read geo file.


Function to read self-defined .geo files are supported. These files are supposed to comprise hypergraphs consisting of hypercuboids only. Other versions have not yet been implemented.

Template Parameters
hyEdge_dimThe local dimension of a hyperedge.
space_dimThe dimension of the surrounding space.
vectorTThe typename of a large vector holding e.g. all points.
pointTThe typename of a point.
hyEdge_index_tThe index type for hyperedges. Default is unsigned int.
hyNode_index_tThe index type for hypernodes. Default is hyEdge_index_t.
pt_index_tThe index type for points. Default is hyNode_index_t.
Parameters
filenameName of the .geo file to be read.
Return values
domain_infoTopological and geometrical information of hypergraph.
Authors
Guido Kanschat, Heidelberg University, 2020.
Andreas Rupp, Heidelberg University, 2020.