54 TYPE(t_region
),
POINTER :: regions(:)
57 INTEGER :: ireg, ipatch
60 CHARACTER(2*CHRLEN+4) :: fname
62 INTEGER :: bctype, srcl1beg, srcl1end, srcl2beg, srcl2end, errorflag
70 global => regions(1)%global
73 'RFLO_WriteRegionTopology.F90' )
77 fname = trim(global%outDir)//trim(global%casename)//
'.top'
78 OPEN(if_topol,file=fname,
form=
'formatted',
status=
'unknown',iostat=errorflag)
79 global%error = errorflag
80 IF (global%error /= 0) &
81 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
83 WRITE(if_topol,
'(A)',err=10)
'# topology for: '//trim(global%casename)
84 WRITE(if_topol,
'(A)',err=10)
'#'
85 WRITE(if_topol, * ,err=10) global%nRegions
89 DO ireg=1,global%nRegions
90 WRITE(if_topol,*,err=10) ireg,regions(ireg)%nGridLevels
91 WRITE(if_topol,*,err=10) regions(ireg)%nPatches, &
92 regions(ireg)%levels(1)%grid%ipc, &
93 regions(ireg)%levels(1)%grid%jpc, &
94 regions(ireg)%levels(1)%grid%kpc
98 DO ipatch=1,regions(ireg)%nPatches
100 patch => regions(ireg)%levels(1)%patches(ipatch)
101 bctype =
patch%bcType
105 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
106 (bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range) .OR. &
107 (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range) .OR. &
108 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
109 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
110 IF (
patch%align)
THEN
111 srcl1beg = -
patch%srcL1beg
112 srcl1end = -
patch%srcL1end
113 srcl2beg =
patch%srcL2beg
114 srcl2end =
patch%srcL2end
116 srcl1beg =
patch%srcL1beg
117 srcl1end =
patch%srcL1end
118 srcl2beg = -
patch%srcL2beg
119 srcl2end = -
patch%srcL2end
121 WRITE(if_topol,*,err=10) &
126 srcl1beg ,srcl1end , &
127 srcl2beg ,srcl2end , &
133 WRITE(if_topol,*,err=10) &
137 0,0,0,0,0,0 ,
patch%bcCoupled
143 CLOSE(if_topol,iostat=errorflag)
144 global%error = errorflag
145 IF (global%error /= 0) &
146 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
154 CALL
errorstop( global,err_file_write,__line__,
'File: '//trim(fname) )
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
subroutine rflo_writeregiontopology(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)