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

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

Detailed Description

Read/write coordinates in simple template file (DG template)

Definition in file template.f.

Function/Subroutine Documentation

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

Parameters
[in]fnameString containing the name of input file
[out]mNumber of polygons
nNumber of vertices in each polygon, N(M)
[out]lTotal number of points, L=SUM(N)
xX coordinates of the vertices, X(L)
yY coordinates of the vertices, Y(L)
[out]ierrError 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().

Here is the caller graph for this function:

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

Parameters
[in]fnameString containing the name of input file
[in]mNumber of polygons
[in]nNumber of vertices in each polygon
[in]lTotal number of points, must be L=SUM(N)
[in]xX coordinates of the vertices
[in]yY coordinates of the vertices
[out]ierrError 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().

Here is the caller graph for this function: