GRIDMAN
grid managment library
|
Converters of GRIDMAN_GRID object to and from EIRENE triangular grid. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gridman_tria2grid (GRID, NRKNOT, NTRII, XYTRIAN, NECKE, NCHBAR, NSEITE, ITRI, IERR) |
Convert EIRENE triangular grid into GRIDMAN_GRID grid object (type=GRID2D) More... | |
subroutine | gridman_grid2tria (GRID, XYTRIAN, NECKE, NCHBAR, NSEITE, ITRI, IERR) |
Convert GRIDMAN_GRID grid object into EIRENE triangular grid. More... | |
subroutine | gridman_tria_read_grid (GRID, FNAMES, IERR) |
Read EIRENE triangular grid from fort.33-35, returns GRID object. More... | |
subroutine | gridman_tria_write_grid (GRID, FNAMES, IERR) |
Write EIRENE triangular grid - defined as GRID object - into fort.33-35. More... | |
Converters of GRIDMAN_GRID object to and from EIRENE triangular grid.
Definition in file tria.f.
subroutine gridman_tria2grid | ( | type(gridman_grid) | GRID, |
integer(gridman_sp), intent(in) | NRKNOT, | ||
integer(gridman_sp), intent(in) | NTRII, | ||
real(gridman_dp), dimension(2,nrknot), intent(in) | XYTRIAN, | ||
integer(gridman_sp), dimension(3,ntrii), intent(in) | NECKE, | ||
integer(gridman_sp), dimension(3,ntrii), intent(in) | NCHBAR, | ||
integer(gridman_sp), dimension(3,ntrii), intent(in) | NSEITE, | ||
integer(gridman_sp), dimension(5,ntrii), intent(in) | ITRI, | ||
integer, intent(out) | IERR | ||
) |
Convert EIRENE triangular grid into GRIDMAN_GRID grid object (type=GRID2D)
WARNING: if the object GRID already exists it will be overwritten!
Correct XYTRIAN, NECKE, NCHBAR, NSEITE, ITRI, are produced by GRIDMAN_TRIA_READ
WARNING: if different ITRI(3:5) are defined for the same edge in two different triangles, then one of the two values (the last to appear in the list) is taken. Only non-zero edge tags are stored.
grid | Resulting grid object | |
[in] | nrknot | Number of nodes |
[in] | ntrii | Number of triangles |
[in] | xytrian | Coordinates of the nodes |
XYTRIAN(1,:) is the X coordinate, XYTRIAN(2,:) is the Y coordinate
[in] | necke | Indices of nodes for each triangle |
[in] | nchbar | Indices of neigbour cell for each triangle |
[in] | nseite | Indices of sides of neighbours for each triangle |
[in] | itri | Tags from fort.35 |
ITRI(1,:) and ITRI(2,:) are IXTRI and IYTRI. ITRI(3:5,:) are tags of each side of the triange.
[out] | ierr | Error code |
Definition at line 38 of file tria.f.
References gridman::gridman_dp, gridman_grid2d_check(), gridman_grid_allocate(), gridman_grid_deallocate(), gridman_index_allocate(), gridman_index_deallocate(), and gridman::gridman_sp.
Referenced by gridman_tria_read_grid().
subroutine gridman_grid2tria | ( | type(gridman_grid) | GRID, |
real(gridman_dp), dimension(2,grid%npoints), intent(out) | XYTRIAN, | ||
integer(gridman_sp), dimension(3,grid%ncells), intent(out) | NECKE, | ||
integer(gridman_sp), dimension(3,grid%ncells), intent(out) | NCHBAR, | ||
integer(gridman_sp), dimension(3,grid%ncells), intent(out) | NSEITE, | ||
integer(gridman_sp), dimension(5,grid%ncells), intent(out) | ITRI, | ||
integer, intent(out) | IERR | ||
) |
Convert GRIDMAN_GRID grid object into EIRENE triangular grid.
All grid cells must be triangles - this subroutine does not do triangulation. For triangulation see GRIDMAN_GRID2D_TRIANG
XYTRIAN, NECKE, NCHBAR, NSEITE, ITRI are produced in exactly same format as by GRIDMAN_TRIA_READ. Arrays have to be allocated in advance.
ITRI is taken from the 1st cell and edge indices. ITRI is not changed if this information is missing.
grid | 2D grid object to be converted into triangular grid | |
[out] | xytrian | Coordinates of the nodes |
[out] | necke | Indices of nodes for each triangle |
[out] | nchbar | Indices of neigbour cell for each triangle |
[out] | nseite | Indices of sides of neighbours for each triangle |
[out] | itri | Tags from fort.35 |
[out] | ierr | Error code |
Definition at line 310 of file tria.f.
References gridman_grid2d_chains(), gridman_grid2d_check(), gridman_grid_cells(), and gridman_indlist_deallocate().
Referenced by gridman_tria_write_grid().
subroutine gridman_tria_read_grid | ( | type(gridman_grid) | GRID, |
character(*), dimension(3) | FNAMES, | ||
integer, intent(out) | IERR | ||
) |
Read EIRENE triangular grid from fort.33-35, returns GRID object.
WARNING: if GRID object elready exists it will be overwritten, array ITRI will be re-allocated as well
This subroutine is a shell for GRIDMAN_TRIA_READ_ARRAY
GRIDMAN_TRIA_READ_ARRAY and GRIDMAN_TRIA_READ_GRID are combined in the interface GRIDMAN_TRIA_READ
grid | Resulting grid |
fnames | Strungs with names of three input files |
If FNAMES has zero length than standard names are used: fort.33, fort.34, fort.35
[out] | ierr | Error code |
Definition at line 558 of file tria.f.
References gridman::gridman_dp, gridman::gridman_sp, gridman_tria2grid(), and gridman_tria_read_array().
subroutine gridman_tria_write_grid | ( | type(gridman_grid) | GRID, |
character(*), dimension(3) | FNAMES, | ||
integer, intent(out) | IERR | ||
) |
Write EIRENE triangular grid - defined as GRID object - into fort.33-35.
Output of GRIDMAN_TRIA_READ is input of GRIDMAN_TRIA_WRITE
GRIDMAN_TRIA_WRITE_ARRAY and GRIDMAN_TRIA_WRITE_GRID are combined in the interface GRIDMAN_TRIA_WRITE
grid | Grid object to be stored |
fnames | Strungs with names of three input files |
If FNAMES has zero length than standard names are used: fort.33, fort.34, fort.35
[out] | ierr | Error code |
Definition at line 613 of file tria.f.
References gridman::gridman_dp, gridman_grid2tria(), gridman::gridman_sp, and gridman_tria_write_array().