Skip to content

Commit

Permalink
Update to CGNS 4.4 (#315)
Browse files Browse the repository at this point in the history
* update to cgns 4.4

* remove unused semicolons
  • Loading branch information
eirikurj authored Sep 9, 2023
1 parent f162cfb commit 686d096
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions src/modules/cgnsGrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ module cgnsGrid
integer(kind=intType) :: BCType

! Name of the CGNS user defined data node if the CGNS
! boundary condition is UserDefined.
! boundary condition is CG_UserDefined.

character(len=maxCGNSNameLen) :: userDefinedName

Expand Down Expand Up @@ -435,7 +435,7 @@ module cgnsGrid
character(len=maxCGNSNameLen) :: bcName

! Name of the CGNS user defined data node if the CGNS
! boundary condition is UserDefined.
! boundary condition is CG_UserDefined.

character(len=maxCGNSNameLen) :: userDefinedName

Expand Down
4 changes: 2 additions & 2 deletions src/modules/su_cgns.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ module su_cgns
implicit none
save

integer, parameter :: Null = 0
integer, parameter :: UserDefined = 1
integer, parameter :: CG_Null = 0
integer, parameter :: CG_UserDefined = 1

integer, parameter :: Kilogram = 2
integer, parameter :: Gram = 3
Expand Down
10 changes: 5 additions & 5 deletions src/output/outputMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2823,10 +2823,10 @@ subroutine writeCGNSHeader(cgnsInd, base)
case (timeSpectral)

! Time spectral mode. This is not a predefined mode in CGNS
! and therefore use userDefined.
! and therefore use CG_UserDefined.

call cg_simulation_type_write_f(cgnsInd, base, &
UserDefined, ierr)
CG_UserDefined, ierr)
if (ierr /= CG_OK) &
call terminate("writeCGNSHeader", &
"Something wrong when calling &
Expand Down Expand Up @@ -3253,7 +3253,7 @@ subroutine writeCGNSKtauInfo(cgnsInd, cgnsBase)
! supported by cgns.

call cg_model_write_f("TurbulenceModel_t", &
UserDefined, ierr)
CG_UserDefined, ierr)
if (ierr /= CG_OK) &
call terminate("writeCGNSKtauInfo", &
"Something wrong when calling cg_model_write_f")
Expand Down Expand Up @@ -3576,7 +3576,7 @@ subroutine writeCGNSReferenceState(cgnsInd, cgnsBase)
&cg_dataclass_write_f")

