"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/tests/cgwrite_f03.F90" between
CGNS-4.1.2.tar.gz and CGNS-4.2.0.tar.gz

About: The CGNS (CFD General Notation System) provides a standard for recording and recovering computer data associated with the numerical solution of fluid dynamics equations.

cgwrite_f03.F90  (CGNS-4.1.2):cgwrite_f03.F90  (CGNS-4.2.0)
program write_cgns_1 MODULE callback
#ifdef WINNT CONTAINS
include 'cgnswin_f.h'
#endif
USE CGNS
implicit none
! author: Diane Poirier (diane@icemcfd.com) SUBROUTINE error_exit(iserr, msg) bind(C)
! last revised on March 8 2000
! This example test the complete SIDS for multi-block data. USE ISO_C_BINDING
! It creates a dummy mesh composed of 2 structured blocks in 3D. IMPLICIT NONE
INTEGER, PARAMETER :: MSG_SIZE = 34
CHARACTER(LEN=MSG_SIZE), PARAMETER :: msg_correct = "file type unknown or no
t supported"
INTEGER(C_INT), VALUE :: iserr
CHARACTER(LEN=1), DIMENSION(*) :: msg
CHARACTER(LEN=MSG_SIZE) :: msg_check
INTEGER i
DO i=1, 34
msg_check(i:i) = msg(i)
ENDDO
IF(msg_check .NE. msg_correct)THEN
PRINT*,"ERROR: cg_configure_f failed for CG_CONFIG_ERROR"
STOP
ENDIF
integer Ndim END SUBROUTINE error_exit
parameter (Ndim = 3) END MODULE callback
INTEGER :: one
parameter (one = 1) PROGRAM write_cgns_1
#include "cgnstypes_f03.h"
INTEGER :: index_dim, cell_dim, phys_dim #ifdef WINNT
integer :: base_no, zone_no, coord_no, sol_no, discr_no, conn_no INCLUDE 'cgnswin_f.h'
INTEGER :: hole_no, boco_no, field_no, dset_no #endif
INTEGER :: num, NormalIndex(Ndim) USE CGNS
INTEGER :: ndims USE ISO_C_BINDING
INTEGER(cgsize_t) :: size(Ndim*3) USE callback
INTEGER(cgsize_t) :: npnts IMPLICIT NONE
INTEGER :: zone, coord, i, j, k, n, pos, sol, field
integer cg, ier ! author: Diane Poirier (diane@icemcfd.com)
INTEGER(CGSIZE_T) :: pnts(Ndim,120), donor_pnts(Ndim,120)
integer transform(Ndim) ! This example test the complete SIDS for multi-block data.
INTEGER :: nptsets, nrmlistflag ! It creates a dummy mesh composed of 2 structured blocks in 3D.
real*4 data(120), normals(360) ! It also tests the cg_configure_f API.
double precision Dxyz(120), values(120)
character*32 zonename, solname, fieldname INTEGER Ndim
character*32 coordname(Ndim) PARAMETER (Ndim = 3)
character*32 donorname INTEGER :: one
PARAMETER (one = 1)
coordname(1) = 'CoordinateX' INTEGER, PARAMETER :: sp = KIND(1.0)
coordname(2) = 'CoordinateY'
coordname(3) = 'CoordinateZ' INTEGER :: index_dim, cell_dim, phys_dim
INTEGER :: base_no, zone_no, coord_no, sol_no, discr_no, conn_no
INTEGER :: hole_no, boco_no, field_no, dset_no
INTEGER :: num, NormalIndex(Ndim)
INTEGER :: ndims
INTEGER(CGSIZE_T) :: size(Ndim*3)
INTEGER(CGSIZE_T) :: npnts
INTEGER :: zone, coord, i, j, k, n, pos, sol, field
INTEGER cg, ier
INTEGER(CGSIZE_T) :: pnts(Ndim,120), donor_pnts(Ndim,120)
INTEGER transform(Ndim)
INTEGER :: nptsets, nrmlistflag
REAL(KIND=sp) DATA(120), normals(360)
DOUBLE PRECISION Dxyz(120), values(120)
CHARACTER(LEN=32) zonename, solname, fieldname
CHARACTER(LEN=32) coordname(Ndim)
CHARACTER(LEN=32) donorname
INTEGER, TARGET :: value_f
INTEGER(C_SIZE_T), TARGET :: value_size_t_f
CHARACTER(LEN=32), TARGET :: path
coordname(1) = 'CoordinateX'
coordname(2) = 'CoordinateY'
coordname(3) = 'CoordinateZ'
! *** initialize ! *** initialize
ier = 0 ier = 0
index_dim=Ndim index_dim=Ndim
cell_dim=Ndim cell_dim=Ndim
phys_dim=Ndim phys_dim=Ndim
! *** open CGNS file for writing ! *** open CGNS file for writing
call cg_open_f('cgtest.cgns', CG_MODE_WRITE, cg, ier) CALL cg_open_f('cgtest.cgns', CG_MODE_WRITE, cg, ier)
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** base ! *** base
call cg_base_write_f(cg, 'Basename', cell_dim, phys_dim, & CALL cg_base_write_f(cg, 'Basename', cell_dim, phys_dim, base_no, ier)
& base_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! *** zone ! *** zone
do zone=1, 2 DO zone=1, 2
write(zonename,'(a5,i1)') 'zone#',zone WRITE(zonename,'(a5,i1)') 'zone#',zone
num = 1 num = 1
do i=1,index_dim ! zone#1: 3*4*5, zone#2: 4*5*6 DO i=1,index_dim ! zone#1: 3*4*5, zone#2: 4*5*6
size(i) = i+zone+1 ! nr of nodes in i,j,k size(i) = i+zone+1 ! nr of nodes in i,j,k
size(i+Ndim) = size(i)-1 ! nr of elements in i,j,k size(i+Ndim) = size(i)-1 ! nr of elements in i,j,k
size(i+2*Ndim) = 0 ! nr of bnd nodes if ordered size(i+2*Ndim) = 0 ! nr of bnd nodes if ordered
num = num * size(i) ! nr of nodes num = num * size(i) ! nr of nodes
enddo ENDDO
!234567890!234567890!234567890!234567890!234567890!234567890!23456789012 CALL cg_zone_write_f(cg, base_no, zonename, size, &
call cg_zone_write_f(cg, base_no, zonename, size, & Structured, zone_no, ier)
& Structured, zone_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! *** coordinate
! *** coordinate DO coord=1, phys_dim
do coord=1, phys_dim DO k=1, SIZE(3)
do k=1, size(3) DO j=1, SIZE(2)
do j=1, size(2) DO i=1, SIZE(1)
do i=1, size(1) pos = i + (j-1)*SIZE(1) + (k-1)*SIZE(1)*SIZE(2)
pos = i + (j-1)*size(1) + (k-1)*size(1)*size(2) ! * make up some dummy coordinates just for the test:
! * make up some dummy coordinates just for the test: IF (coord.EQ.1) Dxyz(pos) = i
if (coord.eq.1) Dxyz(pos) = i IF (coord.EQ.2) Dxyz(pos) = j
if (coord.eq.2) Dxyz(pos) = j IF (coord.EQ.3) Dxyz(pos) = k
if (coord.eq.3) Dxyz(pos) = k ENDDO
enddo ENDDO
enddo ENDDO
enddo
CALL cg_coord_write_f(cg, base_no, zone_no, RealDouble, &
call cg_coord_write_f(cg, base_no, zone_no, RealDouble, & coordname(coord), Dxyz, coord_no, ier)
& coordname(coord), Dxyz, coord_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
ENDDO
enddo
! *** solution
! *** solution DO sol=1, 2
do sol=1, 2 WRITE(solname,'(a5,i1,a5,i1)') 'Zone#',zone,' sol#',sol
write(solname,'(a5,i1,a5,i1)') 'Zone#',zone,' sol#',sol CALL cg_sol_write_f(cg, base_no, zone_no, solname, &
call cg_sol_write_f(cg, base_no, zone_no, solname, & Vertex, sol_no, ier)
& Vertex, sol_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! *** solution field
! *** solution field DO field=1, 2
do field=1, 2 ! make up some dummy solution values
! make up some dummy solution values DO i=1, num
do i=1, num values(i) = i*field*sol
values(i) = i*field*sol ENDDO
enddo WRITE(fieldname,'(a6,i1)') 'Field#',field
write(fieldname,'(a6,i1)') 'Field#',field CALL cg_field_write_f(cg, base_no, zone_no, sol_no, &
call cg_field_write_f(cg, base_no, zone_no, sol_no, & RealDouble, fieldname, values, field_no, ier)
& RealDouble, fieldname, values, field_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
ENDDO ! field loop
enddo ! field loop ENDDO ! solution loop
enddo ! solution loop
! *** discrete data
! *** discrete data CALL cg_discrete_write_f(cg, base_no, zone_no, 'discrete#1', &
call cg_discrete_write_f(cg, base_no, zone_no, 'discrete#1',& discr_no, ier)
& discr_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! *** discrete data arrays, defined on vertices:
! *** discrete data arrays, defined on vertices: CALL cg_goto_f(cg, base_no, ier, 'Zone_t', zone, &
call cg_goto_f(cg, base_no, ier, 'Zone_t', zone, & 'DiscreteData_t', discr_no, 'end')
& 'DiscreteData_t', discr_no, 'end') IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
DO k=1, SIZE(3)
do 123 k=1, size(3) DO j=1, SIZE(2)
do 123 j=1, size(2) DO i=1, SIZE(1)
do 123 i=1, size(1) pos = i + (j-1)*SIZE(1) + (k-1)*SIZE(1)*SIZE(2)
pos = i + (j-1)*size(1) + (k-1)*size(1)*size(2) DATA(pos) = pos ! * make up some dummy data
data(pos) = pos ! * make up some dummy data ENDDO
123 continue ENDDO
call cg_array_write_f('arrayname', RealSingle, index_dim, & ENDDO
& size, data, ier) CALL cg_array_write_f('arrayname', RealSingle, index_dim, &
if (ier .eq. ERROR) call cg_error_exit_f size, DATA, ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** discrete data arrays attribute: GOTO DataArray node
call cg_goto_f(cg, base_no, ier, 'Zone_t', zone, & ! *** discrete data arrays attribute: GOTO DataArray node
& 'DiscreteData_t', discr_no, 'DataArray_t', 1, 'end') CALL cg_goto_f(cg, base_no, ier, 'Zone_t', zone, &
if (ier .eq. ERROR) call cg_error_exit_f 'DiscreteData_t', discr_no, 'DataArray_t', 1, 'end')
IF (ier .EQ. ERROR) CALL cg_error_exit_f
call cg_units_write_f(Kilogram, Meter, Second, Kelvin, &
& Radian, ier) CALL cg_units_write_f(Kilogram, Meter, Second, Kelvin, &
if (ier .eq. ERROR) call cg_error_exit_f Radian, ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** overset holes
! create dummy data ! *** overset holes
do i=1,3 ! create dummy data
! Define 2 separate PointRange, for 2 patches in the hole DO i=1,3
pnts(i,1)=1 ! Define 2 separate PointRange, for 2 patches in the hole
pnts(i,2)=size(i) pnts(i,1)=1
! second PointRange of hole pnts(i,2)=SIZE(i)
pnts(i,3)=2 ! second PointRange of hole
pnts(i,4)=size(i) pnts(i,3)=2
enddo pnts(i,4)=SIZE(i)
! Hole defined with 2 point set type PointRange, so 4 points: ENDDO
nptsets = 2 ! Hole defined with 2 point set type PointRange, so 4 points:
npnts = 4 nptsets = 2
call cg_hole_write_f(cg, base_no, zone_no, 'hole#1', Vertex,& npnts = 4
& PointRange, nptsets, npnts, pnts, & CALL cg_hole_write_f(cg, base_no, zone_no, 'hole#1', Vertex,&
& hole_no, ier) PointRange, nptsets, npnts, pnts, hole_no, ier)
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** general connectivity ! *** general connectivity
do 100 n=1, 5 DO n=1, 5
do 100 i=1,3 DO i=1,3
pnts(i,n)=i ! * dummy data pnts(i,n)=i ! * dummy data
donor_pnts(i,n)=i*2 donor_pnts(i,n)=i*2
100 continue ENDDO
! create a point matching connectivity ENDDO
npnts = 5 ! create a point matching connectivity
call cg_conn_write_f(cg, base_no, zone_no, 'Connect#1', & npnts = 5
& Vertex, Abutting1to1, PointList, npnts, pnts, 'zone#2', & CALL cg_conn_write_f(cg, base_no, zone_no, 'Connect#1', &
& Structured, PointListDonor, Integer, npnts, donor_pnts, & Vertex, Abutting1to1, PointList, npnts, pnts, 'zone#2', &
& conn_no, ier) Structured, PointListDonor, INTEGER, npnts, donor_pnts, conn_no, ier)
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** connectivity 1to1 ! *** connectivity 1to1
! generate data ! generate data
do i=1,3 DO i=1,3
!**make up some dummy data: !**make up some dummy data:
pnts(i,1)=1 pnts(i,1)=1
pnts(i,2)=size(i) pnts(i,2)=SIZE(i)
donor_pnts(i,1)=1 donor_pnts(i,1)=1
donor_pnts(i,2)=size(i) donor_pnts(i,2)=SIZE(i)
transform(i)=i*(-1) transform(i)=i*(-1)
enddo ENDDO
if (zone .eq. 1) then IF (zone .EQ. 1) THEN
donorname='zone#2' donorname='zone#2'
else if (zone .eq. 2) then ELSE IF (zone .EQ. 2) THEN
donorname='zone#1' donorname='zone#1'
endif ENDIF
call cg_1to1_write_f(cg, base_no, zone_no, '1to1_#1', & CALL cg_1to1_write_f(cg, base_no, zone_no, '1to1_#1', &
& donorname, pnts, donor_pnts, transform, conn_no, ier) donorname, pnts, donor_pnts, transform, conn_no, ier)
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** ZoneGridConnectivity attributes: GOTO ZoneGridConnectivity_t node ! *** ZoneGridConnectivity attributes: GOTO ZoneGridConnectivity_t node
call cg_goto_f(cg, base_no, ier, 'Zone_t', zone, & CALL cg_goto_f(cg, base_no, ier, 'Zone_t', zone, &
& 'ZoneGridConnectivity_t', one, 'end') 'ZoneGridConnectivity_t', one, 'end')
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** ZoneGridConnectivity attributes: Descriptor_t ! *** ZoneGridConnectivity attributes: Descriptor_t
!234567890!234567890!234567890!234567890!234567890!234567890!23456789012 CALL cg_descriptor_write_f('DescriptorName', &
call cg_descriptor_write_f('DescriptorName', & 'Zone Connectivity', ier)
& 'Zone Connectivity', ier)
! *** bocos
! *** bocos npnts = 2
npnts = 2 CALL cg_boco_write_f(cg, base_no, zone_no, 'boco#1', &
call cg_boco_write_f(cg, base_no, zone_no, 'boco#1', & BCInflow, PointRange, npnts, pnts, boco_no, ier)
& BCInflow, PointRange, npnts, pnts, boco_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! *** boco normal
! *** boco normal npnts = 1
npnts = 1 DO i=1,Ndim
do i=1,Ndim NormalIndex(i)=0
NormalIndex(i)=0 ! compute nr of points on bc patch:
! compute nr of points on bc patch: npnts = npnts * (pnts(i,2)-pnts(i,1)+1)
npnts = npnts * (pnts(i,2)-pnts(i,1)+1) ENDDO
enddo NormalIndex(1)=1
NormalIndex(1)=1 DO i=1,phys_dim*npnts
do i=1,phys_dim*npnts normals(i)=i
normals(i)=i ENDDO
enddo
nrmlistflag = 1
nrmlistflag = 1 CALL cg_boco_normal_write_f(cg, base_no, zone_no, boco_no, &
call cg_boco_normal_write_f(cg, base_no, zone_no, boco_no, & NormalIndex, nrmlistflag, RealSingle, normals, ier)
& NormalIndex, nrmlistflag, RealSingle, normals, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! ** boundary condition attributes: GOTO BC_t node
! ** boundary condition attributes: GOTO BC_t node CALL cg_goto_f(cg, base_no, ier, 'Zone_t', zone, 'ZoneBC_t', &
call cg_goto_f(cg, base_no, ier, 'Zone_t', zone, 'ZoneBC_t',& one, 'BC_t', boco_no, 'end')
& one, 'BC_t', boco_no, 'end') IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! ** boundary condition attributes: GridLocation_t
! ** boundary condition attributes: GridLocation_t CALL cg_gridlocation_write_f(Vertex, ier)
call cg_gridlocation_write_f(Vertex, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! ** boundary condition dataset
! ** boundary condition dataset CALL cg_dataset_write_f(cg, base_no, zone, &
call cg_dataset_write_f(cg, base_no, zone, & boco_no, 'DataSetName', BCInflow, dset_no, ier)
& boco_no, 'DataSetName', BCInflow, dset_no, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! ** boundary condition data:
! ** boundary condition data: CALL cg_bcdata_write_f(cg, base_no, zone, &
call cg_bcdata_write_f(cg, base_no, zone, & boco_no, dset_no, Neumann, ier)
& boco_no, dset_no, Neumann, ier) IF (ier .EQ. ERROR) CALL cg_error_exit_f
if (ier .eq. ERROR) call cg_error_exit_f
! ** boundary condition data arrays: GOTO BCData_t node ! ** boundary condition data arrays: GOTO BCData_t node
CALL cg_goto_f(cg, base_no, ier, 'Zone_t', zone_no, & CALL cg_goto_f(cg, base_no, ier, 'Zone_t', zone_no, &
& 'ZoneBC_t', one, 'BC_t', boco_no, 'BCDataSet_t', & 'ZoneBC_t', one, 'BC_t', boco_no, 'BCDataSet_t', &
& dset_no, 'BCData_t', Neumann, 'end') dset_no, 'BCData_t', Neumann, 'end')
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
do i=1, npnts DO i=1, npnts
data(i) = i DATA(i) = i
enddo ENDDO
ndims = 1 ndims = 1
call cg_array_write_f('dataset_arrayname', RealSingle, & CALL cg_array_write_f('dataset_arrayname', RealSingle, &
& ndims, npnts, data, ier) ndims, [npnts], DATA, ier)
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
! ** boundary condition data attributes: ! ** boundary condition data attributes:
call cg_dataclass_write_f(NormalizedByDimensional, ier) CALL cg_dataclass_write_f(NormalizedByDimensional, ier)
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
enddo ! zone loop ENDDO ! zone loop
! *** close CGNS file ! *** close CGNS file
call cg_close_f(cg, ier) CALL cg_close_f(cg, ier)
if (ier .eq. ERROR) call cg_error_exit_f IF (ier .EQ. ERROR) CALL cg_error_exit_f
#if CG_BUILD_HDF5
! Disable with gfortran, GCC Bugzilla - Bug 99982
#ifndef __GFORTRAN__
! **************************
! Test cg_configure options
! **************************
value_f = 1
CALL cg_configure_f(CG_CONFIG_HDF5_DISKLESS, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
! enable committing memory to disk
value_f = 1
CALL cg_configure_f(CG_CONFIG_HDF5_DISKLESS_WRITE, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_size_t_f = INT(20*1024*1024,C_SIZE_T)
CALL cg_configure_f(CG_CONFIG_HDF5_DISKLESS_INCR, C_LOC(value_size_t_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
CALL cg_open_f('cgtest_core.cgns', CG_MODE_WRITE, cg, ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
! *** base
CALL cg_base_write_f(cg, 'Basename', cell_dim, phys_dim, base_no, ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
CALL cg_close_f(cg, ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = 0
CALL cg_configure_f(CG_CONFIG_HDF5_DISKLESS, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = CG_FILE_ADF2
value_f = CG_FILE_ADF
CALL cg_configure_f(CG_CONFIG_FILE_TYPE, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = CG_FILE_HDF5
CALL cg_configure_f(CG_CONFIG_FILE_TYPE, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = -1
CALL cg_configure_f(CG_CONFIG_HDF5_COMPRESS, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = -1
CALL cg_configure_f(CG_CONFIG_COMPRESS, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = CG_CONFIG_RIND_ZERO
CALL cg_configure_f(CG_CONFIG_RIND_INDEX, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = CG_CONFIG_RIND_CORE
CALL cg_configure_f(CG_CONFIG_RIND_INDEX, C_LOC(value_f), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
path = "/test/a/b"//C_NULL_CHAR
CALL cg_configure_f(CG_CONFIG_SET_PATH, C_LOC(path(1:1)), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
path = "/test/c/d"//C_NULL_CHAR
CALL cg_configure_f(CG_CONFIG_ADD_PATH, C_LOC(path(1:1)), ier)
path = C_NULL_CHAR
CALL cg_configure_f(CG_CONFIG_SET_PATH, C_LOC(path(1:1)), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
CALL cg_configure_f(CG_CONFIG_ERROR, c_funloc(error_exit), ier)
IF (ier .EQ. ERROR) CALL cg_error_exit_f
value_f = 100 ! Trigger an error
CALL cg_configure_f(CG_CONFIG_FILE_TYPE, C_LOC(value_f), ier)
IF (ier .NE. ERROR) CALL cg_error_exit_f
#endif
#endif
end END PROGRAM write_cgns_1
 End of changes. 14 change blocks. 
249 lines changed or deleted 353 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)