Subsections

Program map3d


map3d.c

Description:
The task of this routine is to decompose the geometrical blocks (pbs) generated by grid generators icem or igg into a parallel block structure (pbs) and to distribute the new blocks to the different processors. While reading this discription it is helpful to examine the documentation for subroutine readmap.F (especially for understanding the patches and transfer tables).

Definitions:

Definitions of used structures : Structure of routine map3d.c:
First the grid file coming from the icem or igg grid generator with the geometrical block structure is read to get information about geometry, geometrical blocks (number of blocks) and grid coordinates (dimensions in i-, j-, k-direction). Then the md-file is read to get information: Then subroutine read_tbc is called for velocities and temperature. It reads the topology and the BC from a tbc-file generated by icem. The information for the different patches is stored in an array of patch structures (*p_gbs_patch_tab). The information contains boundary condition on the patch, number of parent block, number of face of parent block, local min and max indices in i- and j-direction, number of neighbour patch, orientation of neighbour patch.
Then checking for consistency of patches (all faces covered with patches, neighbouring patches have the same coordinates along boundary).

In the following the blocks are partitioned and distributed to the processors according to the entries in the md-file (partitioning strategies): For each pbs-block (l=1,nblock) the mapping routines compute the following numbers (*p_pbs_block_tab is array of structs with gbs block information): Now we have the parallel block structure with the blocks assigned to the different processors.
The next task is to build up the list of new patches, one for velocity, one for temperature. This is done in two steps:
build_pbs_patch_list_stage1: patches and connections are adapted to the (new) pbs-block structure, i.e. that the patches are devided according to the divline-list. The divline-list gives information about the block number, the global index direction and the gid-index where to divide the patch. It is set up according to the endpoints of gbs- and pbs-blocks. Then check for consistency.
build_pbs_patch_list_stage_2: devides patches, so that the patch-topology is unique. The divline-list is built according to the endpoints of the patches. This may result in a very high number of pbs-patches so routine contract_pbs_con_patch_list is called to merge the patches who are redundently devided.

Then subroutine set_mon sets the pbs block number, processor number and pbs indices for the monitoring point in each pbs-block. After that subroutine set_pre sets the pressure reference points.

At the end subroutine create_map creates the output file which contains the new parallel block structure, patches etc, which is read by fmg3d.F.