Copy grid

Copy grid between two CGNS files. The function can be used for both structured grids and unstructured grids.

Table 80 利用する関数

Subroutine

Remarks

cg_iric_copy_grid

Copys the grid

List 110 shows an example of opening two CGNS files, and copy the grid from one to another.

List 110 Example source code to copy grid
 1program SampleX
 2  use iric
 3  implicit none
 4
 5  integer:: fid_from, fid_to, ier
 6
 7  ! Opens CGNS files
 8  call cg_iric_open('test1.cgn', IRIC_MODE_READ, fid_from, ier)
 9  if (ier /=0) STOP "*** Open error of CGNS file ***"
10
11  call cg_iric_open('test1.cgn', IRIC_MODE_MODIFY, fid_to, ier)
12  if (ier /=0) STOP "*** Open error of CGNS file ***"
13
14  ! Copy grid
15  call cg_iric_copy_grid(fid_from, fid_to, ier)
16
17  ! Closes CGNS files
18  call cg_iric_close(fid_from, ier)
19  call cg_iric_close(fid_to, ier)
20  stop
21end program SampleX