62 TYPE(t_region
) :: region
66 CHARACTER(CHRLEN) :: rcsidentstring
67 INTEGER ::
a,
b,
g,hloc,hoffset,
i,ifc,ifcp,ihloc,ivloc,
j,
k,ncells,ncols, &
68 nrows,scount,vloc,voffset
69 REAL(RFREAL) :: lambda,
term,wt0,wt1,wt2
70 REAL(RFREAL),
DIMENSION(:),
POINTER ::
rhs,vol
71 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: fn,lhs,lhsinv
72 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: int1,int20,int21,int31,int32, &
73 int40,int41,int42,int50,int51, &
75 REAL(RFREAL),
DIMENSION(:,:,:,:),
POINTER :: wtlinoles
76 REAL(RFREAL),
DIMENSION(:,:,:,:,:,:),
POINTER :: wtquadoles
83 global => region%global
86 'RFLU_ComputeWeightsOLES.F90')
92 int1 => region%grid%int1OLES
93 int20 => region%grid%int20OLES
94 int21 => region%grid%int21OLES
95 int31 => region%grid%int31OLES
96 int32 => region%grid%int32OLES
97 int40 => region%grid%int40OLES
98 int41 => region%grid%int41OLES
99 int42 => region%grid%int42OLES
100 int50 => region%grid%int50OLES
101 int51 => region%grid%int51OLES
102 int52 => region%grid%int52OLES
104 lhs => region%grid%lhsOLES
105 lhsinv => region%grid%lhsInvOLES
106 rhs => region%grid%rhsOLES
108 wtlinoles => region%grid%wtLinOLES
109 wtquadoles => region%grid%wtQuadOLES
112 vol => region%grid%vol
125 WRITE(*,*)
'### WARNING zeroing I3 ###'
129 lambda = region%grid%deltaOLES*global%dissOLES/ &
130 (2.0_rfreal/3.0_rfreal*
term)**(3.0_rfreal/2.0_rfreal)
137 ncells =
SIZE(region%grid%fsOLES,1)
143 ifc = region%grid%fp2fOLES(ifcp)
145 wt0 = region%grid%rhoOLES(ifc)/region%grid%deltaOLES
146 wt1 = (wt0*lambda)**(2.0_rfreal/3.0_rfreal)
147 wt2 = (wt0*lambda)**(4.0_rfreal/3.0_rfreal)
150 WRITE(*,*) lambda,region%grid%rhoOLES(ifc),region%grid%deltaOLES
151 WRITE(*,*)
'weights: ',wt0,wt1,wt2
158 lhs(:,:) =
REAL(crazy_value_int,kind=rfreal)
168 DO ivloc = 1,3*ncells
169 DO ihloc = 1,3*ncells
170 lhs(ivloc,ihloc) = int20(ifcp,ivloc,ihloc) &
171 + wt1*int21(ifcp,ivloc,ihloc)
181 DO ivloc = 1,3*ncells
182 DO ihloc = 1,9*ncells*ncells
183 hloc = ihloc + hoffset
185 lhs(ivloc,hloc) = 0.0_rfreal
196 DO ivloc = 1,9*ncells*ncells
197 DO ihloc = 1,3*ncells
198 vloc = ivloc + voffset
200 lhs(vloc,ihloc) = 0.0_rfreal
212 DO ivloc = 1,9*ncells*ncells
213 DO ihloc = 1,9*ncells*ncells
214 vloc = ivloc + voffset
215 hloc = ihloc + hoffset
217 lhs(vloc,hloc) = int50(ifcp,ivloc,ihloc) &
218 + wt1*int51(ifcp,ivloc,ihloc) &
219 + wt2*int52(ifcp,ivloc,ihloc)
227 nrows = 3*ncells*(1 + 3*ncells)
228 ncols = 3*ncells*(1 + 3*ncells)
231 WRITE(*,*)
'in RFLU_ComputeWeightsOLES, before SVD'
232 WRITE(*,*) minval(int1),maxval(int1)
233 WRITE(*,*) minval(int20),maxval(int20)
234 WRITE(*,*) minval(int21),maxval(int21)
235 WRITE(*,*) minval(int31),maxval(int31)
236 WRITE(*,*) minval(int32),maxval(int32)
237 WRITE(*,*) minval(int40),maxval(int40)
238 WRITE(*,*) minval(int41),maxval(int41)
239 WRITE(*,*) minval(int42),maxval(int42)
240 WRITE(*,*) minval(int50),maxval(int50)
241 WRITE(*,*) minval(int51),maxval(int51)
242 WRITE(*,*) minval(int52),maxval(int52)
243 WRITE(*,*) minval(lhs),maxval(lhs)
257 WRITE(*,*)
'>>> Matrix singular? <<< ',scount
275 rhs(:) =
REAL(crazy_value_int,kind=rfreal)
283 DO ivloc = 1,3*ncells
284 rhs(ivloc) = int1(
i,ifcp,ivloc)
291 DO ivloc = 1,9*ncells*ncells
292 vloc = ivloc + voffset
294 rhs(vloc) = int40(
i,ifcp,ivloc) &
295 + wt1*int41(
i,ifcp,ivloc) &
296 + wt2*int42(
i,ifcp,ivloc)
327 term = 3.0_rfreal*global%dissOLES/(2.0_rfreal*
term)
329 DO ivloc = 1,3*ncells
331 wtlinoles(
i,
j,
a,ifcp) =
term*
rhs(ivloc)*vol(
a)/fn(xyzmag,ifc)
333 IF ( abs(wtlinoles(
i,
j,
a,ifcp)) < 1.0e-12_rfreal )
THEN
334 wtlinoles(
i,
j,
a,ifcp) = 0.0_rfreal
339 WRITE(*,*)
'l ',minval(wtlinoles(
i,:,:,ifcp)), &
340 maxval(wtlinoles(
i,:,:,ifcp))
345 term = 1.0_rfreal/region%grid%deltaOLES**4
349 DO ivloc = 1,9*ncells*ncells
350 vloc = ivloc + voffset
353 wtquadoles(
i,
j,
k,
b,
g,ifcp) =
term*vol(
b)*vol(
g)*
rhs(vloc)/fn(xyzmag,ifc)
355 IF ( abs(wtquadoles(
i,
j,
k,
b,
g,ifcp)) < 1.0e-12_rfreal )
THEN
356 wtquadoles(
i,
j,
k,
b,
g,ifcp) = 0.0_rfreal
361 WRITE(*,*)
'q ',minval(wtquadoles(
i,:,:,:,:,ifcp)), &
362 maxval(wtquadoles(
i,:,:,:,:,ifcp))
402 WRITE(*,*)
'### WARNING using Jacobs weights ###'
404 wtlinoles(:,:,:,:) = 0.0_rfreal
406 wtlinoles(1,1,1,1) = 0.357_rfreal
407 wtlinoles(1,1,2,1) = -0.357_rfreal
408 wtlinoles(2,2,1,1) = 0.156_rfreal
409 wtlinoles(2,2,2,1) = -0.156_rfreal
410 wtlinoles(3,3,1,1) = 0.156_rfreal
411 wtlinoles(3,3,2,1) = -0.156_rfreal
413 wtlinoles(1,1,1,2) = 0.156_rfreal
414 wtlinoles(1,1,2,2) = -0.156_rfreal
415 wtlinoles(2,2,1,2) = 0.357_rfreal
416 wtlinoles(2,2,2,2) = -0.357_rfreal
417 wtlinoles(3,3,1,2) = 0.156_rfreal
418 wtlinoles(3,3,2,2) = -0.156_rfreal
420 wtlinoles(1,1,1,3) = 0.156_rfreal
421 wtlinoles(1,1,2,3) = -0.156_rfreal
422 wtlinoles(2,2,1,3) = 0.156_rfreal
423 wtlinoles(2,2,2,3) = -0.156_rfreal
424 wtlinoles(3,3,1,3) = 0.357_rfreal
425 wtlinoles(3,3,2,3) = -0.357_rfreal
427 wtquadoles(:,:,:,:,:,:) = 0.0_rfreal
429 wtquadoles(1,1,1,1,1,1) = 0.388_rfreal
430 wtquadoles(1,1,1,1,2,1) = 0.135_rfreal
431 wtquadoles(1,1,1,2,1,1) = 0.135_rfreal
432 wtquadoles(1,1,1,2,2,1) = 0.388_rfreal
434 wtquadoles(2,1,2,1,1,1) = 0.180_rfreal
435 wtquadoles(2,2,1,1,1,1) = 0.180_rfreal
436 wtquadoles(2,1,2,1,2,1) = 0.087_rfreal
437 wtquadoles(2,2,1,1,2,1) = 0.087_rfreal
438 wtquadoles(2,1,2,2,1,1) = 0.087_rfreal
439 wtquadoles(2,2,1,2,1,1) = 0.087_rfreal
440 wtquadoles(2,1,2,2,2,1) = 0.180_rfreal
441 wtquadoles(2,2,1,2,2,1) = 0.180_rfreal
443 wtquadoles(3,1,3,1,1,1) = 0.180_rfreal
444 wtquadoles(3,3,1,1,1,1) = 0.180_rfreal
445 wtquadoles(3,1,3,1,2,1) = 0.087_rfreal
446 wtquadoles(3,3,1,1,2,1) = 0.087_rfreal
447 wtquadoles(3,1,3,2,1,1) = 0.087_rfreal
448 wtquadoles(3,3,1,2,1,1) = 0.087_rfreal
449 wtquadoles(3,1,3,2,2,1) = 0.180_rfreal
450 wtquadoles(3,3,1,2,2,1) = 0.180_rfreal
452 wtquadoles(2,2,2,1,1,2) = 0.388_rfreal
453 wtquadoles(2,2,2,1,2,2) = 0.135_rfreal
454 wtquadoles(2,2,2,2,1,2) = 0.135_rfreal
455 wtquadoles(2,2,2,2,2,2) = 0.388_rfreal
457 wtquadoles(1,1,2,1,1,2) = 0.180_rfreal
458 wtquadoles(1,2,1,1,1,2) = 0.180_rfreal
459 wtquadoles(1,1,2,1,2,2) = 0.087_rfreal
460 wtquadoles(1,2,1,1,2,2) = 0.087_rfreal
461 wtquadoles(1,1,2,2,1,2) = 0.087_rfreal
462 wtquadoles(1,2,1,2,1,2) = 0.087_rfreal
463 wtquadoles(1,1,2,2,2,2) = 0.180_rfreal
464 wtquadoles(1,2,1,2,2,2) = 0.180_rfreal
466 wtquadoles(3,2,3,1,1,2) = 0.180_rfreal
467 wtquadoles(3,3,2,1,1,2) = 0.180_rfreal
468 wtquadoles(3,2,3,1,2,2) = 0.087_rfreal
469 wtquadoles(3,3,2,1,2,2) = 0.087_rfreal
470 wtquadoles(3,2,3,2,1,2) = 0.087_rfreal
471 wtquadoles(3,3,2,2,1,2) = 0.087_rfreal
472 wtquadoles(3,2,3,2,2,2) = 0.180_rfreal
473 wtquadoles(3,3,2,2,2,2) = 0.180_rfreal
475 wtquadoles(3,3,3,1,1,3) = 0.388_rfreal
476 wtquadoles(3,3,3,1,2,3) = 0.135_rfreal
477 wtquadoles(3,3,3,2,1,3) = 0.135_rfreal
478 wtquadoles(3,3,3,2,2,3) = 0.388_rfreal
480 wtquadoles(1,1,3,1,1,3) = 0.180_rfreal
481 wtquadoles(1,3,1,1,1,3) = 0.180_rfreal
482 wtquadoles(1,1,3,1,2,3) = 0.087_rfreal
483 wtquadoles(1,3,1,1,2,3) = 0.087_rfreal
484 wtquadoles(1,1,3,2,1,3) = 0.087_rfreal
485 wtquadoles(1,3,1,2,1,3) = 0.087_rfreal
486 wtquadoles(1,1,3,2,2,3) = 0.180_rfreal
487 wtquadoles(1,3,1,2,2,3) = 0.180_rfreal
489 wtquadoles(2,2,3,1,1,3) = 0.180_rfreal
490 wtquadoles(2,3,2,1,1,3) = 0.180_rfreal
491 wtquadoles(2,2,3,1,2,3) = 0.087_rfreal
492 wtquadoles(2,3,2,1,2,3) = 0.087_rfreal
493 wtquadoles(2,2,3,2,1,3) = 0.087_rfreal
494 wtquadoles(2,3,2,2,1,3) = 0.087_rfreal
495 wtquadoles(2,2,3,2,2,3) = 0.180_rfreal
496 wtquadoles(2,3,2,2,2,3) = 0.180_rfreal
501 WRITE(*,*)
'### WARNING using central weights ###'
502 wtlinoles(:,:,:,:) = 0.0_rfreal
504 wtlinoles(1,1,1,1) = 0.5_rfreal
505 wtlinoles(1,1,2,1) = -0.5_rfreal
506 wtlinoles(2,2,1,1) = 0.5_rfreal
507 wtlinoles(2,2,2,1) = -0.5_rfreal
508 wtlinoles(3,3,1,1) = 0.5_rfreal
509 wtlinoles(3,3,2,1) = -0.5_rfreal
511 wtlinoles(1,1,1,2) = 0.5_rfreal
512 wtlinoles(1,1,2,2) = -0.5_rfreal
513 wtlinoles(2,2,1,2) = 0.5_rfreal
514 wtlinoles(2,2,2,2) = -0.5_rfreal
515 wtlinoles(3,3,1,2) = 0.5_rfreal
516 wtlinoles(3,3,2,2) = -0.5_rfreal
518 wtlinoles(1,1,1,3) = 0.5_rfreal
519 wtlinoles(1,1,2,3) = -0.5_rfreal
520 wtlinoles(2,2,1,3) = 0.5_rfreal
521 wtlinoles(2,2,2,3) = -0.5_rfreal
522 wtlinoles(3,3,1,3) = 0.5_rfreal
523 wtlinoles(3,3,2,3) = -0.5_rfreal
525 wtquadoles(:,:,:,:,:,:) = 0.0_rfreal
529 wtquadoles(1,1,1,1,1,1) = 0.250_rfreal
530 wtquadoles(1,1,1,1,2,1) = 0.250_rfreal
531 wtquadoles(1,1,1,2,2,1) = 0.250_rfreal
532 wtquadoles(1,1,1,2,1,1) = 0.250_rfreal
534 wtquadoles(2,1,2,1,1,1) = 0.125_rfreal
535 wtquadoles(2,1,2,1,2,1) = 0.125_rfreal
536 wtquadoles(2,2,1,1,1,1) = 0.125_rfreal
537 wtquadoles(2,2,1,2,1,1) = 0.125_rfreal
538 wtquadoles(2,1,2,2,1,1) = 0.125_rfreal
539 wtquadoles(2,2,1,1,2,1) = 0.125_rfreal
540 wtquadoles(2,1,2,2,2,1) = 0.125_rfreal
541 wtquadoles(2,2,1,2,2,1) = 0.125_rfreal
543 wtquadoles(3,1,3,1,1,1) = 0.125_rfreal
544 wtquadoles(3,1,3,1,2,1) = 0.125_rfreal
545 wtquadoles(3,3,1,1,1,1) = 0.125_rfreal
546 wtquadoles(3,3,1,2,1,1) = 0.125_rfreal
547 wtquadoles(3,1,3,2,1,1) = 0.125_rfreal
548 wtquadoles(3,3,1,1,2,1) = 0.125_rfreal
549 wtquadoles(3,1,3,2,2,1) = 0.125_rfreal
550 wtquadoles(3,3,1,2,2,1) = 0.125_rfreal
554 wtquadoles(2,2,2,1,1,2) = 0.250_rfreal
555 wtquadoles(2,2,2,1,2,2) = 0.250_rfreal
556 wtquadoles(2,2,2,2,2,2) = 0.250_rfreal
557 wtquadoles(2,2,2,2,1,2) = 0.250_rfreal
559 wtquadoles(1,1,2,1,1,2) = 0.125_rfreal
560 wtquadoles(1,1,2,1,2,2) = 0.125_rfreal
561 wtquadoles(1,2,1,1,1,2) = 0.125_rfreal
562 wtquadoles(1,2,1,2,1,2) = 0.125_rfreal
563 wtquadoles(1,1,2,2,1,2) = 0.125_rfreal
564 wtquadoles(1,2,1,1,2,2) = 0.125_rfreal
565 wtquadoles(1,1,2,2,2,2) = 0.125_rfreal
566 wtquadoles(1,2,1,2,2,2) = 0.125_rfreal
568 wtquadoles(3,2,3,1,1,2) = 0.125_rfreal
569 wtquadoles(3,2,3,1,2,2) = 0.125_rfreal
570 wtquadoles(3,3,2,1,1,2) = 0.125_rfreal
571 wtquadoles(3,3,2,2,1,2) = 0.125_rfreal
572 wtquadoles(3,2,3,2,1,2) = 0.125_rfreal
573 wtquadoles(3,3,2,1,2,2) = 0.125_rfreal
574 wtquadoles(3,2,3,2,2,2) = 0.125_rfreal
575 wtquadoles(3,3,2,2,2,2) = 0.125_rfreal
579 wtquadoles(3,3,3,1,1,3) = 0.250_rfreal
580 wtquadoles(3,3,3,1,2,3) = 0.250_rfreal
581 wtquadoles(3,3,3,2,2,3) = 0.250_rfreal
582 wtquadoles(3,3,3,2,1,3) = 0.250_rfreal
584 wtquadoles(1,1,3,1,1,3) = 0.125_rfreal
585 wtquadoles(1,1,3,1,2,3) = 0.125_rfreal
586 wtquadoles(1,3,1,1,1,3) = 0.125_rfreal
587 wtquadoles(1,3,1,2,1,3) = 0.125_rfreal
588 wtquadoles(1,1,3,2,1,3) = 0.125_rfreal
589 wtquadoles(1,3,1,1,2,3) = 0.125_rfreal
590 wtquadoles(1,1,3,2,2,3) = 0.125_rfreal
591 wtquadoles(1,3,1,2,2,3) = 0.125_rfreal
593 wtquadoles(2,2,3,1,1,3) = 0.125_rfreal
594 wtquadoles(2,2,3,1,2,3) = 0.125_rfreal
595 wtquadoles(2,3,2,1,1,3) = 0.125_rfreal
596 wtquadoles(2,3,2,2,1,3) = 0.125_rfreal
597 wtquadoles(2,2,3,2,1,3) = 0.125_rfreal
598 wtquadoles(2,3,2,1,2,3) = 0.125_rfreal
599 wtquadoles(2,2,3,2,2,3) = 0.125_rfreal
600 wtquadoles(2,3,2,2,2,3) = 0.125_rfreal
subroutine rflu_invertmatrixsvd(global, nRows, nCols, a, aInv, sCount)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_getqposinvoles(loc, nCells, j, k, b, g)
subroutine, public rflu_getlposinvoles(loc, j, a)
subroutine rflu_computeweightsoles(region)
subroutine deregisterfunction(global)