export NiHu mesh from OFF format
More...
#include "../core/mesh.hpp"
#include "../library/lib_element.hpp"
#include "../util/type2tag.hpp"
#include <string>
#include <fstream>
#include <stdexcept>
Go to the source code of this file.
|
typedef Eigen::Matrix< unsigned, Eigen::Dynamic, Eigen::Dynamic > | NiHu::uMatrix |
|
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > | NiHu::dMatrix |
|
|
template<class... Tags> |
unsigned | NiHu::nvert2elem_id (unsigned nvert, Tags...tags) |
| convert number of vertices to element id More...
|
|
template<class... Tags> |
void | NiHu::read_off_data (std::istream &is, dMatrix &nodes, uMatrix &elements, Tags...tags) |
|
template<class... Tags> |
void | NiHu::read_off_data (std::string const &fname, dMatrix &nodes, uMatrix &elements, Tags...tags) |
|
template<class... Tags> |
mesh< tmp::vector< typename tag2type< Tags >::type... > > | NiHu::read_off_mesh (std::istream &is, Tags...tags) |
| Read mesh from OFF format. More...
|
|
template<class... Tags> |
mesh< tmp::vector< typename tag2type< Tags >::type... > > | NiHu::read_off_mesh (std::string const &fname, Tags...tags) |
| Read mesh from OFF format. More...
|
|
export NiHu mesh from OFF format
Definition in file read_off_mesh.hpp.
◆ nvert2elem_id()
template<class... Tags>
unsigned NiHu::nvert2elem_id |
( |
unsigned |
nvert, |
|
|
Tags... |
tags |
|
) |
| |
convert number of vertices to element id
- Template Parameters
-
Tags | element tags to choose from |
- Parameters
-
[in] | nvert | the number of element vertices |
| tags | the possible element tags |
- Returns
- the first element id from the vector Tags... that matches the number of vertices
Definition at line 73 of file read_off_mesh.hpp.
◆ read_off_mesh() [1/2]
template<class... Tags>
mesh<tmp::vector<typename tag2type<Tags>::type...> > NiHu::read_off_mesh |
( |
std::istream & |
is, |
|
|
Tags... |
tags |
|
) |
| |
Read mesh from OFF format.
- Template Parameters
-
Tags | the element tags to import |
- Parameters
-
[in] | fname | the file name |
[in] | is | the input stream |
- Returns
- the imported mesh
Definition at line 132 of file read_off_mesh.hpp.
◆ read_off_mesh() [2/2]
template<class... Tags>
mesh<tmp::vector<typename tag2type<Tags>::type...> > NiHu::read_off_mesh |
( |
std::string const & |
fname, |
|
|
Tags... |
tags |
|
) |
| |
Read mesh from OFF format.
- Template Parameters
-
Tags | the element tags to import |
- Parameters
-
[in] | fname | the file name |
[in] | tags | the element tag types |
- Returns
- the imported mesh
Definition at line 153 of file read_off_mesh.hpp.