Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The module contains routines that support writing a grid having the  type(triangular_grid)  form to IMAS IDS's and, vice versa, reading a grid from IMAS and putting it into the type(triangular_grid)  form. It depends on the module  triangular_grid_module   and the IMAS modules  ids_schemas   and  ids_routines .

At present, it is assumed that both input and output of EIRENE represent a steady state. Therefore, only one time slice is organized for both GGD data structure and the GGD grid.

At present, only one grid space is arranged: a two-dimensional poloidal grid space holding a triangular grid. However, the routines of this modules are organized in a way that should facilitate adding additional spaces (most probably, a 1D toroidal space) if required. When the poloidal grid is recovered from an IDS, it is taken from the space having the identifier index equal to 1 (see the function get_grid_objects).

 Data types provided

    type grid_control_panel
        type(ids_identifier_dynamic_aos3) :: grid_identifier
        character(len=ids_string_length) :: poloidal_space_name, poloidal_space_description
        character(len=ids_string_length) :: node_file, triangle_file, neighbor_file
        integer :: grid_index = 1             ! Use grid_ggd in time slice 1
        integer :: ggd_index = 1              ! Use ggd in time slice 1
        ! The following fields are not used when getting the grid from IDS
        integer :: grid_dictionary_index
        !! Allocation of IMAS grid space for EIRENE triangular grid
        integer :: nSpaces = 1                ! Total number of GGD spaces;
                                                          ! may change if toroidal coordinate is added
        integer :: eirene_space_index = 1     ! May change if toroidal coordinate is added
        integer :: Ngrid_slices = 1                 ! Number of grid_ggd slices to be allocated
        integer :: Nggd_slices = 1                 ! Number of ggd slices to be allocated
    end type grid_control_panel

...

Prepare the control parameters for extracting an EIRENE grid from an IMAS database holding an EIRENE input. The control parameters are taken from a command file.

Argument

Type

Intent

Description

grid_controlstype(grid_control_panel)resultStructure holding the control parameters
io_unitintegerinI/O unit attached to the command file


function get_triangular_grid_from_ids (grid_ggd) result (eirene_grid)

Read data about a triangular grid from a given space of GGD grid, put it into a  type(triangular_grid)-structure and call the subroutines  arrange_material_properties  (from this module) and  arrange_neighbors   (from  triangular_grid_module) to build the missing parts of the structure. This function is not applicable to the grid stored in the 'equilibrium' IDS (because the type of the structure used for storing the GGD grid in this IDS is different). To extract the grid from the 'equilibrium' IDS, use the function get_triangular_grid_from_equilibrium.

Argument

Type

Intent

Description

eirene_gridtype(triangular_grid)resultThe retrieved grid
grid_ggdtype(ids_generic_grid_aos3_root), pointerpointerPointer to the  grid_ggd  AOS element containing the grid


function get_triangular_grid_from_equilibrium (grid_ggd) result (eirene_grid)

Read data about a triangular grid from a given space of GGD grid, put it into a  type(triangular_grid)-structure and call the subroutines  arrange_material_properties  (from this module) and  arrange_neighbors   (from  triangular_grid_module) to build the missing parts of the structure. This function is applicable only to the grid stored in the 'equilibrium' IDS (because the type of the structure used for storing the GGD grid in this IDS is different). To extract the grid from another IDS, use the function get_triangular_grid_from_ids.

Argument

Type

Intent

Description

eirene_gridtype(triangular_grid)resultThe retrieved grid
grid_ggdtype(ids_generic_grid_dynamic), pointerpointerPointer to the  grid_ggd  AOS element containing the grid


function get_grid_objects (space) result (eirene_grid)

The function returns a type(triangular_grid)-structure, which is partly filled with information read from the GGD grid space having the identifier index equal to 1 (i.e., being the 'primary grid space'). The function takes as a parameter the AoS of all grid spaces.

Argument

Type

Intent

Description

eirene_gridtype(triangular_grid)resultPartly filled grid structure
grid_ggd
typeids
type(ids_generic_grid_dynamic_space), dimension(:)inSpace where the triangular grid is stored


???????????????????????????????????????????? TO BE CHECKED

...