@@ -95,7 +95,8 @@ module StorageClass
9595#ifdef ACOUSTIC
9696 real (kind= RP), allocatable :: Qbase(:,:,:,:) ! Base flow State vector
9797 real (kind= RP), allocatable :: Lambbase(:,:,:,:) ! Lamb vector base
98- real (kind= RP), allocatable :: Lamb_NS(:,:,:,:) ! Lamb vector from NS
98+ real (kind= RP), allocatable :: Lamb_NS(:,:,:,:) ! Lamb vector from NS
99+ real (kind= RP), allocatable :: grada2base(:,:,:,:) ! Gradient of the squared sound velocity
99100#endif
100101#ifdef CAHNHILLIARD
101102 real (kind= RP), dimension (:,:,:,:), allocatable :: c ! CHE concentration
@@ -199,6 +200,7 @@ module StorageClass
199200 real (kind= RP), dimension (:,:,:), allocatable :: Qbase ! Base flow State vector
200201 real (kind= RP), dimension (:,:,:), allocatable :: Lambbase ! Lamb vector base
201202 real (kind= RP), dimension (:,:,:), allocatable :: Lamb_NS ! Lamb vector
203+ real (kind= RP), dimension (:,:,:), allocatable :: grada2base ! Gradient of the squared sound velocity
202204#endif
203205#ifdef MULTIPHASE
204206 real (kind= RP), dimension (:,:), allocatable :: invMa2
@@ -819,6 +821,7 @@ elemental subroutine ElementStorage_Construct(self, Nx, Ny, Nz, computeGradients
819821 ALLOCATE ( self % Qbase (NCONSB,0 :Nx,0 :Ny,0 :Nz) )
820822 ALLOCATE ( self % Lambbase (NDIM,0 :Nx,0 :Ny,0 :Nz) )
821823 ALLOCATE ( self % Lamb_NS (NDIM,0 :Nx,0 :Ny,0 :Nz) )
824+ ALLOCATE ( self % grada2base (NDIM,0 :Nx,0 :Ny,0 :Nz) )
822825#endif
823826 if (computeGradients) then
824827 ALLOCATE ( self % U_xNS (NGRAD,0 :Nx,0 :Ny,0 :Nz) )
@@ -901,6 +904,7 @@ elemental subroutine ElementStorage_Construct(self, Nx, Ny, Nz, computeGradients
901904 self % Qbase = 0.0_RP
902905 self % Lambbase = 0.0_RP
903906 self % Lamb_NS = 0.0_RP
907+ self % grada2base = 0.0_RP
904908#endif
905909 if (computeGradients) then
906910 self % U_xNS = 0.0_RP
@@ -1012,6 +1016,7 @@ elemental subroutine ElementStorage_Assign(to, from)
10121016 to % Qbase = from % Qbase
10131017 to % Lambbase = from % Lambbase
10141018 to % Lamb_NS = from % Lamb_NS
1019+ to % grada2base = from % grada2base
10151020#endif
10161021
10171022#ifndef ACOUSTIC
@@ -1110,6 +1115,7 @@ elemental subroutine ElementStorage_Destruct(self)
11101115 safedeallocate(self % Qbase)
11111116 safedeallocate(self % Lambbase)
11121117 safedeallocate(self % Lamb_NS)
1118+ safedeallocate(self % grada2base)
11131119#endif
11141120
11151121 if (self % computeGradients) then
@@ -1421,6 +1427,7 @@ pure subroutine FaceStorage_Construct(self, NDIM, Nf, Nel, computeGradients, ana
14211427 ALLOCATE ( self % Qbase (NCONSB,0 :Nf(1 ),0 :Nf(2 )) )
14221428 ALLOCATE ( self % Lambbase (NDIM,0 :Nf(1 ),0 :Nf(2 )) )
14231429 ALLOCATE ( self % Lamb_NS (NDIM,0 :Nf(1 ),0 :Nf(2 )) )
1430+ ALLOCATE ( self % grada2base (NDIM,0 :Nf(1 ),0 :Nf(2 )) )
14241431#endif
14251432! Biggest Interface flux memory size is u\vec{n}
14261433! ----------------------------------------------
@@ -1486,6 +1493,7 @@ pure subroutine FaceStorage_Construct(self, NDIM, Nf, Nel, computeGradients, ana
14861493 self % Qbase = 0.0_RP
14871494 self % Lambbase = 0.0_RP
14881495 self % Lamb_NS = 0.0_RP
1496+ self % grada2base = 0.0_RP
14891497#endif
14901498
14911499 self % rho = 0.0_RP
@@ -1586,6 +1594,7 @@ elemental subroutine FaceStorage_Destruct(self)
15861594 safedeallocate(self % Qbase )
15871595 safedeallocate(self % Lambbase )
15881596 safedeallocate(self % Lamb_NS )
1597+ safedeallocate(self % grada2base )
15891598#endif
15901599
15911600 self % anJacobian = .FALSE.
@@ -1752,6 +1761,7 @@ elemental subroutine FaceStorage_Assign(to, from)
17521761 to % Qbase = from % Qbase
17531762 to % Lambbase = from % Lambbase
17541763 to % Lamb_NS = from % Lamb_NS
1764+ to % grada2base = from % grada2base
17551765#endif
17561766 if (to % computeGradients) then
17571767 to % U_xNS = from % U_xNS
0 commit comments