call cg_units_write_f(Kilogram, Meter, Second, Kelvin, &
Null, ierr)
CG_Null, ierr)
if (ierr /= CG_OK) &
call terminate("writeReferenceState", &
"Something wrong when calling &
Expand Down Expand Up @@ -3787,7 +3787,7 @@ subroutine writeCGNSV2fInfo(cgnsInd, cgnsBase)
! Write that user defined model is used; v2-f is not
! supported by cgns.

call cg_model_write_f("TurbulenceModel_t", UserDefined, ierr)
call cg_model_write_f("TurbulenceModel_t", CG_UserDefined, ierr)

if (ierr /= CG_OK) &
call terminate("writeCGNSV2fInfo", &
Expand Down
14 changes: 7 additions & 7 deletions src/output/writeCGNSGrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ subroutine writeCGNSGridFrame(cgnsZone, ind)

! Write the family BC, if this is present.

if (cgnsFamilies(nn)%BCTypeCGNS /= Null) then
if (cgnsFamilies(nn)%BCTypeCGNS /= CG_Null) then

call cg_fambc_write_f(cgnsInd, cgnsBase, ii, &
cgnsFamilies(nn)%bcName, &
Expand All @@ -497,10 +497,10 @@ subroutine writeCGNSGridFrame(cgnsZone, ind)
"Something wrong when calling &
&cg_fambc_write_f")

! If the boundary condition is UserDefined add the
! If the boundary condition is CG_UserDefined add the
! description what type of user defined BC it is.

if (cgnsFamilies(nn)%BCTypeCGNS == UserDefined) then
if (cgnsFamilies(nn)%BCTypeCGNS == CG_UserDefined) then

! Ultimately you would like to create the
! UserDefinedData_t as a subnode of the family boundary
Expand Down Expand Up @@ -621,7 +621,7 @@ subroutine writeCGNSGridFrame(cgnsZone, ind)
"Something wrong when calling &
&cg_dataclass_write_f")

call cg_units_write_f(Null, Null, Second, Null, &
call cg_units_write_f(CG_Null, CG_Null, Second, CG_Null, &
Degree, ierr)
if (ierr /= CG_OK) &
call terminate("writeCGNSGridFrame", &
Expand Down Expand Up @@ -754,7 +754,7 @@ subroutine writeCGNSGridFrame(cgnsZone, ind)
"Something wrong when calling &
&cg_dataclass_write_f")

call cg_units_write_f(Null, Null, Null, Null, &
call cg_units_write_f(CG_Null, CG_Null, CG_Null, CG_Null, &
Degree, ierr)
if (ierr /= CG_OK) &
call terminate("writeCGNSGridFrame", &
Expand Down Expand Up @@ -854,10 +854,10 @@ subroutine writeCGNSGridFrame(cgnsZone, ind)
&cg_famname_write_f")
end if

! If the boundary condition is UserDefined, write the
! If the boundary condition is CG_UserDefined, write the
! description of what type of user defined BC.

if (jj == UserDefined) then
if (jj == CG_UserDefined) then

! Go to the current boundary condition and write
! the appropriate data.
Expand Down
32 changes: 16 additions & 16 deletions src/partitioning/readCGNSGrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ subroutine readFamilyInfo(cgnsInd, cgnsBase)
select case (nFamBC)

case (0)
cgnsFamilies(nn)%BCTypeCGNS = Null
cgnsFamilies(nn)%BCTypeCGNS = CG_Null
cgnsFamilies(nn)%BCType = BCNull
cgnsFamilies(nn)%bcName = ""

Expand All @@ -352,7 +352,7 @@ subroutine readFamilyInfo(cgnsInd, cgnsBase)
! used BC.

testUserDefined: if (cgnsFamilies(nn)%BCTypeCGNS == &
UserDefined) then
CG_UserDefined) then

! Move to the family and determine the number of
! user defined data nodes.
Expand Down Expand Up @@ -605,7 +605,7 @@ subroutine readZoneInfo(cgnsBase, nZone, sortedFamName, &

! Check if units were specified.

if (ierr == CG_OK .and. len /= Null) then
if (ierr == CG_OK .and. len /= CG_Null) then

! Copy the units and set gridUnitsSpecified to .true.

Expand Down Expand Up @@ -750,7 +750,7 @@ subroutine readZoneInfo(cgnsBase, nZone, sortedFamName, &

! Check if units were specified. If not assume radians.

if (ierr == CG_OK .and. angle /= Null) then
if (ierr == CG_OK .and. angle /= CG_Null) then

! Determine the conversion factor to radians.

Expand Down Expand Up @@ -2081,7 +2081,7 @@ subroutine readBocos(cgnsInd, cgnsBase, nZone, &

!===========================================================

case (UserDefined)
case (CG_UserDefined)

! A user defined boundary condition is prescribed.
! More information should be present. Determine the
Expand Down Expand Up @@ -2125,7 +2125,7 @@ subroutine readBocos(cgnsInd, cgnsBase, nZone, &

! Print an error message if the BC type was not recognized.

if (cgnsDoms(nZone)%bocoInfo(i)%BCType == bcNull) then
if (cgnsDoms(nZone)%bocoInfo(i)%BCType == BCNull) then
write (errorMessage, strings) "Zone ", trim(cgnsDoms(nZone)%zoneName), &
", boundary face ", trim(cgnsDoms(nZone)%bocoInfo(i)%bocoName), &
": Unknown user-defined boundary condition ", &
Expand Down Expand Up @@ -2181,7 +2181,7 @@ subroutine readBocos(cgnsInd, cgnsBase, nZone, &

! Print an error message if the BC type was not recognized.

if (cgnsDoms(nZone)%bocoInfo(i)%BCType == bcNull) then
if (cgnsDoms(nZone)%bocoInfo(i)%BCType == BCNull) then
write (errorMessage, strings) "Zone ", trim(cgnsDoms(nZone)%zoneName), &
", boundary face ", trim(cgnsDoms(nZone)%bocoInfo(i)%bocoName), &
": boundary condition type missing or not supported"
Expand Down Expand Up @@ -2688,7 +2688,7 @@ function internalBC(cgnsBocoType, userDefinedName)
case (BCTunnelOutflow)
internalBC = SubsonicOutflow

case (UserDefined)
case (CG_UserDefined)

! Select the internal type base on the user defined name.

Expand Down Expand Up @@ -2722,12 +2722,12 @@ function internalBC(cgnsBocoType, userDefinedName)
internalBC = DomainInterfaceTotal

case default
internalBC = bcNull
internalBC = BCNull

end select

case default
internalBC = bcNull
internalBC = BCNull

end select

Expand Down Expand Up @@ -2812,7 +2812,7 @@ subroutine readPeriodicSubface(cgnsInd, cgnsBase, zone, conn, &

! Check if the angle dimensions were specified.

if (ierr == CG_OK .and. angle /= Null) then
if (ierr == CG_OK .and. angle /= CG_Null) then

! Determine the conversion factor to radians.

Expand Down Expand Up @@ -2954,7 +2954,7 @@ subroutine readPeriodicSubface1to1(cgnsInd, cgnsBase, zone, conn, &

! Check if the angle dimensions were specified.

if (ierr == CG_OK .and. angle /= Null) then
if (ierr == CG_OK .and. angle /= CG_Null) then

! Determine the conversion factor to radians.

Expand Down Expand Up @@ -3247,11 +3247,11 @@ subroutine readGrid

if (writeCoorMeter) then
do i = 1, cgnsNDom
cgnsDoms(i)%mass = Null
cgnsDoms(i)%mass = CG_Null
cgnsDoms(i)%len = Meter
cgnsDoms(i)%time = Null
cgnsDoms(i)%temp = Null
cgnsDoms(i)%angle = Null
cgnsDoms(i)%time = CG_Null
cgnsDoms(i)%temp = CG_Null
cgnsDoms(i)%angle = CG_Null

cgnsDoms(i)%gridUnitsSpecified = .true.
cgnsDoms(i)%LRef = one
Expand Down
8 changes: 4 additions & 4 deletions src/preprocessing/preprocessingAPI.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ subroutine setSurfaceFamilyInfo
defaultFamName(BCWallViscous) = 'wall'
defaultFamName(BCWallViscousHeatFlux) = 'wall'
defaultFamName(BCWallViscousIsothermal) = 'wall'
defaultFamName(UserDefined) = 'userDefined'
defaultFamName(CG_UserDefined) = 'userDefined'

nFam = 0
do i = 1, size(cgnsDoms)
Expand Down Expand Up @@ -3602,7 +3602,7 @@ subroutine faceRotationMatrices(level, allocMem)
! The rotation matrices for the i-faces.

do mm = 1, il
xFace => x(mm, 1:, 1:, :);
xFace => x(mm, 1:, 1:, :)
rotFace => rotMatrixI(mm, :, :, :, :)

call computeRotMatrixFace(xFace, rotFace, jl, kl)
Expand All @@ -3611,7 +3611,7 @@ subroutine faceRotationMatrices(level, allocMem)
! The rotation matrices for the j-faces.

do mm = 1, jl
xFace => x(1:, mm, 1:, :);
xFace => x(1:, mm, 1:, :)
rotFace => rotMatrixJ(:, mm, :, :, :)

call computeRotMatrixFace(xFace, rotFace, il, kl)
Expand All @@ -3620,7 +3620,7 @@ subroutine faceRotationMatrices(level, allocMem)
! The rotation matrices for the k-faces.

do mm = 1, kl
xFace => x(1:, 1:, mm, :);
xFace => x(1:, 1:, mm, :)
rotFace => rotMatrixK(:, :, mm, :, :)

call computeRotMatrixFace(xFace, rotFace, il, jl)
Expand Down

0 comments on commit 686d096

Please sign in to comment.