55 TYPE(t_region
),
POINTER :: regions(:)
58 INTEGER :: ireg, ilev, ipatch
61 INTEGER :: nlevels, npatches, ipc, jpc, kpc, bctype, errorflag
68 global => regions(1)%global
71 'RFLO_CopyTopologyLevels.F90' )
75 DO ireg=1,global%nRegions
76 IF (regions(ireg)%procid==global%myProcid .AND. &
77 regions(ireg)%active==active)
THEN
79 nlevels = regions(ireg)%nGridLevels
80 npatches = regions(ireg)%nPatches
85 ipc = regions(ireg)%levels(ilev-1)%grid%ipc
86 jpc = regions(ireg)%levels(ilev-1)%grid%jpc
87 kpc = regions(ireg)%levels(ilev-1)%grid%kpc
88 regions(ireg)%levels(ilev)%grid%ipc = ipc/2
89 regions(ireg)%levels(ilev)%grid%jpc = jpc/2
90 regions(ireg)%levels(ilev)%grid%kpc = kpc/2
94 ALLOCATE( regions(ireg)%levels(ilev)%patches(npatches),stat=errorflag )
95 global%error = errorflag
96 IF (global%error /= 0) CALL
errorstop( global,err_allocate,&
100 patchprev => regions(ireg)%levels(ilev-1)%patches(ipatch)
101 patch => regions(ireg)%levels(ilev )%patches(ipatch)
105 patch%bcType = patchprev%bcType
106 patch%bcCoupled = patchprev%bcCoupled
107 patch%srcRegion = patchprev%srcRegion
108 patch%srcPatch = patchprev%srcPatch
109 patch%align = patchprev%align
110 patch%lbound = patchprev%lbound
111 patch%l1beg = (patchprev%l1beg-1)/2 + 1
112 patch%l1end = patchprev%l1end/2
113 patch%l2beg = (patchprev%l2beg-1)/2 + 1
114 patch%l2end = patchprev%l2end/2
115 patch%srcLbound = patchprev%srcLbound
117 patch%mixt%bcSet = patchprev%mixt%bcSet
118 patch%mixt%distrib = patchprev%mixt%distrib
119 patch%mixt%nData = patchprev%mixt%nData
120 patch%mixt%nSwitches = patchprev%mixt%nSwitches
124 bctype =
patch%bcType
126 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR.&
127 (bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range) .OR.&
128 (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range) .OR.&
129 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR.&
130 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
132 patch%srcL1beg = (patchprev%srcL1beg-1)/2 + 1
133 patch%srcL1end = patchprev%srcL1end/2
135 patch%srcL1beg = patchprev%srcL1beg/2
136 patch%srcL1end = (patchprev%srcL1end-1)/2 + 1
139 patch%srcL2beg = (patchprev%srcL2beg-1)/2 + 1
140 patch%srcL2end = patchprev%srcL2end/2
142 patch%srcL2beg = patchprev%srcL2beg/2
143 patch%srcL2end = (patchprev%srcL2end-1)/2 + 1
146 patch%srcL1beg = patchprev%srcL1beg
147 patch%srcL1end = patchprev%srcL1end
148 patch%srcL2beg = patchprev%srcL2beg
149 patch%srcL2end = patchprev%srcL2end
154 IF ((bctype>=bc_slipwall .AND. bctype<=bc_slipwall +bc_range) .OR.&
155 (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range) .OR.&
156 (bctype>=bc_inflow .AND. bctype<=bc_inflow +bc_range) .OR.&
157 (bctype>=bc_outflow .AND. bctype<=bc_outflow +bc_range) .OR.&
158 (bctype>=bc_farfield .AND. bctype<=bc_farfield +bc_range) .OR.&
159 (bctype>=bc_injection .AND. bctype<=bc_injection +bc_range))
THEN
subroutine registerfunction(global, funName, fileName)
subroutine rflo_copytopologylevels(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine rflo_copyboundarydata(global, patchPrev, patch)
subroutine deregisterfunction(global)