GRIDMAN
grid managment library
|
Converters of GRIDMAN_GRID object to and from simple template (DG template) More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gridman_template2grid (GRID, M, N, L, X, Y, IERR) |
Convert data read from a file in simple template format (DG template) into GRIDMAN_GRID object. More... | |
subroutine | gridman_grid2template (GRID, M, N, L, X, Y, IERR) |
Convert GRIDMAN_GRID object into arrays which can be stored in simple template format (DG template) More... | |
subroutine | gridman_template_read_grid (GRID, FNAME, IERR) |
Read from a simple template file (DG template) into GRIDMAN_GRID object. More... | |
subroutine | gridman_template_write_grid (GRID, FNAME, IERR) |
Write GRIDMAN_GRID object in a simple template format (DG template) More... | |
Converters of GRIDMAN_GRID object to and from simple template (DG template)
Definition in file template.f.
subroutine gridman_template2grid | ( | type(gridman_grid) | GRID, |
integer(gridman_sp), intent(in) | M, | ||
integer(gridman_sp), dimension(m), intent(in) | N, | ||
integer(gridman_sp), intent(in) | L, | ||
real(gridman_dp), dimension(l), intent(in) | X, | ||
real(gridman_dp), dimension(l), intent(in) | Y, | ||
integer, intent(out) | IERR | ||
) |
Convert data read from a file in simple template format (DG template) into GRIDMAN_GRID object.
WARNING: object GRID will be overwritten if already exists
The code tries to figure out if the polygone is closed or not. For closed polygones last point of the chain is moved to the first point. WARNING: single points are not taken into the grid object
Edge index EDGEINDEX(1) contains index of polygons for each edge
grid | Resulting grid object | |
[in] | m | Number of polygons |
[in] | n | Number of vertices in each polygon |
[in] | l | Total number of points, must be L=SUM(N) |
[in] | x | X coordinates of the vertices |
[in] | y | Y coordinates of the vertices |
[out] | ierr | Error code |
Definition at line 35 of file template.f.
References gridman::gridman_dp, gridman_grid2d_check(), gridman_grid_allocate(), gridman_grid_deallocate(), gridman_index_allocate(), and gridman::gridman_sp.
Referenced by gridman_template_read_grid().
subroutine gridman_grid2template | ( | type(gridman_grid) | GRID, |
integer(gridman_sp), intent(out) | M, | ||
integer(gridman_sp), dimension(:), allocatable | N, | ||
integer(gridman_sp), intent(out) | L, | ||
real(gridman_dp), dimension(:), allocatable | X, | ||
real(gridman_dp), dimension(:), allocatable | Y, | ||
integer, intent(out) | IERR | ||
) |
Convert GRIDMAN_GRID object into arrays which can be stored in simple template format (DG template)
WARNING: arrays N, X, Y must NOT be allcoated - they are allocated inside the subroutine. Arrays which already exist will be re-allocated
Each edge is stored as a separate polygon. This subroutine does not try to build chains of points
grid | Grid object to be converted | |
[out] | m | Number of polygons |
n | Number of vertices in each polygon, N(M) | |
[out] | l | Total number of points, L=SUM(N) |
x | X coordinates of the vertices, X(L) | |
y | Y coordinates of the vertices, Y(L) | |
[out] | ierr | Error code |
Definition at line 239 of file template.f.
References gridman::gridman_dp, gridman_grid2d_check(), and gridman::gridman_sp.
Referenced by gridman_template_write_grid().
subroutine gridman_template_read_grid | ( | type(gridman_grid) | GRID, |
character(*), intent(in) | FNAME, | ||
integer, intent(out) | IERR | ||
) |
Read from a simple template file (DG template) into GRIDMAN_GRID object.
WARNING: the GRID object will be overwritten if elready exists
This subroutine is a shell for GRIDMAN_TEMPLATE_READ_ARRAY
GRIDMAN_TEMPLATE_READ_ARRAY AND GRIDMAN_TEMPLATE_READ_GRID are combined in the interface GRIDMAN_TEMPLATE_READ
grid | Resulting grid object | |
[in] | fname | String containing the name of input file |
[out] | ierr | Error code |
Definition at line 335 of file template.f.
References gridman::gridman_dp, gridman::gridman_sp, gridman_template2grid(), and gridman_template_read_array().
subroutine gridman_template_write_grid | ( | type(gridman_grid) | GRID, |
character(*), intent(in) | FNAME, | ||
integer, intent(out) | IERR | ||
) |
Write GRIDMAN_GRID object in a simple template format (DG template)
This subroutine is a shell for GRIDMAN_TEMPLATE_WRITE_ARRAY, it uses GRIDMAN_GRID2TEMPLATE to convert grid into template
GRIDMAN_TEMPLATE_WRITE_ARRAY and GRIDMAN_TEMPLATE_WRITE_GRID are combined in the interface GRIDMAN_TEMPLATE_WRITE
grid | Grid object to be written | |
[in] | fname | String containing the name of input file |
[out] | ierr | Error code |
Definition at line 389 of file template.f.
References gridman::gridman_dp, gridman_grid2template(), gridman::gridman_sp, and gridman_template_write_array().