57 INTEGER :: splitdirection
59 TYPE(t_region
),
POINTER :: regionsold(:), regionsnew(:)
62 INTEGER :: ireg, ipatchold
65 INTEGER :: lbound, l1beg, l1end, l2beg, l2end
69 TYPE(t_grid) ,
POINTER :: gridold, gridnew
70 TYPE(t_patch),
POINTER :: patchold, patchnew
74 globalnew => regionsnew(1)%global
77 'SPLT_SplitTopology.F90' )
81 gridold => regionsold(1)%levels(1)%grid
83 DO ipatchold=1,regionsold(1)%nPatches
84 patchold => regionsold(1)%levels(1)%patches(ipatchold)
85 lbound = patchold%lbound
86 l1beg = patchold%l1beg
87 l1end = patchold%l1end
88 l2beg = patchold%l2beg
89 l2end = patchold%l2end
96 DO ireg=1,globalnew%nRegions
98 gridnew => regionsnew(ireg)%levels(1)%grid
101 kend =
kbeg + gridnew%kpc - 1
105 IF (lbound==1 .AND.
ibeg==1)
THEN
106 IF ((l1beg<=
jend .AND. l1end>=
jbeg) .AND. &
107 (l2beg<=kend .AND. l2end>=
kbeg))
THEN
108 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
109 CALL
copypatchdata( regionsnew,patchold,splitdirection,ireg, &
113 ELSE IF (lbound==2 .AND.
iend==gridold%ipc)
THEN
114 IF ((l1beg<=
jend .AND. l1end>=
jbeg) .AND. &
115 (l2beg<=kend .AND. l2end>=
kbeg))
THEN
116 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
117 CALL
copypatchdata( regionsnew,patchold,splitdirection,ireg, &
123 ELSE IF (lbound==3 .AND.
jbeg==1)
THEN
124 IF ((l1beg<=kend .AND. l1end>=
kbeg) .AND. &
125 (l2beg<=
iend .AND. l2end>=
ibeg))
THEN
126 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
127 CALL
copypatchdata( regionsnew,patchold,splitdirection,ireg, &
131 ELSE IF (lbound==4 .AND.
jend==gridold%jpc)
THEN
132 IF ((l1beg<=kend .AND. l1end>=
kbeg) .AND. &
133 (l2beg<=
iend .AND. l2end>=
ibeg))
THEN
134 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
135 CALL
copypatchdata( regionsnew,patchold,splitdirection,ireg, &
141 ELSE IF (lbound==5 .AND.
kbeg==1)
THEN
142 IF ((l1beg<=
iend .AND. l1end>=
ibeg) .AND. &
143 (l2beg<=
jend .AND. l2end>=
jbeg))
THEN
144 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
145 CALL
copypatchdata( regionsnew,patchold,splitdirection,ireg, &
149 ELSE IF (lbound==6 .AND. kend==gridold%kpc)
THEN
150 IF ((l1beg<=
iend .AND. l1end>=
ibeg) .AND. &
151 (l2beg<=
jend .AND. l2end>=
jbeg))
THEN
152 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
153 CALL
copypatchdata( regionsnew,patchold,splitdirection,ireg, &
160 IF (splitdirection == 1)
THEN
162 ELSE IF (splitdirection == 2)
THEN
175 DO ireg=1,globalnew%nRegions-1
176 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
177 ipatch = regionsnew(ireg)%nPatches
178 patchnew => regionsnew(ireg)%levels(1)%patches(ipatch)
179 gridnew => regionsnew(ireg)%levels(1)%grid
180 patchnew%bcType = bc_regionconf
181 patchnew%bcCoupled = 0
182 patchnew%align = .true.
183 patchnew%srcRegion = ireg + 1
185 IF (splitdirection == 1)
THEN
188 patchnew%l1end = gridnew%jpc
190 patchnew%l2end = gridnew%kpc
191 patchnew%srcLbound = 1
192 patchnew%srcL1beg = 1
193 patchnew%srcL1end = gridnew%jpc
194 patchnew%srcL2beg = 1
195 patchnew%srcL2end = gridnew%kpc
196 ELSE IF (splitdirection == 2)
THEN
199 patchnew%l1end = gridnew%kpc
201 patchnew%l2end = gridnew%ipc
202 patchnew%srcLbound = 3
203 patchnew%srcL1beg = 1
204 patchnew%srcL1end = gridnew%kpc
205 patchnew%srcL2beg = 1
206 patchnew%srcL2end = gridnew%ipc
210 patchnew%l1end = gridnew%ipc
212 patchnew%l2end = gridnew%jpc
213 patchnew%srcLbound = 5
214 patchnew%srcL1beg = 1
215 patchnew%srcL1end = gridnew%ipc
216 patchnew%srcL2beg = 1
217 patchnew%srcL2end = gridnew%jpc
223 DO ireg=2,globalnew%nRegions
224 regionsnew(ireg)%nPatches = regionsnew(ireg)%nPatches + 1
225 ipatch = regionsnew(ireg)%nPatches
226 patchnew => regionsnew(ireg)%levels(1)%patches(ipatch)
227 gridnew => regionsnew(ireg)%levels(1)%grid
228 patchnew%bcType = bc_regionconf
229 patchnew%bcCoupled = 0
230 patchnew%align = .true.
231 patchnew%srcRegion = ireg - 1
233 IF (splitdirection == 1)
THEN
236 patchnew%l1end = gridnew%jpc
238 patchnew%l2end = gridnew%kpc
239 patchnew%srcLbound = 2
240 patchnew%srcL1beg = 1
241 patchnew%srcL1end = gridnew%jpc
242 patchnew%srcL2beg = 1
243 patchnew%srcL2end = gridnew%kpc
244 ELSE IF (splitdirection == 2)
THEN
247 patchnew%l1end = gridnew%kpc
249 patchnew%l2end = gridnew%ipc
250 patchnew%srcLbound = 4
251 patchnew%srcL1beg = 1
252 patchnew%srcL1end = gridnew%kpc
253 patchnew%srcL2beg = 1
254 patchnew%srcL2end = gridnew%ipc
258 patchnew%l1end = gridnew%ipc
260 patchnew%l2end = gridnew%jpc
261 patchnew%srcLbound = 6
262 patchnew%srcL1beg = 1
263 patchnew%srcL1end = gridnew%ipc
264 patchnew%srcL2beg = 1
265 patchnew%srcL2end = gridnew%jpc
**********************************************************************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 ibeg
subroutine registerfunction(global, funName, fileName)
**********************************************************************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 knode iend
subroutine splittopology(splitDirection, regionsOld, regionsNew)
**********************************************************************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 knode jend
**********************************************************************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 knode jbeg
subroutine copypatchdata(regionsNew, patchOld, splitDirection, iReg, l1Off, l2Off, l1Cells, l2Cells)
**********************************************************************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 knode kbeg
subroutine deregisterfunction(global)