GRIDMAN
grid managment library
|
Triangulation of 2D grid. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gridman_grid2d_triang (TRIA, GRID, IERR) |
Triangulation of 2D grid. More... | |
Triangulation of 2D grid.
Definition in file triang.f.
subroutine gridman_grid2d_triang | ( | type(gridman_grid) | TRIA, |
type(gridman_grid) | GRID, | ||
integer, intent(out) | IERR | ||
) |
Triangulation of 2D grid.
WARNING: if the object GRID already exist it will be overwritten! Same is true for mapping tables.
The algorithm works iteratively. On each iteration one new edge is added to the cells with number of vertices > 3. Iterations stop when all cells have only 3 vertices.
The edge is added in the following way. For each vertex a triangle is built by connecting its both neighbour vertices. Triangles are rejected for which:
For each triangle which is not rejected the smallest angle is calculated. Triangle with the largest smallest angle is finally accepted.
Condition 3 is required to avoid the following situation:
B Here the algorithm may choose triangle ABC / \ which leads to "flat" triangle ACD on the other side. / \ Condition S<0.51S_tot forces the algorithm to chose / \ triangle ABD or BDC which leaves "non flat" rest /___ ___\ of the cell A D C
tria | Resulting triangular grid | |
grid | Initial grid which is divided into triangles | |
[out] | ierr | Error code |
Definition at line 55 of file triang.f.
References gridman::gridman_dp, gridman_grid2d_chains(), gridman_grid2d_check(), gridman_grid_allocate(), gridman_grid_cells(), gridman_grid_check(), gridman_grid_take(), gridman_index_allocate(), gridman_index_copy(), gridman_indlist_allocate(), gridman_indlist_deallocate(), gridman_intersect2d(), gridman::gridman_sp, and gridman::gridman_unit.