63 CHARACTER(CHRLEN) :: RCSIdentString = &
64 '$RCSfile: RFLO_ModGridMetrics.F90,v $ $Revision: 1.7 $'
102 TYPE(t_region
) :: region
104 REAL(RFREAL),
POINTER :: xyzref(:,:)
111 INTEGER :: l1b, l1e, l2b, l2e, lc, ijkn, ijkn1, ijkn2, inoff, ijnoff
112 INTEGER :: k1, k2, switch(6,5)
114 REAL(RFREAL),
POINTER :: arclen1(:), arclen2(:)
119 'RFLO_ModGridMetrics.F90' )
123 lbound =
patch%lbound
130 arclen1 =>
patch%arclen1
131 arclen2 =>
patch%arclen2
145 l1b = switch(lbound,1)
146 l1e = switch(lbound,2)
147 l2b = switch(lbound,3)
148 l2e = switch(lbound,4)
149 lc = switch(lbound,5)
153 arclen1(:) = 0._rfreal
154 arclen2(:) = 0._rfreal
160 IF (lbound==1 .OR. lbound==2)
THEN
161 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
162 ijkn1 = indijk(lc,l1-1 ,l2 ,inoff,ijnoff)
163 ijkn2 = indijk(lc,l1 ,l2-1 ,inoff,ijnoff)
164 ELSEIF (lbound==3 .OR. lbound==4)
THEN
165 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
166 ijkn1 = indijk(l2 ,lc,l1-1 ,inoff,ijnoff)
167 ijkn2 = indijk(l2-1 ,lc,l1 ,inoff,ijnoff)
168 ELSEIF (lbound==5 .OR. lbound==6)
THEN
169 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
170 ijkn1 = indijk(l1-1 ,l2 ,lc,inoff,ijnoff)
171 ijkn2 = indijk(l1 ,l2-1 ,lc,inoff,ijnoff)
173 arclen1(k2) = arclen1(k2) + &
174 sqrt((xyzref(xcoord,ijkn)-xyzref(xcoord,ijkn1))**2 + &
175 (xyzref(ycoord,ijkn)-xyzref(ycoord,ijkn1))**2 + &
176 (xyzref(zcoord,ijkn)-xyzref(zcoord,ijkn1))**2)
177 arclen2(k1) = arclen2(k1) + &
178 sqrt((xyzref(xcoord,ijkn)-xyzref(xcoord,ijkn2))**2 + &
179 (xyzref(ycoord,ijkn)-xyzref(ycoord,ijkn2))**2 + &
180 (xyzref(zcoord,ijkn)-xyzref(zcoord,ijkn2))**2)
186 IF (lbound==1 .OR. lbound==2)
THEN
187 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
188 ijkn1 = indijk(lc,l1-1 ,l2 ,inoff,ijnoff)
189 ELSEIF (lbound==3 .OR. lbound==4)
THEN
190 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
191 ijkn1 = indijk(l2 ,lc,l1-1 ,inoff,ijnoff)
192 ELSEIF (lbound==5 .OR. lbound==6)
THEN
193 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
194 ijkn1 = indijk(l1-1 ,l2 ,lc,inoff,ijnoff)
196 arclen1(1) = arclen1(1) + &
197 sqrt((xyzref(xcoord,ijkn)-xyzref(xcoord,ijkn1))**2 + &
198 (xyzref(ycoord,ijkn)-xyzref(ycoord,ijkn1))**2 + &
199 (xyzref(zcoord,ijkn)-xyzref(zcoord,ijkn1))**2)
205 IF (lbound==1 .OR. lbound==2)
THEN
206 ijkn = indijk(lc,l1 ,l2 ,inoff,ijnoff)
207 ijkn2 = indijk(lc,l1 ,l2-1 ,inoff,ijnoff)
208 ELSEIF (lbound==3 .OR. lbound==4)
THEN
209 ijkn = indijk(l2 ,lc,l1 ,inoff,ijnoff)
210 ijkn2 = indijk(l2-1 ,lc,l1 ,inoff,ijnoff)
211 ELSEIF (lbound==5 .OR. lbound==6)
THEN
212 ijkn = indijk(l1 ,l2 ,lc,inoff,ijnoff)
213 ijkn2 = indijk(l1 ,l2-1 ,lc,inoff,ijnoff)
215 arclen2(1) = arclen2(1) + &
216 sqrt((xyzref(xcoord,ijkn)-xyzref(xcoord,ijkn2))**2 + &
217 (xyzref(ycoord,ijkn)-xyzref(ycoord,ijkn2))**2 + &
218 (xyzref(zcoord,ijkn)-xyzref(zcoord,ijkn2))**2)
254 TYPE (t_region
),
POINTER :: regions(:)
260 REAL(RFREAL) :: skewmin
265 global => regions(1)%global
267 'RFLO_ModGridMetrics.F90' )
271 global%skewness = 1._rfreal
275 DO ireg=1,regions(1)%global%nRegions
276 IF (regions(ireg)%procid==regions(ireg)%global%myProcid &
277 .AND. regions(ireg)%active==active)
THEN
289 IF (regions(ireg)%mixtInput%faceEdgeAvg==fe_avg_linear) &
331 TYPE (t_region
),
POINTER :: regions(:)
337 REAL(RFREAL) :: skewmin, volmin
342 global => regions(1)%global
344 'RFLO_ModGridMetrics.F90' )
348 skewmin = global%skewness
349 volmin = global%minVol
351 DO ireg=1,global%nRegions
352 IF (regions(ireg)%procid==global%myProcid .AND. &
353 regions(ireg)%active==active)
THEN
354 skewmin =
min( skewmin,regions(ireg)%levels(1)%grid%skewness )
355 volmin =
min( volmin, regions(ireg)%levels(1)%grid%minVol )
359 global%skewness = skewmin
360 global%minVol = volmin
363 CALL mpi_allreduce( global%skewness,skewmin,1,mpi_rfreal,mpi_min, &
364 global%mpiComm,global%mpierr )
365 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,&
367 global%skewness = skewmin
369 CALL mpi_allreduce( global%minVol,volmin,1,mpi_rfreal,mpi_min, &
370 global%mpiComm,global%mpierr )
371 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,&
373 global%minVol = volmin
**********************************************************************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 rflo_calccellcentroids(region)
subroutine rflo_c2eavgcoeffs(region)
subroutine registerfunction(global, funName, fileName)
subroutine rflo_c2favgcoeffs(region)
subroutine, public rflo_gridqualityglobal(regions)
subroutine rflo_calccontrolvolumes(region)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************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 rflo_calcfacevectors(region)
subroutine rflo_getpatchindicesnodes(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
subroutine rflo_initavgcoeffs(region)
subroutine, public rflo_arclengthpatch(region, patch, xyzRef)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
**********************************************************************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
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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, public rflo_calcgridmetrics(regions)
**********************************************************************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)
subroutine rflo_checkmetrics(iReg, region)
subroutine rflo_calcfacecentroids(region)