|
rsvs3D
0.0.0
Codes for the c++ implementation of the 3D RSVS
|
Tools for the mathematical processing of meshes. More...
Go to the source code of this file.
Functions | |
| void | FlattenBoundaryFaces (mesh &meshin) |
| void | TriangulateAllFaces (mesh &meshin) |
| std::vector< int > | FindHolesInSnake (const snake &snakein, const HashedVector< int, int > &uncertainVert) |
| void | PrepareSnakeForCFD (const snake &snakein, double distanceTol, mesh &meshgeom, std::vector< double > &holeCoords) |
| Prepares the snake to be used for CFD, removes duplicate points and triangulates it. More... | |
| HashedVector< int, int > | GroupCloseSnaxels (const snake &snakein, double distTol) |
| void | TestVertClose (int vertIndIn, std::vector< bool > &isSnaxDone, const mesh &meshin, double distTol, std::vector< int > &sameEdges) |
| HashedVector< int, int > | GroupCloseVertices (const mesh &meshin, double distTol) |
| int | FindVertexHole (int vertInd, const mesh &meshin, const std::vector< bool > &vertIn, const HashedVector< int, int > &uncertainVert, std::vector< bool > &vertExplored) |
| double | DomInter (double x, double y1, double y2) |
| mesh | BuildDomain (const std::array< double, 3 > &lowerB, const std::array< double, 3 > &upperB, double tolInner=0.0) |
| mesh | BuildCutCellDomain (const std::array< double, 3 > &outerLowerB, const std::array< double, 3 > &outerUpperB, const std::array< double, 3 > &innerLowerB, const std::array< double, 3 > &innerUpperB, int nSteps, std::vector< int > &vertPerSubDomain) |
| Builds a series of domains with different edge properties controlling the interpolation of the metric. More... | |
| double | PseudoSurfaceAngle (const mesh &meshin, const std::array< int, 2 > &surfInds) |
| Calculates the pseudo surface angle. More... | |
| std::vector< double > | CalculateEdgeCurvature (const mesh &meshin) |
| Calculates the angles between the surfaces connected at an edge. More... | |
| std::vector< double > | CalculateVertexCurvature (const mesh &meshin, int smoothingSteps) |
| Calculates the vertex curvature. More... | |
| std::vector< double > | CalculateVertexMinEdgeLength (const mesh &meshin) |
| Calculates the vertex minimum edge length. More... | |
| std::vector< double > | CalculateVertexMaxEdgeLength (const mesh &meshin) |
| Calculates the vertex maximum edge length. More... | |
| std::vector< double > | CalculateVertexMeanEdgeLength (const mesh &meshin) |
| Calculates the vertex mean edge length. More... | |
| std::vector< double > | CalculateEdgeLengths (const mesh &meshin) |
| Calculates the edge lengths. More... | |
| std::vector< double > | CoordInVolume (const mesh &meshin) |
| Generate a vector of coordinates of points probably inside volumes. More... | |
| std::vector< double > | VolumeCentroids (const mesh &meshin) |
| Generate a vector of coordinates of points at the volume pseudo centroid. More... | |
| std::vector< double > | VolumeInternalLayers (const mesh &meshin, int nLayers) |
| Returns points on edges between volume pseudo centroid and vertices. More... | |
| std::vector< double > | SurfaceCentroids (const mesh &meshin) |
| Generate a vector of coordinates of points at the surfaces pseudo centroid. More... | |
| std::vector< double > | SurfaceInternalLayers (const mesh &meshin, int nLayers) |
| Returns points on edges between surface pseudo centroid and vertices. More... | |
| double | CotanLaplacianWeight (const std::vector< double > ¢re, const std::vector< double > &p_im1, const std::vector< double > &p_i, const std::vector< double > &p_ip1, coordvec &temp1, coordvec &temp2) |
| int | VertexLaplacianVector (const mesh &meshin, const vert *vertsmooth, coordvec &lapVec, bool isOrdered=false) |
| coordvec | VertexLaplacianVector (const mesh &meshin, int vertIndex) |
| std::array< double, 2 > | IntersectLineSphere (const coordvec &lineVec, const coordvec &offset, double sphereRadius) |
| Calculates the parametric position along a line at which it intersects a sphere. More... | |
| std::array< double, 2 > | IntersectLineSphere (const coordvec &lineVec, const std::vector< double > &linePoint, const coordvec &sphereCentre, double sphereRadius) |
| std::vector< double > | MeshUnitNormals (const mesh &meshin) |
| std::vector< double > | MeshLaplacians (const mesh &meshin) |
Tools for the mathematical processing of meshes.
Definition in file meshprocessing.hpp.
| mesh BuildCutCellDomain | ( | const std::array< double, 3 > & | outerLowerB, |
| const std::array< double, 3 > & | outerUpperB, | ||
| const std::array< double, 3 > & | innerLowerB, | ||
| const std::array< double, 3 > & | innerUpperB, | ||
| int | nSteps, | ||
| std::vector< int > & | vertPerSubDomain | ||
| ) |
Builds a series of domains with different edge properties controlling the interpolation of the metric.
| [in] | outerLowerB | The outer lower b |
| [in] | outerUpperB | The outer upper b |
| [in] | innerLowerB | The inner lower b |
| [in] | innerUpperB | The inner upper b |
| [in] | nSteps | The steps |
| vertPerSubDomain | The vertical per sub domain |
These also serve to avoid having a badly conditioned initialtriangulation with very small edges.
`nSteps` is the number of total domains.
0 will return an empty mesh, 1 will return a mesh of the inner bound
2 will return inner and outer bounds,
{
{DomInter(x, innerLowerB[0], outerLowerB[0]),
DomInter(x, innerUpperB[0], outerUpperB[0])},
{DomInter(x, innerLowerB[1], outerLowerB[1]),
DomInter(x, innerUpperB[1], outerUpperB[1])},
{DomInter(x, innerLowerB[2], outerLowerB[2]),
DomInter(x, innerUpperB[2], outerUpperB[2])}
}
meshtemp = BuildDomain(
{DomInter(x, innerLowerB[0], outerLowerB[0]),
DomInter(x, innerLowerB[1], outerLowerB[1]),
DomInter(x, innerLowerB[2], outerLowerB[2])},
{DomInter(x, innerUpperB[0], outerUpperB[0]),
DomInter(x, innerUpperB[1], outerUpperB[1]),
DomInter(x, innerUpperB[2], outerUpperB[2])}
);
Definition at line 512 of file meshprocessing.cpp.
| std::vector<double> CalculateEdgeCurvature | ( | const mesh & | meshin | ) |
Calculates the angles between the surfaces connected at an edge.
To work the faces need have a common orientation
| [in] | meshin | The input mesh |
Definition at line 612 of file meshprocessing.cpp.
| std::vector<double> CalculateEdgeLengths | ( | const mesh & | meshin | ) |
Calculates the edge lengths.
| [in] | meshin | The meshin |
Definition at line 773 of file meshprocessing.cpp.
| std::vector<double> CalculateVertexCurvature | ( | const mesh & | meshin, |
| int | smoothingSteps | ||
| ) |
Calculates the vertex curvature.
| [in] | meshin | The input mesh |
| [in] | smoothingSteps | The number of metric smoothing steps |
Definition at line 641 of file meshprocessing.cpp.
| std::vector<double> CalculateVertexMaxEdgeLength | ( | const mesh & | meshin | ) |
Calculates the vertex maximum edge length.
| [in] | meshin | The meshin |
Definition at line 718 of file meshprocessing.cpp.
| std::vector<double> CalculateVertexMeanEdgeLength | ( | const mesh & | meshin | ) |
Calculates the vertex mean edge length.
| [in] | meshin | The meshin |
Definition at line 745 of file meshprocessing.cpp.
| std::vector<double> CalculateVertexMinEdgeLength | ( | const mesh & | meshin | ) |
Calculates the vertex minimum edge length.
| [in] | meshin | The meshin |
Definition at line 691 of file meshprocessing.cpp.
| std::vector<double> CoordInVolume | ( | const mesh & | meshin | ) |
Generate a vector of coordinates of points probably inside volumes.
| [in] | meshin | The input mesh |
Definition at line 794 of file meshprocessing.cpp.
| std::array<double, 2> IntersectLineSphere | ( | const coordvec & | lineVec, |
| const coordvec & | offset, | ||
| double | sphereRadius | ||
| ) |
Calculates the parametric position along a line at which it intersects a sphere.
The return value of this function when multiplied by the line direction and added to the reference point gives the coordinate of the intersection points.
| [in] | lineVec | The vector direction followed by the line |
| [in] | offset | The vector going from the sphere centre to a point on the line. |
| [in] | sphereRadius | The radius of the sphere. |
Definition at line 1070 of file meshprocessing.cpp.
| void PrepareSnakeForCFD | ( | const snake & | snakein, |
| double | distanceTol, | ||
| mesh & | meshgeom, | ||
| std::vector< double > & | holeCoords | ||
| ) |
Prepares the snake to be used for CFD, removes duplicate points and triangulates it.
| [in] | snakein | The snakein |
| [in] | distanceTol | The distance tolerance |
| meshgeom | The meshgeom | |
| holeCoords | The hole coordinates |
Definition at line 191 of file meshprocessing.cpp.
| double PseudoSurfaceAngle | ( | const mesh & | meshin, |
| const std::array< int, 2 > & | surfInds | ||
| ) |
Calculates the pseudo surface angle.
This pseudo angle is the dot product between the normal, i
| [in] | meshin | The input mesh |
| [in] | surfInds | The surface indices |
Definition at line 567 of file meshprocessing.cpp.
| std::vector<double> SurfaceCentroids | ( | const mesh & | meshin | ) |
Generate a vector of coordinates of points at the surfaces pseudo centroid.
| [in] | meshin | The input mesh |
Definition at line 908 of file meshprocessing.cpp.
| std::vector<double> SurfaceInternalLayers | ( | const mesh & | meshin, |
| int | nLayers | ||
| ) |
Returns points on edges between surface pseudo centroid and vertices.
| [in] | meshin | The input mesh to process |
| [in] | nLayers | The number of layers of points (0: only the centre, 1: layer surroundin the centre) |
| std::invalid_argument | if the number of layers is below 0. |
Definition at line 940 of file meshprocessing.cpp.
| std::vector<double> VolumeCentroids | ( | const mesh & | meshin | ) |
Generate a vector of coordinates of points at the volume pseudo centroid.
| [in] | meshin | The input mesh |
Definition at line 837 of file meshprocessing.cpp.
| std::vector<double> VolumeInternalLayers | ( | const mesh & | meshin, |
| int | nLayers | ||
| ) |
Returns points on edges between volume pseudo centroid and vertices.
| [in] | meshin | The input mesh to process |
| [in] | nLayers | The number of layers of points (0: only the centre, 1: layer surroundin the centre) |
| std::invalid_argument | if the number of layers is below 0. |
Definition at line 869 of file meshprocessing.cpp.