2D MESH CHECKER
CALL SEQUENCE
void tcheck_mesh2D (mesh, epsilon, status)
INPUT PARAMETERS
Tmesh2D *mesh;
Pfloat epsilon;
OUTPUT PARAMETERS
Pint *status;
ARGUMENTS
- mesh
- 2D mesh
- epsilon
- Threshold to compare two float values
- status
- Error status.
EFFECT
This utility function checks if a mesh is compliant to PHIGURE mesh
specifications. Rectangular, polar, sector, quadrangular and triangular meshes
may be checked with this function. This function reports check status and error
message(s) explaining error(s) encountered in the mesh. Error messages are
output to standard PHIGURE error message file (see topen_phigure)
If the mesh is not compliant status is 0, else 1.
epsilon is useful to compare two floating point values. Two floating
point values are equal if the absolute value of their difference is less than
epsilon.
This function does not check meshes with the following types:
- TNS_OF_TRIANGLES
- TNS_OF_QUADRANGLES
- TNS_MESH_NON_HOMO_2D
Following tests are performed:
- rectangular mesh : TRECTANGULAR_MESH
- num_x > 1 and num_y > 1
- x list is strictly increasing or decreasing
- y list is strictly increasing or decreasing
- quadrangular mesh : TQUADRANGULAR_MESH
- num_x > 1 and num_y > 1
- check that no element is self-crossing or overlaps with another one
- polar mesh : TPOLAR_MESH
- num_r > 1 and num_t > 1
- r list is strictly increasing
- t list is strictly increasing
- t[num_t-1] - t[0] < 2[pi]
- sector mesh :
TSECTOR_MESH
- num_r > 1 and num_t > 1
- r list is strictly increasing
- t list is strictly increasing
- t[num_t-1] - t[0] < 2[pi]
- triangular mesh : TTRIANGULAR_MESH
- edge out of bounds (i.e. triangle_edge[i][j] >= num_edges or <
0)
- triangle with identical edges
- edges beloging twice to the same triangle
- triangle number out of bounds (i.e. edge_owner[0/1][i] >=
num_triangles or < -1)
- vertex number out of bounds (i.e. edge_vertex [0/1][i] >=
num_vertices or < 0)
- check that two different triangles share up to one edge
- check that two different edges do not belong to the same triangle
- check that two different edges do not have same vertices
- check that no vertex is crossing another one.