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

Merge two 2D grids. More...

Go to the source code of this file.

Functions/Subroutines

subroutine gridman_grid2d_merge (GRID, GRID1, GRID2, TOL, IERR)
 Merge two 2D grids by connecting their boundary edges. More...
 

Detailed Description

Merge two 2D grids.

Definition in file merge.f.

Function/Subroutine Documentation

subroutine gridman_grid2d_merge ( type(gridman_grid)  GRID,
type(gridman_grid)  GRID1,
type(gridman_grid)  GRID2,
real(gridman_dp), intent(in)  TOL,
integer, intent(out)  IERR 
)

Merge two 2D grids by connecting their boundary edges.

GRID2 is merged into GRID1 by connecting their boundary edges.

WARNING: the object GRID must not be equal to GRID1 or GRID2!

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

WARNING: the algorithm implemented at the moment assumes that edges of GRID1 and GRID2 which overlap with each over can be completely removed. That is, there are no "hanging tails" which do not belong to the intersection

Units of GRID are same as units of GRID1

Parameters
gridResulting grid object
grid1First grid which stays intact
grid2Second grid which is merged into the first one
[in]tolRelative accuracy of the points coordinates
  • If TOL is too large than the code can mistakenly take two different points for one point
  • If TOL is too small then the code cannot recognise a point which is same in both grids

Recommended value TOL=1e-5. It might be necessary to increase or decrease TOL in each individual case.

Parameters
[out]ierrError code

Definition at line 39 of file merge.f.

References gridman::gridman_dp, gridman_grid2d_check(), gridman_grid_allocate(), gridman_index_copy(), gridman_index_transform(), and gridman::gridman_sp.

Referenced by mergegrid().

Here is the call graph for this function:

Here is the caller graph for this function: