rsvs3D
0.0.0
Codes for the c++ implementation of the 3D RSVS
|
Interface between the RSVS project and tetgen. More...
#include <algorithm>
#include <array>
#include <string>
#include <vector>
#include "mesh.hpp"
#include "tetgen.h"
Go to the source code of this file.
Classes | |
class | tetgen::io_safe |
Class for memory safe interface with tetgen.h. More... | |
class | tetgen::apiparam |
Typedefs | |
typedef std::array< std::array< double, 3 >, 2 > | tetgen::dombounds |
Type defining domain boundaries. More... | |
Functions | |
std::vector< int > | tetgen::RSVSVoronoiMesh (const std::vector< double > &vecPts, mesh &vosMesh, mesh &snakMesh, tetgen::apiparam &inparam) |
Genrates Snaking and VOS RSVS meshes from the voronoi diagram of a set of points. More... | |
void | tetgen::SnakeToSU2 (const snake &snakein, const std::string &fileName, tetgen::apiparam &inparam) |
Genrates an SU2 mesh file from a snake. More... | |
tetgenmesh * | tetgen::rsvstetrahedralize (const char *switches, tetgen::io_safe *in, tetgen::io_safe *out, tetgen::io_safe *addin=NULL, tetgen::io_safe *bgmin=NULL) |
void | tetgen::input::POINTGRIDS (const mesh &meshdomain, tetgen::io_safe &tetin, const tetgen::apiparam &tetgenParam, bool generateVoroBound=false) |
void | tetgen::input::RSVSGRIDS (const mesh &meshdomain, tetgen::io_safe &tetin, const tetgen::apiparam &tetgenParam) |
void | tetgen::input::RSVSGRIDS (const mesh &meshdomain, const mesh &meshboundary, tetgen::io_safe &tetin, const tetgen::apiparam &tetgenParam) |
void | tetgen::input::RSVS2CFD (const snake &snakein, tetgen::io_safe &tetin, const tetgen::apiparam &tetgenParam) |
mesh | tetgen::output::VORO2MESH (tetgen::io_safe &tetout) |
void | tetgen::output::SU2 (const char *fileName, const tetgenio &tetout) |
dombounds | tetgen::output::GetBoundBox (io_safe &tetout) |
mesh | tetgen::output::TET2MESH (tetgen::io_safe &tetout) |
Translates a tetgen output to the RSVS native mesh format. More... | |
void | tetgen::internal::CloseVoronoiMesh (mesh &meshout, tetgen::io_safe &tetout, std::vector< int > &rayEdges, int DEINCR, tetgen::dombounds boundBox) |
template<class T , class V > | |
double | tetgen::internal::ProjectRay (int count, const tetgen::dombounds &boundBox, const T &dir, const V &orig, double minDist=0.0) |
Project voronoi diagram rays to the bounding Box. More... | |
void | tetgen::internal::MeshData2Tetgenio (const mesh &meshgeom, tetgen::io_safe &tetin, int facetOffset, int pointOffset, int pointMarker, const std::vector< double > &pointMtrList, const std::vector< double > &facetConstr, int facetConstrOffset) |
void | tetgen::internal::Mesh2Tetgenio (const mesh &meshgeom, const mesh &meshdomain, tetgen::io_safe &tetin, int numHoles) |
void | tetgen::internal::Mesh2TetgenioPoints (const mesh &meshgeom, const mesh &meshdomain, tetgen::io_safe &tetin) |
void | tetgen::internal::PointCurvature2Metric (std::vector< double > &vertCurvature, const tetgen::apiparam &inparam) |
void | tetgen::voronoi::GenerateInternalPoints (const mesh &meshin, int nLevels, tetgen::io_safe &tetinPts) |
Generate points inside volume cells of a mesh. More... | |
std::vector< bool > | tetgen::voronoi::Points2VoroAndTetmesh (const std::vector< double > &vecPts, mesh &voroMesh, mesh &tetMesh, const tetgen::apiparam &inparam) |
std::vector< bool > | tetgen::voronoi::BoundaryFacesFromPoints (const mesh &meshin, const std::vector< int > &boundaryPts) |
void | tetgen::test::LoadData (mesh &snakeMesh, mesh &voluMesh, snake &snakein, mesh &triMesh) |
int | tetgen::test::api () |
int | tetgen::test::call () |
int | tetgen::test::CFD () |
int | tetgen::test::RSVSVORO () |
int | tetgen::test::RSVSVORO_Contain () |
int | tetgen::test::RSVSVOROFunc (const std::vector< double > &vecPts={}, double distanceTol=0.26, const char *tecoutStr="../TESTOUT/rsvs_voro.plt") |
int | tetgen::test::RSVSVOROFunc_contain (int nPts=0, double distanceTol=0.26, const char *tecoutStr="../TESTOUT/rsvs_voro_contain.plt") |
int | Test_RSVSvoro_init () |
Interface between the RSVS project and tetgen.
Definition in file tetgenrsvs.hpp.
typedef std::array<std::array<double, 3>, 2> tetgen::dombounds |
Type defining domain boundaries.
Simple short hand for a matrix of 2*3 doubles.
Definition at line 40 of file tetgenrsvs.hpp.
void tetgen::voronoi::GenerateInternalPoints | ( | const mesh & | meshin, |
int | nLevels, | ||
tetgen::io_safe & | tetinPts | ||
) |
Generate points inside volume cells of a mesh.
[in] | meshin | The input mesh |
[in] | nLevels | The number of layers of points in each cell. |
tetinPts | A tetgen io object which can be passed directly to tetrahedralize ast he fourth input. |
Definition at line 1176 of file tetgenrsvs.cpp.
double tetgen::internal::ProjectRay | ( | int | count, |
const tetgen::dombounds & | boundBox, | ||
const T & | dir, | ||
const V & | orig, | ||
double | minDist = 0.0 |
||
) |
Project voronoi diagram rays to the bounding Box.
[in] | count | number of coordinates |
[in] | boundBox | The bounds of the domain (array<array<double,3>,2>) |
[in] | dir | vector with direction (pointing in) |
[in] | orig | The origin of the ray |
[in] | minDist | The minimum allowable stretch distance |
T | type of dir : an iterable of size count |
V | type of orig : an iterable of size count |
Definition at line 252 of file tetgenrsvs.hpp.
std::vector< int > tetgen::RSVSVoronoiMesh | ( | const std::vector< double > & | vecPts, |
mesh & | vosMesh, | ||
mesh & | snakMesh, | ||
tetgen::apiparam & | inparam | ||
) |
Genrates Snaking and VOS RSVS meshes from the voronoi diagram of a set of points.
[in] | vecPts | a vector of input points (3 coordinate) followed by a target volume fraction. Vecpts is a 1D vector with 4 values per point. |
vosMesh | The vos mesh | |
snakMesh | The snaking mesh | |
inparam | The tetgen interface parameter at input. |
Definition at line 876 of file tetgenrsvs.cpp.
void tetgen::SnakeToSU2 | ( | const snake & | snakein, |
const std::string & | fileName, | ||
tetgen::apiparam & | inparam | ||
) |
Genrates an SU2 mesh file from a snake.
Uses tetgen to generate a volume mesh around a snake and outputs it to the SU2 format.
[in] | snakein | A snake which needs to be meshed |
[in] | fileName | The file name |
inparam | tetgen interface parameter object. Used to define boundary growth rate and element sizes. |
Definition at line 1017 of file tetgenrsvs.cpp.
void tetgen::output::SU2 | ( | const char * | fileName, |
const tetgenio & | tetout | ||
) |
Ouputs a tetgen io object to an SU2 mesh file. File format: https://su2code.github.io/docs/Mesh-File/ @param fileName is a string with the path to the target mesh
fileName
tetout | is tetgenio object (safe) |
invalid_argument | if fileName cannot be opened. |
Definition at line 413 of file tetgenrsvs.cpp.
mesh tetgen::output::TET2MESH | ( | tetgen::io_safe & | tetout | ) |
Translates a tetgen output to the RSVS native mesh format.
tetout | the tetgenio object containing a mesh to be translated to the native RSVS mesh format. |
invalid_argument | if tetout was generated without passing the neighbour flag to tetgen (-nn ) |
Definition at line 1043 of file tetgenrsvs.cpp.