GRIDMAN
grid managment library
Functions/Subroutines
tria.f File Reference

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...
 

Detailed Description

Converters of GRIDMAN_GRID object to and from EIRENE triangular grid.

Definition in file tria.f.

Function/Subroutine Documentation

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.

Parameters
gridResulting grid object
[in]nrknotNumber of nodes
[in]ntriiNumber of triangles
[in]xytrianCoordinates of the nodes

XYTRIAN(1,:) is the X coordinate, XYTRIAN(2,:) is the Y coordinate

Parameters
[in]neckeIndices of nodes for each triangle
[in]nchbarIndices of neigbour cell for each triangle
[in]nseiteIndices of sides of neighbours for each triangle
[in]itriTags from fort.35

ITRI(1,:) and ITRI(2,:) are IXTRI and IYTRI. ITRI(3:5,:) are tags of each side of the triange.

Parameters
[out]ierrError 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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
grid2D grid object to be converted into triangular grid
[out]xytrianCoordinates of the nodes
[out]neckeIndices of nodes for each triangle
[out]nchbarIndices of neigbour cell for each triangle
[out]nseiteIndices of sides of neighbours for each triangle
[out]itriTags from fort.35
[out]ierrError 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().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Parameters
gridResulting grid
fnamesStrungs with names of three input files

If FNAMES has zero length than standard names are used: fort.33, fort.34, fort.35

Parameters
[out]ierrError code

Definition at line 558 of file tria.f.

References gridman::gridman_dp, gridman::gridman_sp, gridman_tria2grid(), and gridman_tria_read_array().

Here is the call graph for this function:

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

Parameters
gridGrid object to be stored
fnamesStrungs with names of three input files

If FNAMES has zero length than standard names are used: fort.33, fort.34, fort.35

Parameters
[out]ierrError code

Definition at line 613 of file tria.f.

References gridman::gridman_dp, gridman_grid2tria(), gridman::gridman_sp, and gridman_tria_write_array().

Here is the call graph for this function: