Commit 09faaead authored by Davide Torlo's avatar Davide Torlo
Browse files

added a couple of dp in 1D src

parent ca7b8d7e
...@@ -8,8 +8,8 @@ MODULE variable_def ...@@ -8,8 +8,8 @@ MODULE variable_def
IMPLICIT NONE IMPLICIT NONE
INTEGER, PUBLIC, PARAMETER:: n_vars = 1 ! number of primitive variables INTEGER, PUBLIC, PARAMETER:: n_vars = 1 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC, PARAMETER:: a = 1.0 REAL(dp), PUBLIC, PARAMETER:: a = 1.0_dp
! Type for the vector of primitive variables ! Type for the vector of primitive variables
TYPE, PUBLIC :: PVar TYPE, PUBLIC :: PVar
...@@ -103,7 +103,7 @@ CONTAINS ...@@ -103,7 +103,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim), INTENT(in) :: x REAL(dp), DIMENSION(n_dim), INTENT(in) :: x
TYPE(PVar), dimension(n_dim) :: f TYPE(PVar), dimension(n_dim) :: f
! transport ! transport
f(1)%U(1) = 0.5_dp*e%u(1)**2 f(1)%U(1) = 0.5_dp*e%u(1)**2_dp
END FUNCTION flux_scal_e END FUNCTION flux_scal_e
...@@ -124,7 +124,7 @@ CONTAINS ...@@ -124,7 +124,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: R REAL(dp), DIMENSION(n_Vars,n_Vars) :: R
R(1,1) = 1.; R(1,1) = 1._dp;
END FUNCTION rvectors_w END FUNCTION rvectors_w
FUNCTION lvectors_w(e,n) RESULT(L) FUNCTION lvectors_w(e,n) RESULT(L)
...@@ -133,7 +133,7 @@ CONTAINS ...@@ -133,7 +133,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: L REAL(dp), DIMENSION(n_Vars,n_Vars) :: L
L(1,1) = 1.0; L(1,1) = 1.0_dp;
END FUNCTION lvectors_w END FUNCTION lvectors_w
......
...@@ -35,8 +35,8 @@ MODULE variable_def ...@@ -35,8 +35,8 @@ MODULE variable_def
INTEGER, PUBLIC, PARAMETER:: n_vars = 3 ! number of primitive variables INTEGER, PUBLIC, PARAMETER:: n_vars = 3 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC :: gmm=1.4 ! EOS parameters REAL(dp), PUBLIC :: gmm=1.4_dp ! EOS parameters
! Type for the vector of primitive variables ! Type for the vector of primitive variables
...@@ -67,7 +67,7 @@ CONTAINS ...@@ -67,7 +67,7 @@ CONTAINS
FUNCTION pEOS(rho,eps) RESULT(p) FUNCTION pEOS(rho,eps) RESULT(p)
REAL(dp), INTENT(in) :: rho, eps REAL(dp), INTENT(in) :: rho, eps
REAL(dp) :: p REAL(dp) :: p
p = (gmm-1.0d0)*rho*eps p = (gmm-1.0_dp)*rho*eps
END FUNCTION pEOS END FUNCTION pEOS
...@@ -77,7 +77,7 @@ CONTAINS ...@@ -77,7 +77,7 @@ CONTAINS
FUNCTION epsEOS(rho,p) RESULT(eps) FUNCTION epsEOS(rho,p) RESULT(eps)
REAL(dp), INTENT(in) :: rho, p REAL(dp), INTENT(in) :: rho, p
REAL(dp) :: eps REAL(dp) :: eps
eps = p/((gmm-1.0)*rho) eps = p/((gmm-1.0_dp)*rho)
END FUNCTION epsEOS END FUNCTION epsEOS
!-------------------------- !--------------------------
...@@ -112,7 +112,7 @@ CONTAINS ...@@ -112,7 +112,7 @@ CONTAINS
! u ! u
W%U(2) = Q%U(2)/Q%U(1) W%U(2) = Q%U(2)/Q%U(1)
! p ! p
eps = Q%U(3)/Q%U(1) - 0.5*( Q%U(2)**2.0 )/Q%U(1)**2.0 eps = Q%U(3)/Q%U(1) - 0.5_dp*( Q%U(2)**2.0 )/Q%U(1)**2.0_dp
W%U(3) = pEOS(W%U(1),eps) W%U(3) = pEOS(W%U(1),eps)
END FUNCTION convert_cons2prim END FUNCTION convert_cons2prim
...@@ -182,7 +182,7 @@ CONTAINS ...@@ -182,7 +182,7 @@ CONTAINS
REAL(dp), DIMENSION(n_Vars,n_Vars,n_dim) :: J REAL(dp), DIMENSION(n_Vars,n_Vars,n_dim) :: J
REAL(dp) :: Vi2, u, H, eps, p REAL(dp) :: Vi2, u, H, eps, p
eps = Var%u(3)/Var%u(1) - 0.5*( Var%u(2)**2 )/Var%u(1)**2. eps = Var%u(3)/Var%u(1) - 0.5_dp*( Var%u(2)**2_dp )/Var%u(1)**2._dp
p = pEOS(Var%u(1),eps) p = pEOS(Var%u(1),eps)
u = Var%u(2)/Var%u(1) u = Var%u(2)/Var%u(1)
...@@ -233,7 +233,7 @@ CONTAINS ...@@ -233,7 +233,7 @@ CONTAINS
p = pEOS(Var%u(1),eps) p = pEOS(Var%u(1),eps)
c = SoundSpeed(Var%u(1),p) c = SoundSpeed(Var%u(1),p)
lambda = 0. lambda = 0._dp
un = ( Var%u(2)*n(1) )/Var%u(1) un = ( Var%u(2)*n(1) )/Var%u(1)
lambda(1,1) = un-c lambda(1,1) = un-c
lambda(2,2) = un lambda(2,2) = un
...@@ -266,7 +266,7 @@ CONTAINS ...@@ -266,7 +266,7 @@ CONTAINS
rho = Q%U(1) rho = Q%U(1)
u = Q%U(2)/Q%U(1) u = Q%U(2)/Q%U(1)
eps = Q%u(3)/Q%u(1) - 0.5*( Q%u(2)**2. )/Q%u(1)**2. eps = Q%u(3)/Q%u(1) - 0.5_dp*( Q%u(2)**2._dp )/Q%u(1)**2._dp
p = pEOS(Q%u(1),eps) p = pEOS(Q%u(1),eps)
a = SoundSpeed(rho,p) a = SoundSpeed(rho,p)
E = Q%U(3) E = Q%U(3)
......
...@@ -12,8 +12,8 @@ MODULE variable_def ...@@ -12,8 +12,8 @@ MODULE variable_def
IMPLICIT NONE IMPLICIT NONE
INTEGER, PUBLIC, PARAMETER:: n_vars = 1 ! number of primitive variables INTEGER, PUBLIC, PARAMETER:: n_vars = 1 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC, PARAMETER:: a = 1.0 REAL(dp), PUBLIC, PARAMETER:: a = 1.0_dp
! Type for the vector of primitive variables ! Type for the vector of primitive variables
TYPE, PUBLIC :: PVar TYPE, PUBLIC :: PVar
...@@ -107,7 +107,7 @@ CONTAINS ...@@ -107,7 +107,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim), INTENT(in) :: x REAL(dp), DIMENSION(n_dim), INTENT(in) :: x
TYPE(PVar), dimension(n_dim) :: f TYPE(PVar), dimension(n_dim) :: f
! transport ! transport
f(1)%U(1) = 0.5_dp*e%u(1)**2 f(1)%U(1) = 0.5_dp*e%u(1)**2_dp
END FUNCTION flux_scal_e END FUNCTION flux_scal_e
...@@ -128,7 +128,7 @@ CONTAINS ...@@ -128,7 +128,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: R REAL(dp), DIMENSION(n_Vars,n_Vars) :: R
R(1,1) = 1.; R(1,1) = 1._dp;
END FUNCTION rvectors_w END FUNCTION rvectors_w
FUNCTION lvectors_w(e,n) RESULT(L) FUNCTION lvectors_w(e,n) RESULT(L)
...@@ -137,7 +137,7 @@ CONTAINS ...@@ -137,7 +137,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: L REAL(dp), DIMENSION(n_Vars,n_Vars) :: L
L(1,1) = 1.0; L(1,1) = 1.0_dp;
END FUNCTION lvectors_w END FUNCTION lvectors_w
......
...@@ -22,8 +22,8 @@ MODULE variable_def ...@@ -22,8 +22,8 @@ MODULE variable_def
INTEGER, PUBLIC, PARAMETER:: n_vars = 2 ! number of primitive variables INTEGER, PUBLIC, PARAMETER:: n_vars = 2 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC :: grav=9.81 ! EOS parameters REAL(dp), PUBLIC :: grav=9.81_dp ! EOS parameters
! Type for the vector of primitive variables ! Type for the vector of primitive variables
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment