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
IMPLICIT NONE
INTEGER, PUBLIC, PARAMETER:: n_vars = 1 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi
REAL(dp), PUBLIC, PARAMETER:: a = 1.0
REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC, PARAMETER:: a = 1.0_dp
! Type for the vector of primitive variables
TYPE, PUBLIC :: PVar
......@@ -103,7 +103,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim), INTENT(in) :: x
TYPE(PVar), dimension(n_dim) :: f
! 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
......@@ -124,7 +124,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: R
R(1,1) = 1.;
R(1,1) = 1._dp;
END FUNCTION rvectors_w
FUNCTION lvectors_w(e,n) RESULT(L)
......@@ -133,7 +133,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: L
L(1,1) = 1.0;
L(1,1) = 1.0_dp;
END FUNCTION lvectors_w
......
......@@ -35,8 +35,8 @@ MODULE variable_def
INTEGER, PUBLIC, PARAMETER:: n_vars = 3 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi
REAL(dp), PUBLIC :: gmm=1.4 ! EOS parameters
REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC :: gmm=1.4_dp ! EOS parameters
! Type for the vector of primitive variables
......@@ -67,7 +67,7 @@ CONTAINS
FUNCTION pEOS(rho,eps) RESULT(p)
REAL(dp), INTENT(in) :: rho, eps
REAL(dp) :: p
p = (gmm-1.0d0)*rho*eps
p = (gmm-1.0_dp)*rho*eps
END FUNCTION pEOS
......@@ -77,7 +77,7 @@ CONTAINS
FUNCTION epsEOS(rho,p) RESULT(eps)
REAL(dp), INTENT(in) :: rho, p
REAL(dp) :: eps
eps = p/((gmm-1.0)*rho)
eps = p/((gmm-1.0_dp)*rho)
END FUNCTION epsEOS
!--------------------------
......@@ -112,7 +112,7 @@ CONTAINS
! u
W%U(2) = Q%U(2)/Q%U(1)
! 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)
END FUNCTION convert_cons2prim
......@@ -182,7 +182,7 @@ CONTAINS
REAL(dp), DIMENSION(n_Vars,n_Vars,n_dim) :: J
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)
u = Var%u(2)/Var%u(1)
......@@ -233,7 +233,7 @@ CONTAINS
p = pEOS(Var%u(1),eps)
c = SoundSpeed(Var%u(1),p)
lambda = 0.
lambda = 0._dp
un = ( Var%u(2)*n(1) )/Var%u(1)
lambda(1,1) = un-c
lambda(2,2) = un
......@@ -266,7 +266,7 @@ CONTAINS
rho = 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)
a = SoundSpeed(rho,p)
E = Q%U(3)
......
......@@ -12,8 +12,8 @@ MODULE variable_def
IMPLICIT NONE
INTEGER, PUBLIC, PARAMETER:: n_vars = 1 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi
REAL(dp), PUBLIC, PARAMETER:: a = 1.0
REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC, PARAMETER:: a = 1.0_dp
! Type for the vector of primitive variables
TYPE, PUBLIC :: PVar
......@@ -107,7 +107,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim), INTENT(in) :: x
TYPE(PVar), dimension(n_dim) :: f
! 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
......@@ -128,7 +128,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: R
R(1,1) = 1.;
R(1,1) = 1._dp;
END FUNCTION rvectors_w
FUNCTION lvectors_w(e,n) RESULT(L)
......@@ -137,7 +137,7 @@ CONTAINS
REAL(dp), DIMENSION(n_dim) :: n
REAL(dp), DIMENSION(n_Vars,n_Vars) :: L
L(1,1) = 1.0;
L(1,1) = 1.0_dp;
END FUNCTION lvectors_w
......
......@@ -22,8 +22,8 @@ MODULE variable_def
INTEGER, PUBLIC, PARAMETER:: n_vars = 2 ! number of primitive variables
INTEGER, PUBLIC, PARAMETER:: n_dim = 1 ! number of physical dimensions
REAL(dp), PARAMETER:: pi=ACOS(-1.) ! pi
REAL(dp), PUBLIC :: grav=9.81 ! EOS parameters
REAL(dp), PARAMETER:: pi=ACOS(-1._dp) ! pi
REAL(dp), PUBLIC :: grav=9.81_dp ! EOS parameters
! Type for the vector of primitive variables
......
Markdown is supported
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