GRIDMAN
grid managment library
|
Read/write coordinates in simple template file (DG template) More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gridman_template_read_array (FNAME, M, N, L, X, Y, IERR) |
Read planar coordinates from a simple template file (DG template) More... | |
subroutine | gridman_template_write_array (FNAME, M, N, L, X, Y, IERR) |
Write coordinates into simple template file (DG template) More... | |
Read/write coordinates in simple template file (DG template)
Definition in file template.f.
subroutine gridman_template_read_array | ( | character(*), intent(in) | FNAME, |
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 | ||
) |
Read planar coordinates from a simple template file (DG template)
Simple template file defines geometry as a set of plygons (closed or open). See DG manual, I.16.1. Each lines defines a pair of coordinates (in Millimeter!), polygons are separated by empty lines:
X1_1 Y1_1 X2_2 Y2_2 X1_3 Y1_3 X2_4 Y2_4 X2_5 Y2_5 ..... X1_L-1 Y1_L-1 X1_L Y1_L end of file
Lines containing '>>' are comments, they are ignored
WARNING: arrays N, X, Y must NOT be allcoated - they are allocated inside the subroutine. Arrays which already exist will be re-allocated
GRIDMAN_TEMPLATE_READ_ARRAY AND GRIDMAN_TEMPLATE_READ_GRID are combined in the interface GRIDMAN_TEMPLATE_READ
[in] | fname | String containing the name of input file |
[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 54 of file template.f.
References gridman::gridman_dbg, gridman::gridman_dp, gridman::gridman_sp, and gridman::gridman_unit.
Referenced by gridman_template_read_grid().
subroutine gridman_template_write_array | ( | character(*), intent(in) | FNAME, |
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 | ||
) |
Write coordinates into simple template file (DG template)
See GRIDMAN_TEMPLATE_READ_ARRAY for description of the format
GRIDMAN_TEMPLATE_WRITE_ARRAY and GRIDMAN_TEMPLATE_WRITE_GRID are combined in the interface GRIDMAN_TEMPLATE_WRITE
[in] | fname | String containing the name of input file |
[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 243 of file template.f.
References gridman::gridman_dbg, gridman::gridman_dp, gridman::gridman_sp, and gridman::gridman_unit.
Referenced by gridman_template_write_grid().