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

Converter for B2 (CARRE, SONNET) grid into GRIDMAN_GRID object. More...

Go to the source code of this file.

Functions/Subroutines

subroutine gridman_carre2grid (GRID, LXB, LYB, NXB, NYB, NNCUT, NXCUT, NYCUT, NNISO, NXISO, NYISO, BR, BZ, LX, LY, NXL, NYL, IERR, LEIR)
 Convert B2 (CARRE, SONNET) grid into GRIDMAN_GRID grid object. More...
 
subroutine gridman_carre_read30_grid (GRID, FNAME, IERR, LEIR)
 Read B2 (CARRE, SONNET) grid from fort.30, return GRID object. More...
 
subroutine gridman_carre_readsonnet_grid (GRID, FNAME, IERR, LEIR)
 Read CARRE grid in SONNET format, return GRID object. More...
 

Detailed Description

Converter for B2 (CARRE, SONNET) grid into GRIDMAN_GRID object.

Definition in file carre.f.

Function/Subroutine Documentation

subroutine gridman_carre2grid ( type(gridman_grid)  GRID,
integer(gridman_sp), intent(in)  LXB,
integer(gridman_sp), intent(in)  LYB,
integer(gridman_sp), intent(in)  NXB,
integer(gridman_sp), intent(in)  NYB,
integer(gridman_sp), intent(in)  NNCUT,
integer(gridman_sp), dimension(nncut), intent(in)  NXCUT,
integer(gridman_sp), dimension(nncut), intent(in)  NYCUT,
integer(gridman_sp), intent(in)  NNISO,
integer(gridman_sp), dimension(nniso), intent(in)  NXISO,
integer(gridman_sp), dimension(nniso), intent(in)  NYISO,
real(gridman_dp), dimension(lxb:nxb,lyb:nyb,4)  BR,
real(gridman_dp), dimension(lxb:nxb,lyb:nyb,4)  BZ,
integer(gridman_sp), intent(in)  LX,
integer(gridman_sp), intent(in)  LY,
integer(gridman_sp), intent(in)  NXL,
integer(gridman_sp), intent(in)  NYL,
integer, intent(out)  IERR,
logical, optional  LEIR 
)

Convert B2 (CARRE, SONNET) grid into GRIDMAN_GRID grid object.

WARNING: the object GRID will be overwritten if already exists!

3rd index in BR, BZ is the index of corner

 Y  3-----2
 |  |     |       
 |  |     |      
 |  4-----1      
  ------------ X

This numbering of corners is used BR, BZ arrays produced by GRIDMAN_CARRE_READ30, GRIDMAN_CARRE_READSONNET

Arrays NXCUT,NYCUT,NXISO,NYISO describe cuts an isolated cells as returned by subroutine GRIDMAN_CARRE_READSONNET. In order to use the output of GRIDMAN_CARRE_READ30 this subroutine has one more entry:

   GRIDMAN_CARRE2GRID_FORT30(GRID,LX,LY,NXL,NYL,NNCUT,
                             NXCUT30,NYCUT30,
                             NNISO,NXISO30,NYISO30,BR,BZ,IERR)

In the resulting grid one cell index, and 3 edge indexes. Cell index show IX,IY indexes of the correcponding cell on the plasma (B2) grid. 1st edge index contains markers of the grid boundaries: -1 stands for South, -4 for North, -2 for West, -3 for East 2nd edge index is the indices of the poloidal edges:

    _________________ 
   |                 |
   |      o IX,IY  iedge -> IX,IY   
   |_________________|    

3rd edge index is the indices of the radial edges:

    __iedge -> IX,IY _ 
   |                  |
   |      o IX,IY     |
   |__________________|    
Parameters
gridResulting 2D grid object
[in]lxbFirst index in arrays BR, BZ for X-direction
[in]lybFirst index in arrays BR, BZ for Y-direction
[in]nxbLast index in arrays BR, BZ for X-direction
[in]nybLast index in arrays BR, BZ for Y-direction
[in]nncutNumber of cuts
[in]nnisoNumber of isolated surfaces
[in]nxcutX-indices of cuts (in GRIDMAN_CARRE_READSONNET format)
[in]nycutY-indices of cuts (in GRIDMAN_CARRE_READSONNET format)
[in]nxisoX-indices of isolated cells (in GRIDMAN_CARRE_READSONNET format)
[in]nyisoY-indices of isolated cells (in GRIDMAN_CARRE_READSONNET format)
brMajor radius (R) of four corners of each cell, BR(LXB:NXB,LYB:NYB,4)
bzVertical coordinate (Z) of four corners of each cell, BZ(LXB:NXB,LYB:NYB,4)
[in]lx1st index to be taken in arrays BR, BZ for X-direction
[in]ly1st index to be taken in arrays BR, BZ for Y-direction
[in]nxlLast index to be taken in arrays BR, BZ for X-direction
[in]nylLast index to be taken in arrays BR, BZ for Y-direction
[out]ierrError code
leirSwitch to produce cell index mapping in the sense of EIRENE

If .TRUE. then inices in the index mapping of cells are shifted in the presence if cuts in the way it is done in EIRENE

Definition at line 72 of file carre.f.

References gridman::gridman_dp, gridman_grid2d_check(), gridman_grid_allocate(), gridman_grid_copy(), gridman_grid_deallocate(), gridman_grid_eliminate_cells(), gridman_grid_remove_free_edges(), gridman_index_allocate(), gridman::gridman_sp, and gridman::gridman_tol.

Referenced by gridman_carre_readsonnet_grid().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine gridman_carre_read30_grid ( type(gridman_grid)  GRID,
character(*), intent(in)  FNAME,
integer, intent(out)  IERR,
logical, optional  LEIR 
)

Read B2 (CARRE, SONNET) grid from fort.30, return GRID object.

GRIDMAN_CARRE_READ30_GRID is a shell for GRIDMAN_CARRE_READ30_ARRAY

GRIDMAN_CARRE_READ30_ARRAY and GRIDMAN_CARRE_READ30_GRID are combined in the interface GRIDMAN_CARRE_READ30

Parameters
gridResulting grid object
[in]fnameString containing the name of input file
[out]ierrError code
leirSwitch to produce cell indexes (of the original plasma grid) in the sense of EIRENE

If .TRUE. then inices in the index mapping of cells are shifted in the presence if cuts in the way it is done in EIRENE

Definition at line 853 of file carre.f.

References gridman_carre_read30_array(), gridman::gridman_dp, gridman_grid_deallocate(), and gridman::gridman_sp.

Here is the call graph for this function:

subroutine gridman_carre_readsonnet_grid ( type(gridman_grid)  GRID,
character(*), intent(in)  FNAME,
integer, intent(out)  IERR,
logical, optional  LEIR 
)

Read CARRE grid in SONNET format, return GRID object.

GRIDMAN_CARRE_READSONNET_ARRAY and GRIDMAN_CARRE_READSONNET_GRID are combined in the interface GRIDMAN_CARRE_READSONNET

Parameters
gridResulting grid object
[in]fnameString containing the name of input file
[out]ierrError code
leirSwitch to produce cell index mapping in the sense of EIRENE

If .TRUE. then inices in the index mapping of cells are shifted in the presence if cuts in the way it is done in EIRENE

Definition at line 927 of file carre.f.

References gridman_carre2grid(), gridman_carre_readsonnet_array(), gridman::gridman_dp, gridman_grid_deallocate(), and gridman::gridman_sp.

Here is the call graph for this function: