Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/output/output_cgns.f90
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,23 @@ SUBROUTINE WriteDataToCGNS(dim1,nVal,NPlot,nElems,VarNames,Coord,Values,FileStri

! Create new zone in file
CGName=ProgramName//'VisuData'
CALL cg_zone_write_f(CGNSfile,CGNSBase,TRIM(CGname),isize,Unstructured,CGNSZone,iErr)
CALL cg_zone_write_f(CGNSfile,CGNSBase,TRIM(CGname),isize,CG_Unstructured,CGNSZone,iErr)
IF (iErr .NE. CG_OK) CALL my_cg_error_exit('Error Creating CGNS Zone.',CGNSFile)

! Write x-coordinates
CALL cg_coord_write_f(CGNSFile,CGNSBase,CGNSZone,RealDouble,'CoordinateX', &
CALL cg_coord_write_f(CGNSFile,CGNSBase,CGNSZone,CG_RealDouble,'CoordinateX', &
Coord(1,:,:), &
CGNSCoords, iErr)
IF (iErr .NE. CG_OK) CALL my_cg_error_exit('Error Writing x-Coordinates.',CGNSFile)

! Write y-coordinates
CALL cg_coord_write_f(CGNSFile,CGNSBase,CGNSZone,RealDouble,'CoordinateY', &
CALL cg_coord_write_f(CGNSFile,CGNSBase,CGNSZone,CG_RealDouble,'CoordinateY', &
Coord(2,:,:), &
CGNSCoords, iErr)
IF (iErr .NE. CG_OK) CALL my_cg_error_exit('Error Writing y-Coordinates.',CGNSFile)

! Write z-coordinates
CALL cg_coord_write_f(CGNSFile,CGNSBase,CGNSZone,RealDouble,'CoordinateZ', &
CALL cg_coord_write_f(CGNSFile,CGNSBase,CGNSZone,CG_RealDouble,'CoordinateZ', &
Coord(3,:,:), &
CGNSCoords, iErr)
IF (iErr .NE. CG_OK) CALL my_cg_error_exit('Error Writing z-Coordinates.',CGNSFile)
Expand All @@ -135,7 +135,7 @@ SUBROUTINE WriteDataToCGNS(dim1,nVal,NPlot,nElems,VarNames,Coord,Values,FileStri
NodeIDElem=NodeIDElem+NPlot_p1_2
END DO
! Write Element Connectivity
CALL cg_section_write_f(CGNSFile,CGNSBase,CGNSZone,'Elements',QUAD_4,one,isize(1,2),zero, &
CALL cg_section_write_f(CGNSFile,CGNSBase,CGNSZone,'Elements',CG_QUAD_4,one,isize(1,2),zero, &
ElemConn,CGNSsection,iErr)
CASE(3)
NPlot_p1_3=(NPlot+1)**3
Expand All @@ -161,19 +161,19 @@ SUBROUTINE WriteDataToCGNS(dim1,nVal,NPlot,nElems,VarNames,Coord,Values,FileStri
NodeIDElem=NodeIDElem+NPlot_p1_3
END DO
! Write Element Connectivity
CALL cg_section_write_f(CGNSFile,CGNSBase,CGNSZone,'Elements',HEXA_8,one,isize(1,2),zero, &
CALL cg_section_write_f(CGNSFile,CGNSBase,CGNSZone,'Elements',CG_HEXA_8,one,isize(1,2),zero, &
ElemConn,CGNSsection,iErr)
END SELECT


IF (iErr .NE. CG_OK) CALL my_cg_error_exit('Error Writing Connectivity.',CGNSFile)
! Write out point data
CGname='FlowSolution'
CALL cg_sol_write_f(CGNSFile,CGNSBase,CGNSZone,TRIM(CGname),Vertex,CGNSFlowSol,iErr)
CALL cg_sol_write_f(CGNSFile,CGNSBase,CGNSZone,TRIM(CGname),CG_Vertex,CGNSFlowSol,iErr)
IF (iErr .NE. CG_OK) CALL my_cg_error_exit('Error Creating CGNS Flow Solution Node.',CGNSFile)
DO iVal=1,nVal
VarNames32(iVal)=VarNames(iVal)(1:32)
CALL cg_field_write_f(CGNSFile,CGNSBase,CGNSZone,CGNSFlowSol,RealDouble,TRIM(VarNames(iVal)), &
CALL cg_field_write_f(CGNSFile,CGNSBase,CGNSZone,CGNSFlowSol,CG_RealDouble,TRIM(VarNames(iVal)), &
Values(iVal,:,:), &
CGNSFieldInd,iErr)
IF (iErr .NE. CG_OK) CALL my_cg_error_exit('Error Writing CGNS Variable '//TRIM(VarNames(iVal))//'.',CGNSFile)
Expand Down
98 changes: 47 additions & 51 deletions src/readin/readin_CGNS.f90
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@ SUBROUTINE ReadCGNSmesh()
IF(iError .NE. CG_OK) CALL abortCGNS(__STAMP__,CGNSFile)
DO iZone=1,nCGNSZones
nZonesGlob=nZonesGlob+1
IF(nZonesGlob.GT.nZones)&
WRITE(UNIT_stdOut,*)'ERROR: number of zones in inifile does not correspond to number of zones in meshfile(s)',nZones

! Check structured / unstructured
CALL cg_zone_type_f(CGNSFile, CGNSBase, iZone, ZoneType, iError)
IF (iError .NE. CG_OK) CALL cg_error_exit_f()
IF (ZoneType.EQ.Structured)THEN
IF (ZoneType.EQ.CG_Structured)THEN
CALL ReadCGNSMeshStruct(FirstElem,CGNSFile,CGNSBase,iZone,nZonesGlob,nNodesGlob)
ELSEIF(ZoneType.EQ.Unstructured)THEN
ELSEIF(ZoneType.EQ.CG_Unstructured)THEN
CALL ReadCGNSMeshUnstruct(FirstElem,CGNSFile,CGNSBase,iZone,nZonesGlob,nNodesGlob)
ELSE
STOP 'Wrong zone type specifier, should be structured or unstructured.'
Expand Down Expand Up @@ -244,7 +246,7 @@ SUBROUTINE ReadCGNSMeshUnstruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,
NodeCoords=0.
DO dm=1,MeshDim
CGname=TRIM(CoordNameCGNS(dm))
CALL CG_COORD_READ_F(CGNSfile,CGNSBase,iZone,CGName,RealDouble,one,nNodes,NodeCoords(dm,:),iError)
CALL CG_COORD_READ_F(CGNSfile,CGNSBase,iZone,CGName,CG_RealDouble,one,nNodes,NodeCoords(dm,:),iError)
IF (iError .NE. CG_OK)THEN
WRITE(UNIT_stdOut,*)'ERROR - Could not read coordinate(',dm,'): ',TRIM(CoordNameCGNS(dm))
CALL CG_NCOORDS_F(CGNSFile,CGNSBase,iZone,PhysDim,iError ) ! Here we use PhysDim as nCoords
Expand Down Expand Up @@ -286,7 +288,7 @@ SUBROUTINE ReadCGNSMeshUnstruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,
CALL CG_SECTION_READ_F(CGNSfile,CGNSBase,iZone,iSect,CGname,SectionElemType,IndMin,IndMax,ParentDataFlag,ParentDataFlag,iError)
WRITE(UNIT_StdOut,*)' read section ',TRIM(CGname)
IF (iError .NE. CG_OK) CALL abortCGNS(__STAMP__,CGNSFile)
IF(SectionElemType .LT. TRI_3) CYCLE !ignore additional sections with data <nDim-1
IF(SectionElemType .LT. CG_TRI_3) CYCLE !ignore additional sections with data <nDim-1
CALL CG_ELEMENTDATASIZE_F(CGNSFile,CGNSBase,iZone,iSect,nSectElems,iError) ! Get number of connectivity values
ALLOCATE(LocalConnect(nSectElems))
nSectElems=1+IndMax-IndMin ! Important for surface elements only
Expand All @@ -298,7 +300,7 @@ SUBROUTINE ReadCGNSMeshUnstruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,
! Check if 2D element is not oriented in z+, check only first element#
IF(MeshDim .EQ. 2)THEN
orient2D=.TRUE. !
IF(SectionElemType .EQ. MIXED) THEN
IF(SectionElemType .EQ. CG_MIXED) THEN
locType=LocalConnect(1)
iStart=2
ELSE
Expand All @@ -317,7 +319,7 @@ SUBROUTINE ReadCGNSMeshUnstruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,
iStart=1
DO iElem=1,nSectElems
iEnd=iStart
IF(SectionElemType .EQ. MIXED) THEN
IF(SectionElemType .EQ. CG_MIXED) THEN
LocType=LocalConnect(iStart) ! Mixed type elements, read elem type from array
iStart =iStart+1 ! First value is elem type
ELSE
Expand All @@ -328,9 +330,9 @@ SUBROUTINE ReadCGNSMeshUnstruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,
iEnd=iEnd+nNodesLoc

LocDim=1
IF(LocType .GT. BAR_3) LocDim=2
IF(LocType .GT. QUAD_9) LocDim=3
IF(LocType .GT. MIXED) LocDim=2 !NGON_n
IF(LocType .GT. CG_BAR_3) LocDim=2
IF(LocType .GT. CG_QUAD_9) LocDim=3
IF(LocType .GT. CG_MIXED) LocDim=2 !NGON_n

IF(LocDim .EQ. MeshDim) THEN ! volume element
iVolElem=iVolElem+1
Expand Down Expand Up @@ -419,11 +421,11 @@ SUBROUTINE ReadCGNSMeshUnstruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,
CYCLE
END IF

IF(Bugfix_ANSA_CGNS) PntSetType=ElementList
IF(Bugfix_ANSA_CGNS) PntSetType=CG_ElementList

! Boundary is given as a list of boundary nodes
IF((PntSetType .EQ. PointList).OR.(PntSetType .EQ. PointRange))THEN
IF(PntSetType .EQ. PointRange) THEN
IF((PntSetType .EQ. CG_PointList).OR.(PntSetType .EQ. CG_PointRange))THEN
IF(PntSetType .EQ. CG_PointRange) THEN
CALL CG_BOCO_READ_F(CGNSfile,CGNSBase,iZone,iBC,DimVec,NorVec,iError)
nBCPoints=1+DimVec(2)-DimVec(1)
DO j=1,nBCPoints
Expand Down Expand Up @@ -461,8 +463,8 @@ SUBROUTINE ReadCGNSMeshUnstruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,
END DO ! iElem=1,nElems

! Boundary is given as a list of boundary elements
ELSEIF ((PntSetType .EQ. ElementList).OR.(PntSetType .EQ. ElementRange)) THEN
IF(PntSetType .EQ. ElementRange)THEN
ELSEIF ((PntSetType .EQ. CG_ElementList).OR.(PntSetType .EQ. CG_ElementRange)) THEN
IF(PntSetType .EQ. CG_ElementRange)THEN
CALL CG_BOCO_READ_F(CGNSfile,CGNSBase,iZone,iBC,DimVec,NorVec,iError)
nBCElems=1+DimVec(2)-DimVec(1)
ALLOCATE(BCElemList(nBCElems))
Expand Down Expand Up @@ -625,7 +627,6 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
PP_CGNS_INT_TYPE ,ALLOCATABLE :: BCElems(:,:) ! ?
REAL ,ALLOCATABLE :: NormalList(:) ! ?
LOGICAL :: zFit
INTEGER :: MapCGNS(3)
!===================================================================================================================================
ALLOCATE(isize(meshDim,3))
ALLOCATE(DimVec(meshDim,2))
Expand All @@ -640,11 +641,6 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
END IF
Step=nSkip*N_loc

! Define mapping: (x,y,z) -> (y,z,x)
MapCGNS(1) = 3
MapCGNS(2) = 1
MapCGNS(3) = 2

irmin=1
IF(meshdim.EQ.3)THEN
irmax=isize(:,1)
Expand Down Expand Up @@ -676,15 +672,15 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
END IF

! Read Coordinates
CALL cg_coord_read_f(CGNSFile,CGNSBase,iZone,'CoordinateX',REALDOUBLE,irmin,irmax,NodeCoords(1,:,:,:),iError)
CALL cg_coord_read_f(CGNSFile,CGNSBase,iZone,'CoordinateY',REALDOUBLE,irmin,irmax,NodeCoords(2,:,:,:),iError)
CALL cg_coord_read_f(CGNSFile,CGNSBase,iZone,'CoordinateZ',REALDOUBLE,irmin,irmax,NodeCoords(3,:,:,:),iError)
CALL cg_coord_read_f(CGNSFile,CGNSBase,iZone,'CoordinateX',CG_RealDouble,irmin,irmax,NodeCoords(1,:,:,:),iError)
CALL cg_coord_read_f(CGNSFile,CGNSBase,iZone,'CoordinateY',CG_RealDouble,irmin,irmax,NodeCoords(2,:,:,:),iError)
CALL cg_coord_read_f(CGNSFile,CGNSBase,iZone,'CoordinateZ',CG_RealDouble,irmin,irmax,NodeCoords(3,:,:,:),iError)

! Apply skip
IF(nSkip.NE.1)THEN
irmax = (irmax-1)/nSkip + 1
ALLOCATE(NodeCoordsTmp(3,irmax(1),irmax(2),irmax(3)))
DO m=1,irmax(3); DO l=1,irmax(2); DO k=1,irmax(1)
DO k=1,irmax(1); DO l=1,irmax(2); DO m=1,irmax(3)
NodeCoordsTmp(:,k,l,m) = NodeCoords(:, 1+(k-1)*nSkip, 1+(l-1)*nSkip, 1+(m-1)*nSkip)
END DO; END DO; END DO !k,l,m
DEALLOCATE(NodeCoords)
Expand Down Expand Up @@ -774,13 +770,13 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN


! Building temporary nodes
ALLOCATE(Mnodes(irmax(MapCGNS(1)),irmax(MapCGNS(2)),irmax(MapCGNS(3))))
DO m=1,irmax(MapCGNS(3))
DO l=1,irmax(MapCGNS(2))
DO k=1,irmax(MapCGNS(1))
ALLOCATE(Mnodes(irmax(1),irmax(2),irmax(3)))
DO k=1,irmax(1)
DO l=1,irmax(2)
DO m=1,irmax(3)
CALL GetNewNode(Mnodes(k,l,m)%np)
IF(meshDim.EQ.3)THEN
Mnodes(k,l,m)%np%x =NodeCoords(:,l,m,k) ! Node coordinates are assigned
Mnodes(k,l,m)%np%x =NodeCoords(:,k,l,m) ! Node coordinates are assigned
ELSE
Mnodes(k,l,m)%np%x(1:2) =NodeCoords(1:2,k,l,1) ! Node coordinates are assigned
Mnodes(k,l,m)%np%x(3) =REAL(m-1)*REAL(DZ)/REAL(step) ! Node coordinates are assigned
Expand All @@ -792,18 +788,18 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
Mnodes(k,l,m)%np%tmp=0
IF(m.EQ.1.AND.meshdim.EQ.3) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+1 !zeta minus
IF(l.EQ.1) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+20 !eta minus
IF(k.EQ.irmax(MapCGNS(1)) ) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+300 !xi plus
IF(l.EQ.irmax(MapCGNS(2)) ) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+4000 !eta plus
IF(k.EQ.irmax(1) ) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+300 !xi plus
IF(l.EQ.irmax(2) ) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+4000 !eta plus
IF(k.EQ.1) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+50000 !xi minus
IF(m.EQ.irmax(MapCGNS(3)).AND.meshdim.EQ.3) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+600000 !zeta plus
IF(m.EQ.irmax(3).AND.meshdim.EQ.3) Mnodes(k,l,m)%np%tmp=Mnodes(k,l,m)%np%tmp+600000 !zeta plus
END DO
END DO
END DO
DEALLOCATE(NodeCoords)

DO m=1,irmax(MapCGNS(3))-N_loc,N_loc
DO l=1,irmax(MapCGNS(2))-N_loc,N_loc
DO k=1,irmax(MapCGNS(1))-N_loc,N_loc
DO k=1,irmax(1)-N_loc,N_loc
DO l=1,irmax(2)-N_loc,N_loc
DO m=1,irmax(3)-N_loc,N_loc
CornerNode(1)%np=>Mnodes(k ,l ,m )%np
CornerNode(2)%np=>Mnodes(k+N_loc,l ,m )%np
CornerNode(3)%np=>Mnodes(k+N_loc,l+N_loc,m )%np
Expand Down Expand Up @@ -831,7 +827,7 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
IF(useCurveds.AND.MeshIsAlreadyCurved)THEN !read in curvedNodes
FirstElem_in%nCurvedNodes=(N_loc+1)**3
ALLOCATE(FirstElem_in%curvedNode(FirstElem_in%nCurvedNodes))
DO mm=0,N_loc; DO ll=0,N_loc; DO kk=0,N_loc
DO kk=0,N_loc; DO ll=0,N_loc; DO mm=0,N_loc
FirstElem_in%curvedNode(HexaMapInv(kk,ll,mm))%np=>Mnodes(k+kk,l+ll,m+mm)%np
END DO; END DO; END DO
END IF!useCurveds
Expand All @@ -848,12 +844,12 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
IF (nCGNSBC.LT.1) RETURN ! exit if there are no boundary conditions

ALLOCATE(BCIndex(1:nCGNSBC,6),BCTypeIndex(1:nCGNSBC),countBCs(1:nCGNSBC),nBCFaces(1:nCGNSBC))
SideMap(3,1) = 5 ! xi minus
SideMap(3,2) = 3 ! xi plus
SideMap(1,1) = 2 ! eta minus
SideMap(1,2) = 4 ! eta plus
SideMap(2,1) = 1 ! zeta minus
SideMap(2,2) = 6 ! zeta plus
SideMap(1,1) = 5 ! xi minus
SideMap(1,2) = 3 ! xi plus
SideMap(2,1) = 2 ! eta minus
SideMap(2,2) = 4 ! eta plus
SideMap(3,1) = 1 ! zeta minus
SideMap(3,2) = 6 ! zeta plus

! Read in BC Data
BCIndex=-1
Expand Down Expand Up @@ -885,7 +881,7 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
NormalListSize=nBCElems*MeshDim
ALLOCATE(NormalList(NormalListSize))
CALL CG_BOCO_READ_F(CGNSfile,CGNSBase,iZone,iBC,BCElems,NormalList,iError)
IF(PntSetType.EQ.PointRange)THEN
IF(PntSetType.EQ.CG_PointRange)THEN
IF(ANY(BCElems.LE.0))THEN
WRITE(UNIT_StdOut,'(A)') &
'WARNING: corrupted pointrange found on Boundary '//TRIM(FamilyName)//' ( '//TRIM(CGName)//', '//TRIM(ZoneName)//' )'
Expand All @@ -903,7 +899,7 @@ SUBROUTINE ReadCGNSMeshStruct(FirstElem_in,CGNSFile,CGNSBase,iZone,nZonesGlob,nN
IF (BCindex(iBC,1).EQ.-1) STOP 'ERROR - pointrange does not allow association of BC'
END IF
END IF
IF(PntSetType.EQ.PointList)THEN
IF(PntSetType.EQ.CG_PointList)THEN
IF(nBCElems.EQ.1) THEN
WRITE(UNIT_StdOut,*) 'Warning: Single point BC. Zone No,BC no, BCname, ',iZone,iBC,FamilyName
ELSE
Expand Down Expand Up @@ -1102,7 +1098,7 @@ SUBROUTINE ReadCGNSSurfaceMesh(FirstElem_in,FileName)
! Check structured / unstructured
CALL cg_zone_type_f(CGNSFile, CGNSBase, iZone, ZoneType, iError)
IF (iError .NE. CG_OK) CALL cg_error_exit_f()
IF (ZoneType.EQ.Structured)THEN
IF (ZoneType.EQ.CG_Structured)THEN
STOP 'no structured readin for surface data'
END IF
coordNameCGNS(1) = 'CoordinateX'
Expand All @@ -1125,7 +1121,7 @@ SUBROUTINE ReadCGNSSurfaceMesh(FirstElem_in,FileName)
NodeCoords=0.
DO dm=1,3
CGname=TRIM(CoordNameCGNS(dm))
CALL CG_COORD_READ_F(CGNSfile,CGNSBase,iZone,CGName,RealDouble,one,nNodes,NodeCoords(dm,:),iError)
CALL CG_COORD_READ_F(CGNSfile,CGNSBase,iZone,CGName,CG_RealDouble,one,nNodes,NodeCoords(dm,:),iError)
IF (iError .NE. CG_OK)THEN
WRITE(UNIT_stdOut,*)'ERROR - Could not read coordinate(',dm,'): ',TRIM(CoordNameCGNS(dm))
CALL CG_NCOORDS_F(CGNSFile,CGNSBase,iZone,PhysDim,iError ) ! Here we use PhysDim as nCoords
Expand Down Expand Up @@ -1155,7 +1151,7 @@ SUBROUTINE ReadCGNSSurfaceMesh(FirstElem_in,FileName)
CALL CG_SECTION_READ_F(CGNSfile,CGNSBase,iZone,iSect,CGname,SectionElemType,IndMin,IndMax,nBCElems,ParentDataFlag,iError)
WRITE(UNIT_StdOut,*)' read section',TRIM(CGname)
IF (iError .NE. CG_OK) CALL abortCGNS(__STAMP__,CGNSFile)
IF(SectionElemType .LT. TRI_3) CYCLE !ignore additional sections with data <nDim-1
IF(SectionElemType .LT. CG_TRI_3) CYCLE !ignore additional sections with data <nDim-1
CALL CG_ELEMENTDATASIZE_F(CGNSFile,CGNSBase,iZone,iSect,nSectElems,iError) ! Get number of connectivity values
ALLOCATE(LocalConnect(nSectElems))
ALLOCATE(ParentData(nSectElems,4))
Expand All @@ -1167,7 +1163,7 @@ SUBROUTINE ReadCGNSSurfaceMesh(FirstElem_in,FileName)
iStart=1
DO iSecElem=1,nSectElems
iEnd=iStart
IF(SectionElemType .EQ. MIXED) THEN
IF(SectionElemType .EQ. CG_MIXED) THEN
LocType=LocalConnect(iStart) ! Mixed type elements, read elem type from array
iStart =iStart+1 ! First value is elem type
ELSE
Expand All @@ -1178,9 +1174,9 @@ SUBROUTINE ReadCGNSSurfaceMesh(FirstElem_in,FileName)
iEnd=iEnd+nNodesLoc

LocDim=1
IF(LocType .GT. BAR_3) LocDim=2
IF(LocType .GT. QUAD_9) LocDim=3
IF(LocType .GT. MIXED) LocDim=2 !NGON_n
IF(LocType .GT. CG_BAR_3) LocDim=2
IF(LocType .GT. CG_QUAD_9) LocDim=3
IF(LocType .GT. CG_MIXED) LocDim=2 !NGON_n

IF(LocDim .EQ. 2) THEN ! surface element
iElem=iElem+1
Expand Down