61 :: bccsound, & !< at cell bary centers
122 INTEGER :: flavour = undefined
124 :: density => null(), &
125 velocity => null(), &
162 CLASS(physics_eulerisotherm),
INTENT(INOUT) :: this
163 CLASS(mesh_base),
INTENT(IN) :: Mesh
164 TYPE(Dict_TYP),
POINTER,
INTENT(IN) :: config, IO
166 INTEGER :: next_idx,err
171 this%VNUM = this%VDIM + 1
174 CALL getattr(config,
"cs", this%csiso, 0.0)
177 ALLOCATE(this%pvarname(this%VNUM),this%cvarname(this%VNUM),this%bccsound, &
181 CALL this%Error(
"InitPhysics_eulerisotherm",
"Unable to allocate memory.")
187 this%pvarname(this%DENSITY) =
"density" 188 this%cvarname(this%DENSITY) =
"density" 191 IF (this%VDIM.GE.2)
THEN 198 IF (this%VDIM.EQ.3)
THEN 211 IF (btest(mesh%VECTOR_COMPONENTS,0))
THEN 212 this%pvarname(next_idx) =
"xvelocity" 213 this%cvarname(next_idx) =
"xmomentum" 214 next_idx = next_idx + 1
216 IF (btest(mesh%VECTOR_COMPONENTS,1))
THEN 217 this%pvarname(next_idx) =
"yvelocity" 218 this%cvarname(next_idx) =
"ymomentum" 219 next_idx = next_idx + 1
221 IF (btest(mesh%VECTOR_COMPONENTS,2))
THEN 222 this%pvarname(next_idx) =
"zvelocity" 223 this%cvarname(next_idx) =
"zmomentum" 230 IF(this%csiso.GT.0.)
THEN 231 this%bccsound%data1d(:) = this%csiso
232 this%fcsound%data1d(:) = this%csiso
234 this%bccsound%data1d(:) = 0.
235 this%fcsound%data1d(:) = 0.
239 this%supports_absorbing = .true.
241 CALL this%EnableOutput(mesh,config,io)
247 CLASS(physics_eulerisotherm),
INTENT(INOUT) :: this
249 CALL this%PrintConfiguration()
256 CLASS(physics_eulerisotherm),
INTENT(INOUT) :: this
257 CLASS(mesh_base),
INTENT(IN) :: Mesh
258 TYPE(Dict_TYP),
POINTER,
INTENT(IN) :: config, IO
263 CALL getattr(config,
"output/bccsound", valwrite, 0)
264 IF (valwrite .EQ. 1) &
265 CALL setattr(io,
"bccsound",&
266 this%bccsound%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX))
268 CALL getattr(config,
"output/fcsound", valwrite, 0)
269 IF (valwrite .EQ. 1) &
270 CALL setattr(io,
"fcsound",&
271 this%fcsound%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:))
278 CLASS(physics_eulerisotherm),
INTENT(IN) :: this
279 CLASS(marray_compound),
POINTER :: new_sv
280 INTEGER,
OPTIONAL,
INTENT(IN) :: flavour,num
283 SELECT TYPE(sv => new_sv)
296 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX), &
297 INTENT(IN) :: bccsound
299 this%bccsound = bccsound
308 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX,Mesh%NFACES), &
309 INTENT(IN) :: fcsound
311 this%fcsound = fcsound
321 SELECT TYPE(c => cvar)
323 SELECT TYPE(p => pvar)
325 IF (c%flavour.EQ.conservative.AND.p%flavour.EQ.primitive)
THEN 327 SELECT CASE(
this%VDIM)
329 CALL cons2prim(c%density%data1d(:),c%momentum%data1d(:), &
330 p%density%data1d(:),p%velocity%data1d(:))
332 CALL cons2prim(c%density%data1d(:),c%momentum%data2d(:,1), &
333 c%momentum%data2d(:,2),p%density%data1d(:), &
334 p%velocity%data2d(:,1),p%velocity%data2d(:,2))
336 CALL cons2prim(c%density%data1d(:),c%momentum%data2d(:,1), &
337 c%momentum%data2d(:,2),c%momentum%data2d(:,3), &
338 p%density%data1d(:),p%velocity%data2d(:,1), &
339 p%velocity%data2d(:,2),p%velocity%data2d(:,3))
353 INTEGER,
INTENT(IN) :: i1,i2,j1,j2,k1,k2
356 SELECT TYPE(c => cvar)
358 SELECT TYPE(p => pvar)
360 IF (c%flavour.EQ.conservative.AND.p%flavour.EQ.primitive)
THEN 361 SELECT CASE (c%density%RANK)
364 SELECT CASE(
this%VDIM)
366 CALL cons2prim(c%density%data3d(i1:i2,j1:j2,k1:k2), &
367 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
368 p%density%data3d(i1:i2,j1:j2,k1:k2), &
369 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1))
371 CALL cons2prim(c%density%data3d(i1:i2,j1:j2,k1:k2), &
372 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
373 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2), &
374 p%density%data3d(i1:i2,j1:j2,k1:k2), &
375 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
376 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2))
378 CALL cons2prim(c%density%data3d(i1:i2,j1:j2,k1:k2), &
379 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
380 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2), &
381 c%momentum%data4d(i1:i2,j1:j2,k1:k2,3), &
382 p%density%data3d(i1:i2,j1:j2,k1:k2), &
383 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
384 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2), &
385 p%velocity%data4d(i1:i2,j1:j2,k1:k2,3))
389 SELECT CASE(
this%VDIM)
391 CALL cons2prim(c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
392 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
393 p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
394 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1))
396 CALL cons2prim(c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
397 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
398 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2), &
399 p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
400 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
401 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2))
403 CALL cons2prim(c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
404 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
405 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2), &
406 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,3), &
407 p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
408 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
409 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2), &
410 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,3))
429 SELECT TYPE(p => pvar)
431 SELECT TYPE(c => cvar)
433 IF (p%flavour.EQ.primitive.AND.c%flavour.EQ.conservative)
THEN 435 SELECT CASE(
this%VDIM)
437 CALL prim2cons(p%density%data1d(:),p%velocity%data1d(:), &
438 c%density%data1d(:),c%momentum%data1d(:))
440 CALL prim2cons(p%density%data1d(:),p%velocity%data2d(:,1), &
441 p%velocity%data2d(:,2),c%density%data1d(:), &
442 c%momentum%data2d(:,1),c%momentum%data2d(:,2))
444 CALL prim2cons(p%density%data1d(:),p%velocity%data2d(:,1), &
445 p%velocity%data2d(:,2),p%velocity%data2d(:,3), &
446 c%density%data1d(:),c%momentum%data2d(:,1), &
447 c%momentum%data2d(:,2),c%momentum%data2d(:,3))
461 INTEGER,
INTENT(IN) :: i1,i2,j1,j2,k1,k2
464 SELECT TYPE(p => pvar)
466 SELECT TYPE(c => cvar)
468 IF (p%flavour.EQ.primitive.AND.c%flavour.EQ.conservative)
THEN 469 SELECT CASE (p%density%RANK)
472 SELECT CASE(
this%VDIM)
474 CALL prim2cons(p%density%data3d(i1:i2,j1:j2,k1:k2), &
475 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
476 c%density%data3d(i1:i2,j1:j2,k1:k2), &
477 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1))
479 CALL prim2cons(p%density%data3d(i1:i2,j1:j2,k1:k2), &
480 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
481 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2), &
482 c%density%data3d(i1:i2,j1:j2,k1:k2), &
483 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
484 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2))
486 CALL prim2cons(p%density%data3d(i1:i2,j1:j2,k1:k2), &
487 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
488 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2), &
489 p%velocity%data4d(i1:i2,j1:j2,k1:k2,3), &
490 c%density%data3d(i1:i2,j1:j2,k1:k2), &
491 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
492 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2), &
493 c%momentum%data4d(i1:i2,j1:j2,k1:k2,3))
497 SELECT CASE(
this%VDIM)
499 CALL prim2cons(p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
500 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
501 c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
502 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1))
504 CALL prim2cons(p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
505 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
506 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2), &
507 c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
508 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
509 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2))
511 CALL prim2cons(p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
512 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
513 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2), &
514 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,3), &
515 c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
516 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
517 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2), &
518 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,3))
542 SELECT TYPE(p => pvar)
547 IF (mesh%ROTSYM.EQ.n) m = m + 1
549 minwav%data2d(:,n),maxwav%data2d(:,n))
561 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX,Mesh%NFACES,this%VNUM), &
562 INTENT(IN) :: prim,cons
569 IF (mesh%INUM.GT.1)
THEN 574 minwav%data4d(:,:,:,n),maxwav%data4d(:,:,:,n))
576 DO k=mesh%KGMIN,mesh%KGMAX
577 DO j=mesh%JGMIN,mesh%JGMAX
579 DO i=mesh%IMIN+mesh%IM1,mesh%IMAX
581 minwav%data4d(i,j,k,n) = min(0.0,
this%tmp(i+mesh%IP1,j,k) ,minwav%data4d(i,j,k,n))
582 maxwav%data4d(i,j,k,n) = max(0.0,
this%tmp1(i+mesh%IP1,j,k),maxwav%data4d(i,j,k,n))
589 IF (mesh%ROTSYM.EQ.1) m = m + 1
592 IF (mesh%JNUM.GT.1)
THEN 597 minwav%data4d(:,:,:,n),maxwav%data4d(:,:,:,n))
599 DO k=mesh%KGMIN,mesh%KGMAX
600 DO j=mesh%JMIN+mesh%JM1,mesh%JMAX
602 DO i=mesh%IGMIN,mesh%IGMAX
604 minwav%data4d(i,j,k,n) = min(0.0,
this%tmp(i,j+mesh%JP1,k),minwav%data4d(i,j,k,n))
605 maxwav%data4d(i,j,k,n) = max(0.0,
this%tmp1(i,j+mesh%JP1,k),maxwav%data4d(i,j,k,n))
612 IF (mesh%ROTSYM.EQ.2) m = m + 1
615 IF (mesh%KNUM.GT.1)
THEN 620 minwav%data4d(:,:,:,n),maxwav%data4d(:,:,:,n))
622 DO k=mesh%KMIN+mesh%KM1,mesh%KMAX
623 DO j=mesh%JGMIN,mesh%JGMAX
625 DO i=mesh%IGMIN,mesh%IGMAX
627 minwav%data4d(i,j,k,n) = min(0.0,
this%tmp(i,j,k+mesh%KP1),minwav%data4d(i,j,k,n))
628 maxwav%data4d(i,j,k,n) = max(0.0,
this%tmp1(i,j,k+mesh%KP1),maxwav%data4d(i,j,k,n))
698 IF (mesh%Geometry%GetType().NE.cartesian)
THEN 699 SELECT TYPE(p => pvar)
701 SELECT TYPE(c => cvar)
703 SELECT TYPE(s => sterm)
706 s%density%data1d(:) = 0.0
707 SELECT CASE(mesh%VECTOR_COMPONENTS)
711 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
712 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
713 p%velocity%data2d(:,1),0.0,0.0, &
714 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
719 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
720 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
721 0.0,p%velocity%data2d(:,1),0.0, &
722 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
727 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
728 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
729 0.0,0.0,p%velocity%data2d(:,1), &
730 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
732 CASE(ior(vector_x,vector_y))
736 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
737 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
738 p%velocity%data2d(:,1),p%velocity%data2d(:,2),0.0, &
739 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
740 c%momentum%data2d(:,2),0.0)
743 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
744 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
745 p%velocity%data2d(:,1),p%velocity%data2d(:,2),0.0, &
746 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
747 c%momentum%data2d(:,1),0.0)
748 CASE(ior(vector_x,vector_z))
752 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
753 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
754 p%velocity%data2d(:,1),0.0,p%velocity%data2d(:,2), &
755 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
756 0.0,c%momentum%data2d(:,2))
759 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
760 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
761 p%velocity%data2d(:,1),0.0,p%velocity%data2d(:,2), &
762 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
763 c%momentum%data2d(:,1),0.0)
764 CASE(ior(vector_y,vector_z))
768 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
769 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
770 0.0,p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
771 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
772 0.0,c%momentum%data2d(:,2))
775 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
776 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
777 0.0,p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
778 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
779 0.0,c%momentum%data2d(:,1))
780 CASE(ior(ior(vector_x,vector_y),vector_z))
783 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
784 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
785 p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
786 p%velocity%data2d(:,3), &
787 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
788 c%momentum%data2d(:,2),c%momentum%data2d(:,3))
791 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
792 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
793 p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
794 p%velocity%data2d(:,3), &
795 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
796 c%momentum%data2d(:,1),c%momentum%data2d(:,3))
799 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
800 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
801 p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
802 p%velocity%data2d(:,3), &
803 p%density%data1d(:)*
this%bccsound%data1d(:)**2, &
804 c%momentum%data2d(:,1),c%momentum%data2d(:,2))
814 IF (mesh%INUM.GT.1)
THEN 815 sterm%data4d(mesh%IGMIN:mesh%IMIN+mesh%IM1,:,:,:) = 0.0
816 sterm%data4d(mesh%IMAX+mesh%IP1:mesh%IGMAX,:,:,:) = 0.0
818 IF (mesh%JNUM.GT.1)
THEN 819 sterm%data4d(:,mesh%JGMIN:mesh%JMIN+mesh%JM1,:,:) = 0.0
820 sterm%data4d(:,mesh%JMAX+mesh%JP1:mesh%JGMAX,:,:) = 0.0
822 IF (mesh%KNUM.GT.1)
THEN 824 sterm%data3d(:,mesh%KGMIN:mesh%KMIN+mesh%KM1,:) = 0.0
825 sterm%data3d(:,mesh%KMAX+mesh%KP1:mesh%KGMAX,:) = 0.0
831 PURE SUBROUTINE calcfluxesx(this,Mesh,nmin,nmax,prim,cons,xfluxes)
836 INTEGER,
INTENT(IN) :: nmin,nmax
839 SELECT TYPE(p => prim)
841 SELECT TYPE(c => cons)
843 SELECT TYPE(f => xfluxes)
845 SELECT CASE(
this%VDIM)
848 p%density%data2d(:,nmin:nmax), &
849 p%velocity%data3d(:,nmin:nmax,1), &
850 c%momentum%data3d(:,nmin:nmax,1), &
851 f%density%data2d(:,nmin:nmax), &
852 f%momentum%data3d(:,nmin:nmax,1))
855 p%density%data2d(:,nmin:nmax), &
856 p%velocity%data3d(:,nmin:nmax,1), &
857 c%momentum%data3d(:,nmin:nmax,1), &
858 c%momentum%data3d(:,nmin:nmax,2), &
859 f%density%data2d(:,nmin:nmax), &
860 f%momentum%data3d(:,nmin:nmax,1), &
861 f%momentum%data3d(:,nmin:nmax,2))
864 p%density%data2d(:,nmin:nmax), &
865 p%velocity%data3d(:,nmin:nmax,1), &
866 c%momentum%data3d(:,nmin:nmax,1), &
867 c%momentum%data3d(:,nmin:nmax,2), &
868 c%momentum%data3d(:,nmin:nmax,3), &
869 f%density%data2d(:,nmin:nmax), &
870 f%momentum%data3d(:,nmin:nmax,1), &
871 f%momentum%data3d(:,nmin:nmax,2), &
872 f%momentum%data3d(:,nmin:nmax,3))
880 PURE SUBROUTINE calcfluxesy(this,Mesh,nmin,nmax,prim,cons,yfluxes)
885 INTEGER,
INTENT(IN) :: nmin,nmax
888 SELECT TYPE(p => prim)
890 SELECT TYPE(c => cons)
892 SELECT TYPE(f => yfluxes)
894 SELECT CASE(
this%VDIM)
897 p%density%data2d(:,nmin:nmax), &
898 p%velocity%data3d(:,nmin:nmax,1), &
899 c%momentum%data3d(:,nmin:nmax,1), &
900 f%density%data2d(:,nmin:nmax), &
901 f%momentum%data3d(:,nmin:nmax,1))
904 p%density%data2d(:,nmin:nmax), &
905 p%velocity%data3d(:,nmin:nmax,2), &
906 c%momentum%data3d(:,nmin:nmax,2), &
907 c%momentum%data3d(:,nmin:nmax,1), &
908 f%density%data2d(:,nmin:nmax), &
909 f%momentum%data3d(:,nmin:nmax,2), &
910 f%momentum%data3d(:,nmin:nmax,1))
913 p%density%data2d(:,nmin:nmax), &
914 p%velocity%data3d(:,nmin:nmax,2), &
915 c%momentum%data3d(:,nmin:nmax,2), &
916 c%momentum%data3d(:,nmin:nmax,1), &
917 c%momentum%data3d(:,nmin:nmax,3), &
918 f%density%data2d(:,nmin:nmax), &
919 f%momentum%data3d(:,nmin:nmax,2), &
920 f%momentum%data3d(:,nmin:nmax,1), &
921 f%momentum%data3d(:,nmin:nmax,3))
929 PURE SUBROUTINE calcfluxesz(this,Mesh,nmin,nmax,prim,cons,zfluxes)
934 INTEGER,
INTENT(IN) :: nmin,nmax
937 SELECT TYPE(p => prim)
939 SELECT TYPE(c => cons)
941 SELECT TYPE(f => zfluxes)
943 SELECT CASE(
this%VDIM)
946 p%density%data2d(:,nmin:nmax), &
947 p%velocity%data3d(:,nmin:nmax,1), &
948 c%momentum%data3d(:,nmin:nmax,1), &
949 f%density%data2d(:,nmin:nmax), &
950 f%momentum%data3d(:,nmin:nmax,1))
953 p%density%data2d(:,nmin:nmax), &
954 p%velocity%data3d(:,nmin:nmax,2), &
955 c%momentum%data3d(:,nmin:nmax,2), &
956 c%momentum%data3d(:,nmin:nmax,1), &
957 f%density%data2d(:,nmin:nmax), &
958 f%momentum%data3d(:,nmin:nmax,2), &
959 f%momentum%data3d(:,nmin:nmax,1))
962 p%density%data2d(:,nmin:nmax), &
963 p%velocity%data3d(:,nmin:nmax,3), &
964 c%momentum%data3d(:,nmin:nmax,3), &
965 c%momentum%data3d(:,nmin:nmax,1), &
966 c%momentum%data3d(:,nmin:nmax,2), &
967 f%density%data2d(:,nmin:nmax), &
968 f%momentum%data3d(:,nmin:nmax,3), &
969 f%momentum%data3d(:,nmin:nmax,1), &
970 f%momentum%data3d(:,nmin:nmax,2))
978 PURE SUBROUTINE viscositysources(this,Mesh,pvar,btxx,btxy,btxz,btyy,btyz,btzz,sterm)
985 DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX) &
986 :: btxx,btxy,btxz,btyy,btyz,btzz
988 SELECT TYPE(p => pvar)
990 SELECT TYPE(s => sterm)
993 s%density%data1d(:) = 0.0
995 SELECT CASE(
this%VDIM)
1000 CALL mesh%Divergence(btxx,btxy,btxy,btyy,s%momentum%data4d(:,:,:,1), &
1001 s%momentum%data4d(:,:,:,2))
1004 CALL mesh%Divergence(btxx,btxy,btxz,btxy,btyy,btyz,btxz,btyz,btzz, &
1005 s%momentum%data4d(:,:,:,1),s%momentum%data4d(:,:,:,2), &
1006 s%momentum%data4d(:,:,:,3))
1019 PURE SUBROUTINE calcstresses(this,Mesh,pvar,dynvis,bulkvis, &
1020 btxx,btxy,btxz,btyy,btyz,btzz)
1026 CLASS(
marray_base),
INTENT(INOUT) :: dynvis,bulkvis
1027 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX) :: &
1028 btxx,btxy,btxz,btyy,btyz,btzz
1032 INTENT(OUT) :: btxx,btxy,btxz,btyy,btyz,btzz
1034 SELECT TYPE(p => pvar)
1036 SELECT CASE(mesh%VECTOR_COMPONENTS)
1041 CASE(ior(vector_x,vector_y))
1043 CALL mesh%Divergence(p%velocity%data4d(:,:,:,1),p%velocity%data4d(:,:,:,2),&
1045 this%tmp(:,:,:) = bulkvis%data3d(:,:,:)*
this%tmp(:,:,:)
1046 DO k=mesh%KMIN-mesh%KP1,mesh%KMAX+mesh%KP1
1047 DO j=mesh%JMIN-mesh%JP1,mesh%JMAX+mesh%JP1
1049 DO i=mesh%IMIN-mesh%IP1,mesh%IMAX+mesh%IP1
1051 btxx(i,j,k) = dynvis%data3d(i,j,k) * &
1052 ((p%velocity%data4d(i+mesh%IP1,j,k,1) - p%velocity%data4d(i-mesh%IP1,j,k,1)) &
1053 / mesh%dlx%data3d(i,j,k) &
1054 + 2.0 * mesh%cxyx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2)) +
this%tmp(i,j,k)
1055 btyy(i,j,k) = dynvis%data3d(i,j,k) * &
1056 ((p%velocity%data4d(i,j+mesh%JP1,k,2) - p%velocity%data4d(i,j-mesh%JP1,k,2)) &
1057 / mesh%dly%data3d(i,j,k) &
1058 + 2.0 * mesh%cyxy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) ) +
this%tmp(i,j,k)
1060 btxy(i,j,k) = dynvis%data3d(i,j,k) * ( 0.5 * &
1061 ((p%velocity%data4d(i+mesh%IP1,j,k,2) - p%velocity%data4d(i-mesh%IP1,j,k,2)) &
1062 / mesh%dlx%data3d(i,j,k) &
1063 + (p%velocity%data4d(i,j+mesh%JP1,k,1) - p%velocity%data4d(i,j-mesh%JP1,k,1)) &
1064 / mesh%dly%data3d(i,j,k) ) &
1065 - mesh%cxyx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) &
1066 - mesh%cyxy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) )
1070 CASE(ior(vector_x,vector_z))
1072 CALL mesh%Divergence(p%velocity%data4d(:,:,:,1),p%velocity%data4d(:,:,:,2),&
1074 this%tmp(:,:,:) = bulkvis%data3d(:,:,:)*
this%tmp(:,:,:)
1075 DO k=mesh%KMIN-mesh%KP1,mesh%KMAX+mesh%KP1
1076 DO j=mesh%JMIN-mesh%JP1,mesh%JMAX+mesh%JP1
1078 DO i=mesh%IMIN-mesh%IP1,mesh%IMAX+mesh%IP1
1080 btxx(i,j,k) = dynvis%data3d(i,j,k) * &
1081 ((p%velocity%data4d(i+mesh%IP1,j,k,1) - p%velocity%data4d(i-mesh%IP1,j,k,1)) &
1082 / mesh%dlx%data3d(i,j,k) &
1083 + 2.0 * mesh%cxzx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) ) &
1085 btyy(i,j,k) = dynvis%data3d(i,j,k) * &
1086 ((p%velocity%data4d(i,j,k+mesh%KP1,2) - p%velocity%data4d(i,j,k-mesh%KP1,2)) &
1087 / mesh%dlz%data3d(i,j,k) &
1088 + 2.0 * mesh%czxz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) ) &
1091 btxy(i,j,k) = dynvis%data3d(i,j,k) * ( 0.5 * &
1092 ((p%velocity%data4d(i+mesh%IP1,j,k,2) - p%velocity%data4d(i-mesh%IP1,j,k,2)) &
1093 / mesh%dlx%data3d(i,j,k) &
1094 + (p%velocity%data4d(i,j,k+mesh%KP1,1) - p%velocity%data4d(i,j,k-mesh%KP1,1)) &
1095 / mesh%dlz%data3d(i,j,k) ) &
1096 - mesh%czxz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) &
1097 - mesh%cxzx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) )
1101 CASE(ior(vector_y,vector_z))
1102 CALL mesh%Divergence(p%velocity%data4d(:,:,:,1),p%velocity%data4d(:,:,:,2),&
1104 this%tmp(:,:,:) = bulkvis%data3d(:,:,:)*
this%tmp(:,:,:)
1105 DO k=mesh%KMIN-mesh%KP1,mesh%KMAX+mesh%KP1
1106 DO j=mesh%JMIN-mesh%JP1,mesh%JMAX+mesh%JP1
1108 DO i=mesh%IMIN-mesh%IP1,mesh%IMAX+mesh%IP1
1110 btxx(i,j,k) = dynvis%data3d(i,j,k) * &
1111 ((p%velocity%data4d(i,j+mesh%JP1,k,1) - p%velocity%data4d(i,j-mesh%JP1,k,1)) &
1112 / mesh%dly%data3d(i,j,k) &
1113 + 2.0 * mesh%cyzy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) ) &
1115 btyy(i,j,k) = dynvis%data3d(i,j,k) * &
1116 ((p%velocity%data4d(i,j,k+mesh%KP1,2) - p%velocity%data4d(i,j,k-mesh%KP1,2)) &
1117 / mesh%dlz%data3d(i,j,k) &
1118 + 2.0 * mesh%czyz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) ) &
1121 btxy(i,j,k) = dynvis%data3d(i,j,k) * ( 0.5 * &
1122 ((p%velocity%data4d(i,j,k+mesh%KP1,1) - p%velocity%data4d(i,j,k-mesh%KP1,1)) &
1123 / mesh%dlz%data3d(i,j,k) &
1124 + (p%velocity%data4d(i,j+mesh%JP1,k,2) - p%velocity%data4d(i,j-mesh%JP1,k,2)) &
1125 / mesh%dly%data3d(i,j,k) ) &
1126 - mesh%czyz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) &
1127 - mesh%cyzy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) )
1131 CASE(ior(ior(vector_x,vector_y),vector_z))
1133 CALL mesh%Divergence(p%velocity%data4d(:,:,:,1),p%velocity%data4d(:,:,:,2),&
1134 p%velocity%data4d(:,:,:,3),
this%tmp(:,:,:))
1135 this%tmp(:,:,:) = bulkvis%data3d(:,:,:)*
this%tmp(:,:,:)
1136 DO k=mesh%KMIN-mesh%KP1,mesh%KMAX+mesh%KP1
1137 DO j=mesh%JMIN-mesh%JP1,mesh%JMAX+mesh%JP1
1139 DO i=mesh%IMIN-mesh%IP1,mesh%IMAX+mesh%IP1
1141 btxx(i,j,k) = dynvis%data3d(i,j,k) * &
1142 ((p%velocity%data4d(i+mesh%IP1,j,k,1) - p%velocity%data4d(i-mesh%IP1,j,k,1)) &
1143 / mesh%dlx%data3d(i,j,k) &
1144 + 2.0 * mesh%cxyx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) &
1145 + 2.0 * mesh%cxzx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,3) ) &
1147 btyy(i,j,k) = dynvis%data3d(i,j,k) * &
1148 ((p%velocity%data4d(i,j+mesh%JP1,k,2) - p%velocity%data4d(i,j-mesh%JP1,k,2)) &
1149 / mesh%dly%data3d(i,j,k) &
1150 + 2.0 * mesh%cyxy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) &
1151 + 2.0 * mesh%cyzy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,3) ) &
1153 btzz(i,j,k) = dynvis%data3d(i,j,k) * &
1154 ((p%velocity%data4d(i,j,k+mesh%KP1,3) - p%velocity%data4d(i,j,k-mesh%KP1,3)) &
1155 / mesh%dlz%data3d(i,j,k) &
1156 + 2.0 * mesh%czxz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) &
1157 + 2.0 * mesh%czyz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) ) &
1160 btxy(i,j,k) = dynvis%data3d(i,j,k) * ( 0.5 * &
1161 ((p%velocity%data4d(i+mesh%IP1,j,k,2) - p%velocity%data4d(i-mesh%IP1,j,k,2)) &
1162 / mesh%dlx%data3d(i,j,k) &
1163 + (p%velocity%data4d(i,j+mesh%JP1,k,1) - p%velocity%data4d(i,j-mesh%JP1,k,1)) &
1164 / mesh%dly%data3d(i,j,k) ) &
1165 - mesh%cxyx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) &
1166 - mesh%cyxy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) )
1167 btxz(i,j,k) = dynvis%data3d(i,j,k) * ( 0.5 * &
1168 ((p%velocity%data4d(i+mesh%IP1,j,k,3) - p%velocity%data4d(i-mesh%IP1,j,k,3)) &
1169 / mesh%dlx%data3d(i,j,k) &
1170 + (p%velocity%data4d(i,j,k+mesh%KP1,1) - p%velocity%data4d(i,j,k-mesh%KP1,1)) &
1171 / mesh%dlz%data3d(i,j,k) ) &
1172 - mesh%czxz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,3) &
1173 - mesh%cxzx%bcenter(i,j,k) * p%velocity%data4d(i,j,k,1) )
1174 btyz(i,j,k) = dynvis%data3d(i,j,k) * ( 0.5 * &
1175 ((p%velocity%data4d(i,j,k+mesh%KP1,2) - p%velocity%data4d(i,j,k-mesh%KP1,2)) &
1176 / mesh%dlz%data3d(i,j,k) &
1177 + (p%velocity%data4d(i,j+mesh%JP1,k,3) - p%velocity%data4d(i,j-mesh%JP1,k,3)) &
1178 / mesh%dly%data3d(i,j,k) ) &
1179 - mesh%czyz%bcenter(i,j,k) * p%velocity%data4d(i,j,k,3) &
1180 - mesh%cyzy%bcenter(i,j,k) * p%velocity%data4d(i,j,k,2) )
1205 SELECT TYPE(p => pvar)
1207 SELECT TYPE(c => cvar)
1209 SELECT TYPE(s => sterm)
1211 s%density%data1d(:) = 0.0
1214 s%momentum%data2d(:,n) = c%density%data1d(:) * accel%data2d(:,n)
1228 REAL,
DIMENSION(Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1234 IF (
this%transformed_xvelocity)
THEN 1235 SELECT TYPE(p => pvar)
1237 SELECT TYPE(c => cvar)
1239 DO k=mesh%KGMIN,mesh%KGMAX
1240 DO j=mesh%JGMIN,mesh%JGMAX
1241 DO i=mesh%IGMIN,mesh%IGMAX
1242 p%velocity%data4d(i,j,k,1) = p%velocity%data4d(i,j,k,1) + w(j,k)
1243 c%momentum%data4d(i,j,k,1) = c%momentum%data4d(i,j,k,1) &
1244 + c%density%data3d(i,j,k)*w(j,k)
1248 this%transformed_xvelocity = .false.
1251 this%transformed_xvelocity = .false.
1261 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1267 IF (
this%transformed_yvelocity)
THEN 1268 SELECT TYPE(p => pvar)
1270 SELECT TYPE(c => cvar)
1272 DO k=mesh%KGMIN,mesh%KGMAX
1273 DO j=mesh%JGMIN,mesh%JGMAX
1274 DO i=mesh%IGMIN,mesh%IGMAX
1275 p%velocity%data4d(i,j,k,2) = p%velocity%data4d(i,j,k,2) + w(i,k)
1276 c%momentum%data4d(i,j,k,2) = c%momentum%data4d(i,j,k,2) &
1277 + c%density%data3d(i,j,k)*w(i,k)
1281 this%transformed_yvelocity = .false.
1293 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX), &
1299 IF (
this%transformed_zvelocity)
THEN 1300 SELECT TYPE(p => pvar)
1302 SELECT TYPE(c => cvar)
1304 DO k=mesh%KGMIN,mesh%KGMAX
1305 DO j=mesh%JGMIN,mesh%JGMAX
1306 DO i=mesh%IGMIN,mesh%IGMAX
1307 p%velocity%data4d(i,j,k,3) = p%velocity%data4d(i,j,k,3) + w(i,j)
1308 c%momentum%data4d(i,j,k,3) = c%momentum%data4d(i,j,k,3) &
1309 + c%density%data3d(i,j,k)*w(i,j)
1313 this%transformed_zvelocity = .false.
1325 REAL,
DIMENSION(Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1331 IF (.NOT.
this%transformed_xvelocity)
THEN 1332 SELECT TYPE(p => pvar)
1334 SELECT TYPE(c => cvar)
1336 DO k=mesh%KGMIN,mesh%KGMAX
1337 DO j=mesh%JGMIN,mesh%JGMAX
1338 DO i=mesh%IGMIN,mesh%IGMAX
1339 p%velocity%data4d(i,j,k,1) = p%velocity%data4d(i,j,k,1) - w(j,k)
1340 c%momentum%data4d(i,j,k,1) = c%momentum%data4d(i,j,k,1) &
1341 - c%density%data3d(i,j,k)*w(j,k)
1345 this%transformed_xvelocity = .true.
1357 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1363 IF (.NOT.
this%transformed_yvelocity)
THEN 1364 SELECT TYPE(p => pvar)
1366 SELECT TYPE(c => cvar)
1368 DO k=mesh%KGMIN,mesh%KGMAX
1369 DO j=mesh%JGMIN,mesh%JGMAX
1370 DO i=mesh%IGMIN,mesh%IGMAX
1371 p%velocity%data4d(i,j,k,2) = p%velocity%data4d(i,j,k,2) - w(i,k)
1372 c%momentum%data4d(i,j,k,2) = c%momentum%data4d(i,j,k,2) &
1373 - c%density%data3d(i,j,k)*w(i,k)
1377 this%transformed_yvelocity = .true.
1389 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX), &
1395 IF (.NOT.
this%transformed_zvelocity)
THEN 1396 SELECT TYPE(p => pvar)
1398 SELECT TYPE(c => cvar)
1400 DO k=mesh%KGMIN,mesh%KGMAX
1401 DO j=mesh%JGMIN,mesh%JGMAX
1402 DO i=mesh%IGMIN,mesh%IGMAX
1403 p%velocity%data4d(i,j,k,3) = p%velocity%data4d(i,j,k,3) - w(i,j)
1404 c%momentum%data4d(i,j,k,3) = c%momentum%data4d(i,j,k,3) &
1405 - c%density%data3d(i,j,k)*w(i,j)
1409 this%transformed_zvelocity = .true.
1432 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%KGMIN:Mesh%KGMAX),
INTENT(IN) &
1438 SELECT TYPE(c => cvar)
1440 SELECT TYPE(s => sterm)
1442 DO k=mesh%KMIN,mesh%KMAX
1443 DO j=mesh%JMIN,mesh%JMAX
1444 DO i=mesh%IMIN,mesh%IMAX
1446 s%momentum%data4d(i,j,k,2) = s%momentum%data4d(i,j,k,2) &
1447 - c%momentum%data4d(i,j,k,1) * 0.5 * (w(i+1,k)-w(i-1,k)) &
1448 / mesh%dlx%data3d(i,j,k)
1464 LOGICAL,
DIMENSION(this%VNUM),
INTENT(OUT) :: reflx,refly,reflz
1469 SELECT CASE(
this%VDIM)
1471 IF (mesh%INUM.GT.1) reflx(2) = .true.
1472 IF (mesh%JNUM.GT.1) refly(2) = .true.
1473 IF (mesh%KNUM.GT.1) reflz(2) = .true.
1475 IF (mesh%KNUM.EQ.1.AND..NOT.mesh%ROTSYM.EQ.3)
THEN 1479 ELSE IF (mesh%JNUM.EQ.1.AND..NOT.mesh%ROTSYM.EQ.2)
THEN 1483 ELSE IF (mesh%INUM.EQ.1.AND..NOT.mesh%ROTSYM.EQ.1)
THEN 1501 PURE SUBROUTINE axismasks(this,Mesh,reflX,reflY,reflZ)
1506 LOGICAL,
DIMENSION(this%VNUM),
INTENT(OUT) :: reflx,refly,reflz
1512 CALL this%ReflectionMasks(mesh,reflx,refly,reflz)
1514 aidx = mesh%geometry%GetAzimuthIndex()
1517 SELECT CASE(
this%VDIM)
1520 IF (mesh%KNUM.EQ.1.AND..NOT.mesh%ROTSYM.EQ.3)
THEN 1530 ELSE IF (mesh%JNUM.EQ.1.AND..NOT.mesh%ROTSYM.EQ.2)
THEN 1540 ELSE IF (mesh%INUM.EQ.1.AND..NOT.mesh%ROTSYM.EQ.1)
THEN 1569 INTEGER,
INTENT(IN) :: i1,i2
1571 REAL,
DIMENSION(Mesh%JMIN:Mesh%JMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
1572 INTENT(OUT) :: lambda,xvar
1576 SELECT TYPE(p => pvar)
1580 SELECT CASE(
this%VDIM)
1584 this%bccsound%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1585 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1586 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1587 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2))
1592 this%fcsound%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,west), &
1593 p%density%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1594 p%density%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1595 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1596 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1597 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1598 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2))
1602 this%bccsound%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1603 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1604 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1605 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1606 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3))
1611 this%fcsound%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,west), &
1612 p%density%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1613 p%density%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1614 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1615 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1616 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1617 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1618 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1619 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1620 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3))
1624 this%bccsound%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1625 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1626 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1627 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1628 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1629 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4))
1634 this%fcsound%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,west), &
1635 p%density%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1636 p%density%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1637 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1638 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1639 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1640 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1641 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1642 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1643 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1644 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1645 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1646 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4))
1657 INTEGER,
INTENT(IN) :: j1,j2
1659 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
1660 INTENT(OUT) :: lambda,xvar
1662 INTEGER :: jl,jr,vn,vt
1664 SELECT TYPE(p => pvar)
1668 SELECT CASE(
this%VDIM)
1672 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,1), &
1673 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1674 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2))
1678 CALL setcharvars1d(
this%fcsound%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,south), &
1679 p%density%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
1680 p%density%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
1681 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,1), &
1682 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,1), &
1683 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1684 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2))
1687 SELECT CASE(mesh%VECTOR_COMPONENTS)
1688 CASE(ior(vector_x,vector_y))
1691 CASE(ior(vector_y,vector_z))
1700 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,vn), &
1701 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1702 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1703 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3))
1707 CALL setcharvars2d(
this%fcsound%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,south), &
1708 p%density%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
1709 p%density%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
1710 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,vn), &
1711 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,vn), &
1712 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,vt), &
1713 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,vt), &
1714 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1715 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1716 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3))
1720 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,2), &
1721 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1722 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1723 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1724 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4))
1728 CALL setcharvars3d(
this%fcsound%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,south), &
1729 p%density%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
1730 p%density%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
1731 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,2), &
1732 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,2), &
1733 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,1), &
1734 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,1), &
1735 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,3), &
1736 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,3), &
1737 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1738 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1739 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1740 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4))
1751 INTEGER,
INTENT(IN) :: k1,k2
1753 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%JMIN:Mesh%JMAX,this%VNUM), &
1754 INTENT(OUT) :: lambda,xvar
1758 SELECT TYPE(p => pvar)
1762 SELECT CASE(
this%VDIM)
1766 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,1), &
1767 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1768 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2))
1772 CALL setcharvars1d(
this%fcsound%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,bottom), &
1773 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
1774 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
1775 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,1), &
1776 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,1), &
1777 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1778 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2))
1782 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,2), &
1783 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1784 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1785 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3))
1789 CALL setcharvars2d(
this%fcsound%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,bottom), &
1790 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
1791 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
1792 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,2), &
1793 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,2), &
1794 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,1), &
1795 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,1), &
1796 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1797 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1798 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3))
1802 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,3), &
1803 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1804 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1805 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
1806 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,4))
1810 CALL setcharvars3d(
this%fcsound%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,bottom), &
1811 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
1812 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
1813 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,3), &
1814 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,3), &
1815 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,1), &
1816 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,1), &
1817 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,2), &
1818 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,2), &
1819 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1820 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1821 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1822 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4))
1832 INTEGER,
INTENT(IN) :: i1,i2
1833 REAL,
DIMENSION(Mesh%JMIN:Mesh%JMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
1844 SELECT TYPE(p => pvar)
1846 SELECT CASE(
this%VDIM)
1849 this%fcsound%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,fidx), &
1850 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1851 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1852 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1853 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1854 p%density%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1855 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1))
1858 this%fcsound%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,fidx), &
1859 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1860 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1861 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1862 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1863 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1864 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1865 p%density%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1866 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1867 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2))
1870 this%fcsound%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,fidx), &
1871 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1872 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1873 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1874 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1875 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1876 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1877 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1878 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4), &
1879 p%density%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1880 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1881 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1882 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3))
1893 INTEGER,
INTENT(IN) :: j1,j2
1894 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
1898 INTEGER :: fidx,vt,vn
1905 SELECT TYPE(p => pvar)
1907 SELECT CASE(
this%VDIM)
1910 this%fcsound%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,fidx), &
1911 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1912 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,1), &
1913 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1914 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1915 p%density%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX), &
1916 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,1))
1919 SELECT CASE(mesh%VECTOR_COMPONENTS)
1920 CASE(ior(vector_x,vector_y))
1923 CASE(ior(vector_y,vector_z))
1931 this%fcsound%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,fidx), &
1932 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1933 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,vn), &
1934 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,vt), &
1935 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1936 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1937 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1938 p%density%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX), &
1939 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,vn), &
1940 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,vt))
1943 this%fcsound%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,fidx), &
1944 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1945 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,2), &
1946 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,1), &
1947 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,3), &
1948 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1949 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1950 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1951 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
1952 p%density%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX), &
1953 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,2), &
1954 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,1), &
1955 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,3))
1965 INTEGER,
INTENT(IN) :: k1,k2
1966 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%JMIN:Mesh%JMAX,this%VNUM), &
1977 SELECT TYPE(p => pvar)
1979 SELECT CASE(
this%VDIM)
1982 this%fcsound%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,fidx), &
1983 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1984 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,1), &
1985 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1986 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1987 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2), &
1988 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,1))
1991 this%fcsound%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,fidx), &
1992 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1993 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,2), &
1994 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,1), &
1995 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1996 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1997 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
1998 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2), &
1999 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,2), &
2000 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,1))
2003 this%fcsound%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,fidx), &
2004 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
2005 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,3), &
2006 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,1), &
2007 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,2), &
2008 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
2009 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
2010 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
2011 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,4), &
2012 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2), &
2013 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,3), &
2014 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,1), &
2015 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,2))
2024 CLASS(physics_eulerisotherm),
INTENT(INOUT) :: this
2026 CALL this%bccsound%Destroy()
2027 CALL this%fcsound%Destroy()
2028 DEALLOCATE(this%bccsound,this%fcsound)
2029 CALL this%Finalize_base()
2044 INTEGER,
OPTIONAL,
INTENT(IN) :: flavour,num
2047 IF (.NOT.physics%Initialized()) &
2048 CALL physics%Error(
"physics_eulerisotherm::CreateStatevector",
"Physics not initialized.")
2052 IF (
PRESENT(flavour))
THEN 2053 SELECT CASE(flavour)
2054 CASE(primitive,conservative)
2055 new_sv%flavour = flavour
2057 new_sv%flavour = undefined
2060 SELECT CASE(new_sv%flavour)
2063 ALLOCATE(new_sv%density,new_sv%velocity)
2064 IF (
PRESENT(num).AND.num.GT.0)
THEN 2073 CALL new_sv%AppendMArray(new_sv%density)
2074 CALL new_sv%AppendMArray(new_sv%velocity)
2077 ALLOCATE(new_sv%density,new_sv%momentum)
2078 IF (
PRESENT(num).AND.num.GT.0)
THEN 2087 CALL new_sv%AppendMArray(new_sv%density)
2088 CALL new_sv%AppendMArray(new_sv%momentum)
2090 CALL physics%Warning(
"physics_eulerisotherm::CreateStateVector",
"Empty state vector created.")
2099 INTEGER,
OPTIONAL,
INTENT(IN) :: flavour,num
2101 IF (.NOT.physics%Initialized()) &
2102 CALL physics%Error(
"physics_eulerisotherm::CreateStatevector",
"Physics not initialized.")
2106 IF (
PRESENT(flavour))
THEN 2107 SELECT CASE(flavour)
2108 CASE(primitive,conservative)
2109 new_sv%flavour = flavour
2111 new_sv%flavour = undefined
2114 SELECT CASE(new_sv%flavour)
2117 ALLOCATE(new_sv%density,new_sv%velocity)
2119 IF (
PRESENT(num))
THEN 2127 CALL new_sv%AppendMArray(new_sv%density)
2128 CALL new_sv%AppendMArray(new_sv%velocity)
2131 ALLOCATE(new_sv%density,new_sv%momentum)
2133 IF (
PRESENT(num))
THEN 2141 CALL new_sv%AppendMArray(new_sv%density)
2142 CALL new_sv%AppendMArray(new_sv%momentum)
2144 CALL physics%Warning(
"physics_eulerisotherm::CreateStateVector_eulerisotherm", &
2145 "Empty state vector created.")
2153 CLASS(statevector_eulerisotherm),
INTENT(INOUT) :: this
2154 CLASS(marray_base),
INTENT(IN) :: ma
2156 CALL this%marray_compound%AssignMArray_0(ma)
2157 IF (
SIZE(this%data1d).GT.0)
THEN 2158 SELECT TYPE(src => ma)
2161 this%flavour = src%flavour
2165 this%density => this%GetItem(this%FirstItem())
2166 SELECT CASE(this%flavour)
2169 this%velocity => this%GetItem(this%NextItem(this%FirstItem()))
2172 this%momentum => this%GetItem(this%NextItem(this%FirstItem()))
2190 REAL,
INTENT(IN) :: cs,v
2191 REAL,
INTENT(OUT) :: minwav,maxwav
2193 minwav = min(0.,v-cs)
2194 maxwav = max(0.,v+cs)
2201 REAL,
INTENT(IN) :: cs,v
2202 REAL,
INTENT(OUT) :: l1,l2
2211 REAL,
INTENT(IN) :: cs,v
2212 REAL,
INTENT(OUT) :: l1,l2,l3
2222 REAL,
INTENT(IN) :: cs,v
2223 REAL,
INTENT(OUT) :: l1,l2,l3,l4
2232 ELEMENTAL SUBROUTINE setflux1d(cs,rho,u,mu,f1,f2)
2235 REAL,
INTENT(IN) :: cs,rho,u,mu
2236 REAL,
INTENT(OUT) :: f1,f2
2239 f2 = mu*u + rho*cs*cs
2243 ELEMENTAL SUBROUTINE setflux2d(cs,rho,u,mu,mv,f1,f2,f3)
2246 REAL,
INTENT(IN) :: cs,rho,u,mu,mv
2247 REAL,
INTENT(OUT) :: f1,f2,f3
2254 ELEMENTAL SUBROUTINE setflux3d(cs,rho,u,mu,mv,mw,f1,f2,f3,f4)
2257 REAL,
INTENT(IN) :: cs,rho,u,mu,mv,mw
2258 REAL,
INTENT(OUT) :: f1,f2,f3,f4
2265 ELEMENTAL SUBROUTINE cons2prim1d(rho_in,mu,rho_out,u)
2268 REAL,
INTENT(IN) :: rho_in,mu
2269 REAL,
INTENT(OUT) :: rho_out,u
2276 ELEMENTAL SUBROUTINE cons2prim2d(rho_in,mu,mv,rho_out,u,v)
2279 REAL,
INTENT(IN) :: rho_in,mu,mv
2280 REAL,
INTENT(OUT) :: rho_out,u,v
2291 ELEMENTAL SUBROUTINE cons2prim3d(rho_in,mu,mv,mw,rho_out,u,v,w)
2294 REAL,
INTENT(IN) :: rho_in,mu,mv,mw
2295 REAL,
INTENT(OUT) :: rho_out,u,v,w
2307 ELEMENTAL SUBROUTINE prim2cons1d(rho_in,u,rho_out,mu)
2310 REAL,
INTENT(IN) :: rho_in,u
2311 REAL,
INTENT(OUT) :: rho_out,mu
2318 ELEMENTAL SUBROUTINE prim2cons2d(rho_in,u,v,rho_out,mu,mv)
2321 REAL,
INTENT(IN) :: rho_in,u,v
2322 REAL,
INTENT(OUT) :: rho_out,mu,mv
2329 ELEMENTAL SUBROUTINE prim2cons3d(rho_in,u,v,w,rho_out,mu,mv,mw)
2332 REAL,
INTENT(IN) :: rho_in,u,v,w
2333 REAL,
INTENT(OUT) :: rho_out,mu,mv,mw
2340 ELEMENTAL SUBROUTINE setcharvars1d(cs,rho1,rho2,u1,u2,xvar1,xvar2)
2343 REAL,
INTENT(IN) :: cs,rho1,rho2,u1,u2
2344 REAL,
INTENT(OUT) :: xvar1,xvar2
2348 dlnrho = log(rho2/rho1)
2351 xvar1 = dlnrho - ducs
2352 xvar2 = dlnrho + ducs
2356 ELEMENTAL SUBROUTINE setcharvars2d(cs,rho1,rho2,u1,u2,v1,v2,xvar1,xvar2,xvar3)
2359 REAL,
INTENT(IN) :: cs,rho1,rho2,u1,u2,v1,v2
2360 REAL,
INTENT(OUT) :: xvar1,xvar2,xvar3
2367 ELEMENTAL SUBROUTINE setcharvars3d(cs,rho1,rho2,u1,u2,v1,v2,w1,w2,&
2368 xvar1,xvar2,xvar3,xvar4)
2371 REAL,
INTENT(IN) :: cs,rho1,rho2,u1,u2,v1,v2,w1,w2
2372 REAL,
INTENT(OUT) :: xvar1,xvar2,xvar3,xvar4
2376 CALL setcharvars2d(cs,rho1,rho2,u1,u2,v1,v2,xvar1,xvar2,xvar4)
2384 INTEGER,
INTENT(IN) :: delta
2385 REAL,
INTENT(IN) :: cs,rho1,u1,xvar1,xvar2
2386 REAL,
INTENT(OUT) :: rho2,u2
2388 rho2 = rho1 * exp(delta*0.5*(xvar2+xvar1))
2389 u2 = u1 + delta*0.5*cs*(xvar2-xvar1)
2396 INTEGER,
INTENT(IN) :: delta
2397 REAL,
INTENT(IN) :: cs,rho1,u1,v1,xvar1,xvar2,xvar3
2398 REAL,
INTENT(OUT) :: rho2,u2,v2
2401 v2 = v1 + delta*xvar2
2404 ELEMENTAL SUBROUTINE setboundarydata3d(delta,cs,rho1,u1,v1,w1,xvar1,xvar2,xvar3, &
2405 xvar4,rho2,u2,v2,w2)
2408 INTEGER,
INTENT(IN) :: delta
2409 REAL,
INTENT(IN) :: cs,rho1,u1,v1,w1,xvar1,xvar2,xvar3,xvar4
2410 REAL,
INTENT(OUT) :: rho2,u2,v2,w2
2412 CALL setboundarydata2d(delta,cs,rho1,u1,v1,xvar1,xvar2,xvar4,rho2,u2,v2)
2413 w2 = w1 + delta*xvar3
2428 REAL,
INTENT(IN) :: cxyx,cxzx,cyxy,czxz,vx,vy,vz,p,my,mz
2439 REAL,
INTENT(IN) :: cxyx,cyxy,cyzy,czyz,vx,vy,vz,p,mx,mz
2450 REAL,
INTENT(IN) :: cxzx,cyzy,czxz,czyz,vx,vy,vz,p,mx,my
pure subroutine subtractbackgroundvelocityy(this, Mesh, w, pvar, cvar)
subroutine finalize(this)
Destructor of common class.
pure subroutine calculateboundarydataz(this, Mesh, k1, k2, xvar, pvar)
elemental subroutine setwavespeeds(cs, v, minwav, maxwav)
set minimal and maximal wave speeds
pure subroutine calcwavespeeds_center(this, Mesh, pvar, minwav, maxwav)
Calculates wave speeds at cell-centers.
subroutine printconfiguration_eulerisotherm(this)
elemental subroutine prim2cons1d(rho_in, u, rho_out, mu)
Convert from 1D primitive to conservative variables.
type(logging_base), save this
derived class for compound of mesh arrays
integer, parameter num_var
elemental subroutine cons2prim2d(rho_in, mu, mv, rho_out, u, v)
Convert from 2D conservative to primitive variables.
base class for mesh arrays
pure subroutine convert2primitive_subset(this, i1, i2, j1, j2, k1, k2, cvar, pvar)
Converts to primitives at cell centers using state vectors.
elemental subroutine setcharvars3d(cs, rho1, rho2, u1, u2, v1, v2, w1, w2, xvar1, xvar2, xvar3, xvar4)
compute characteristic variables using adjacent primitve states
real, save nan_default_real
NaN real constant.
elemental subroutine seteigenvalues2d(cs, v, l1, l2, l3)
elemental subroutine prim2cons2d(rho_in, u, v, rho_out, mu, mv)
Convert from 2D primitive to conservative variables.
pure subroutine addbackgroundvelocityz(this, Mesh, w, pvar, cvar)
pure subroutine calcfluxesy(this, Mesh, nmin, nmax, prim, cons, yfluxes)
Calculate Fluxes in y-direction.
character(len=32), parameter problem_name
pure subroutine calculatecharsystemz(this, Mesh, k1, k2, pvar, lambda, xvar)
pure subroutine viscositysources(this, Mesh, pvar, btxx, btxy, btxz, btyy, btyz, btzz, sterm)
compute viscous source terms
pure subroutine addbackgroundvelocityx(this, Mesh, w, pvar, cvar)
subroutine initphysics_eulerisotherm(this, Mesh, config, IO)
Intialization of isothermal physics.
elemental subroutine setcharvars1d(cs, rho1, rho2, u1, u2, xvar1, xvar2)
compute characteristic variables using adjacent primitve states
elemental subroutine seteigenvalues1d(cs, v, l1, l2)
compute all eigenvalues
pure subroutine calcstresses(this, Mesh, pvar, dynvis, bulkvis, btxx, btxy, btxz, btyy, btyz, btzz)
calculate components of the stress tensor
pure subroutine convert2conservative_subset(this, i1, i2, j1, j2, k1, k2, pvar, cvar)
Converts to primitive to conservative variables on a subset of the data.
pure subroutine setsoundspeeds_center(this, Mesh, bccsound)
Sets soundspeeds at cell-centers.
pure subroutine externalsources(this, accel, pvar, cvar, sterm)
compute momentum sources given an external force
pure subroutine geometricalsources(this, Mesh, pvar, cvar, sterm)
Calculates geometrical sources.
pure subroutine setsoundspeeds_faces(this, Mesh, fcsound)
Sets soundspeeds at cell-faces.
elemental subroutine setflux1d(cs, rho, u, mu, f1, f2)
set mass and 1D momentum flux for transport along the 1st dimension
subroutine, public createstatevector_eulerisotherm(Physics, new_sv, flavour, num)
elemental subroutine cons2prim1d(rho_in, mu, rho_out, u)
Convert from 1D conservative to primitive variables.
pure subroutine convert2conservative_all(this, pvar, cvar)
Converts primitive to conservative variables on the whole mesh.
elemental subroutine setflux3d(cs, rho, u, mu, mv, mw, f1, f2, f3, f4)
set mass and 3D momentum flux for transport along the 1st dimension
pure subroutine axismasks(this, Mesh, reflX, reflY, reflZ)
return masks for axis boundaries
pure subroutine calcwavespeeds_faces(this, Mesh, prim, cons, minwav, maxwav)
Calculates wave speeds at cell-faces.
pure subroutine reflectionmasks(this, Mesh, reflX, reflY, reflZ)
return masks for reflecting boundaries
pure subroutine subtractbackgroundvelocityx(this, Mesh, w, pvar, cvar)
physics module for 1D,2D and 3D isothermal Euler equations
subroutine enableoutput(this, Mesh, config, IO)
Enables output of certain arrays defined in this class.
elemental subroutine seteigenvalues3d(cs, v, l1, l2, l3, l4)
named integer constants for flavour of state vectors
elemental subroutine setboundarydata1d(delta, cs, rho1, u1, xvar1, xvar2, rho2, u2)
extrapolate boundary values using primitve and characteristic variables
type(statevector_eulerisotherm) function createstatevector(Physics, flavour, num)
Constructor of statevector_eulerisotherm.
pure subroutine calculatecharsystemx(this, Mesh, i1, i2, pvar, lambda, xvar)
pure subroutine addfargosources(this, Mesh, w, pvar, cvar, sterm)
sources terms for fargo advection
integer, parameter, public euler_isotherm
Dictionary for generic data types.
elemental real function getgeometricalsourcex(cxyx, cxzx, cyxy, czxz, vx, vy, vz, P, my, mz)
geometrical momentum source terms P is the either isothermal pressure rho*cs**2 or the real pressure...
pure subroutine calculateboundarydatax(this, Mesh, i1, i2, xvar, pvar)
pure subroutine addbackgroundvelocityy(this, Mesh, w, pvar, cvar)
pure subroutine calculateboundarydatay(this, Mesh, j1, j2, xvar, pvar)
elemental subroutine cons2prim3d(rho_in, mu, mv, mw, rho_out, u, v, w)
Convert from 3D conservative to primitive variables.
elemental real function getgeometricalsourcey(cxyx, cyxy, cyzy, czyz, vx, vy, vz, P, mx, mz)
y-momentum geometrical source term
pure subroutine calculatecharsystemy(this, Mesh, j1, j2, pvar, lambda, xvar)
pure subroutine convert2primitive_all(this, cvar, pvar)
Converts to primitives at cell centers using state vectors.
pure subroutine calcfluxesx(this, Mesh, nmin, nmax, prim, cons, xfluxes)
Calculate Fluxes in x-direction.
elemental subroutine setboundarydata3d(delta, cs, rho1, u1, v1, w1, xvar1, xvar2, xvar3, xvar4, rho2, u2, v2, w2)
elemental real function getgeometricalsourcez(cxzx, cyzy, czxz, czyz, vx, vy, vz, P, mx, my)
z-momentum geometrical source term
pure subroutine calcfluxesz(this, Mesh, nmin, nmax, prim, cons, zfluxes)
Calculate Fluxes in z-direction.
elemental subroutine setboundarydata2d(delta, cs, rho1, u1, v1, xvar1, xvar2, xvar3, rho2, u2, v2)
pure subroutine subtractbackgroundvelocityz(this, Mesh, w, pvar, cvar)
elemental subroutine setflux2d(cs, rho, u, mu, mv, f1, f2, f3)
set mass and 2D momentum flux for transport along the 1st dimension
subroutine assignmarray_0(this, ma)
assigns one mesh array to another mesh array
elemental subroutine setcharvars2d(cs, rho1, rho2, u1, u2, v1, v2, xvar1, xvar2, xvar3)
compute characteristic variables using adjacent primitve states
elemental subroutine prim2cons3d(rho_in, u, v, w, rho_out, mu, mv, mw)
Convert from 3D primitive to conservative variables.