Merge branch 'master' into reconnection
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
commit
af25e1065b
@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13)
|
|||||||
project(amun
|
project(amun
|
||||||
VERSION 1.0
|
VERSION 1.0
|
||||||
DESCRIPTION "AMUN Code - a code to perform numerical simulations in astrophysics"
|
DESCRIPTION "AMUN Code - a code to perform numerical simulations in astrophysics"
|
||||||
HOMEPAGE_URL "https://gitlab.com/gkowal/amun-code"
|
HOMEPAGE_URL "https://amuncode.org"
|
||||||
LANGUAGES Fortran
|
LANGUAGES Fortran
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -19,8 +19,8 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
|
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
|
||||||
add_compile_options("$<$<CONFIG:RELEASE>:-march=native;-pipe;-pedantic;-ftree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always>")
|
add_compile_options("$<$<CONFIG:RELEASE>:-march=native;-pipe;-ftree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always>")
|
||||||
add_compile_options("$<$<CONFIG:DEBUG>:-Og;-pedantic;-W;-Wall>")
|
add_compile_options("$<$<CONFIG:DEBUG>:-Og;-pedantic;-W;-Wall;-Wno-unused-dummy-argument>")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
|
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
|
||||||
|
@ -6,8 +6,8 @@ ratio = 1.0000d+02
|
|||||||
radius = 1.0000d-01
|
radius = 1.0000d-01
|
||||||
buni = 0.0000d+00
|
buni = 0.0000d+00
|
||||||
angle = 4.5000d+01
|
angle = 4.5000d+01
|
||||||
csnd = 4.0825d-01
|
sound_speed = 4.0825d-01
|
||||||
gamma = 1.6667d+00
|
adiabatic_index = 1.6667d+00
|
||||||
|
|
||||||
# physics
|
# physics
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# problem name and parameters
|
# problem name and parameters
|
||||||
#
|
#
|
||||||
problem = "implosion"
|
problem = "implosion"
|
||||||
gamma = 1.40d+00
|
adiabatic_index = 1.40d+00
|
||||||
shock_line = 5.00d-01
|
shock_line = 5.00d-01
|
||||||
|
|
||||||
# physics
|
# physics
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# problem name and parameters
|
# problem name and parameters
|
||||||
#
|
#
|
||||||
problem = "rayleigh-taylor"
|
problem = "rayleigh-taylor"
|
||||||
gamma = 1.4d+00
|
adiabatic_index = 1.4d+00
|
||||||
|
|
||||||
# random number generator parameters
|
# random number generator parameters
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# problem name and parameters
|
# problem name and parameters
|
||||||
#
|
#
|
||||||
problem = "sedov-taylor"
|
problem = "sedov-taylor"
|
||||||
gamma = 1.4d+00
|
adiabatic_index = 1.4d+00
|
||||||
|
|
||||||
# physics
|
# physics
|
||||||
#
|
#
|
||||||
|
@ -149,7 +149,7 @@ class AmunXML:
|
|||||||
variables.append('cury')
|
variables.append('cury')
|
||||||
variables.append('curz')
|
variables.append('curz')
|
||||||
variables.append('curr')
|
variables.append('curr')
|
||||||
if 'pres' in variables and 'gamma' in self.attributes:
|
if 'pres' in variables and 'adiabatic_index' in self.attributes:
|
||||||
variables.append('eint')
|
variables.append('eint')
|
||||||
if all(v in variables for v in ['dens','pres']):
|
if all(v in variables for v in ['dens','pres']):
|
||||||
variables.append('temp')
|
variables.append('temp')
|
||||||
@ -513,7 +513,7 @@ class AmunXML:
|
|||||||
dset = np.sqrt(dset)
|
dset = np.sqrt(dset)
|
||||||
elif var == 'eint':
|
elif var == 'eint':
|
||||||
dset = self.read_binary_data(n, 'pres')
|
dset = self.read_binary_data(n, 'pres')
|
||||||
dset *= 1.0 / (self.attributes('gamma') - 1.0)
|
dset *= 1.0 / (self.attributes('adiabatic_index') - 1)
|
||||||
dset = np.reshape(dset, cm)
|
dset = np.reshape(dset, cm)
|
||||||
elif var == 'temp':
|
elif var == 'temp':
|
||||||
dset = self.read_binary_data(n, 'pres')
|
dset = self.read_binary_data(n, 'pres')
|
||||||
@ -530,7 +530,7 @@ class AmunXML:
|
|||||||
tmp = self.read_binary_data(n, 'dens')
|
tmp = self.read_binary_data(n, 'dens')
|
||||||
dset *= tmp
|
dset *= tmp
|
||||||
tmp = self.read_binary_data(n, 'pres')
|
tmp = self.read_binary_data(n, 'pres')
|
||||||
dset += 2.0 / (self.attributes('gamma') - 1.0) * tmp
|
dset += 2.0 / (self.attributes('adiabatic_index') - 1) * tmp
|
||||||
if 'magn' in self.variables:
|
if 'magn' in self.variables:
|
||||||
tmp = self.read_binary_data(n, 'magx')
|
tmp = self.read_binary_data(n, 'magx')
|
||||||
dset = tmp**2
|
dset = tmp**2
|
||||||
@ -925,7 +925,7 @@ def amun_dataset(fname, vname, shrink = 1, interpolation = 'rebin', progress = F
|
|||||||
nc = amun_attribute(fname, 'nprocs')
|
nc = amun_attribute(fname, 'nprocs')
|
||||||
nl = amun_attribute(fname, 'nleafs')
|
nl = amun_attribute(fname, 'nleafs')
|
||||||
if eos == 'adi':
|
if eos == 'adi':
|
||||||
gm = amun_attribute(fname, 'gamma')
|
gm = amun_attribute(fname, 'adiabatic_index')
|
||||||
|
|
||||||
# get block dimensions and the maximum level
|
# get block dimensions and the maximum level
|
||||||
#
|
#
|
||||||
|
@ -170,7 +170,7 @@ module equations
|
|||||||
|
|
||||||
! adiabatic heat ratio
|
! adiabatic heat ratio
|
||||||
!
|
!
|
||||||
real(kind=8), save :: gamma = 5.0d+00 / 3.0d+00
|
real(kind=8), save :: adiabatic_index = 5.0d+00 / 3.0d+00
|
||||||
|
|
||||||
! additional adiabatic parameters
|
! additional adiabatic parameters
|
||||||
!
|
!
|
||||||
@ -239,7 +239,7 @@ module equations
|
|||||||
public :: eigensystem_roe
|
public :: eigensystem_roe
|
||||||
public :: update_primitive_variables
|
public :: update_primitive_variables
|
||||||
public :: fix_unphysical_cells, correct_unphysical_states
|
public :: fix_unphysical_cells, correct_unphysical_states
|
||||||
public :: gamma, relativistic, magnetized
|
public :: adiabatic_index, relativistic, magnetized
|
||||||
public :: csnd, csnd2
|
public :: csnd, csnd2
|
||||||
public :: cmax, cmax2
|
public :: cmax, cmax2
|
||||||
public :: nv, nf, ns
|
public :: nv, nf, ns
|
||||||
@ -1121,17 +1121,17 @@ module equations
|
|||||||
|
|
||||||
! obtain the adiabatic specific heat ratio
|
! obtain the adiabatic specific heat ratio
|
||||||
!
|
!
|
||||||
call get_parameter("gamma", gamma)
|
call get_parameter("adiabatic_index", adiabatic_index)
|
||||||
|
|
||||||
! calculate additional parameters
|
! calculate additional parameters
|
||||||
!
|
!
|
||||||
gammam1 = gamma - 1.0d+00
|
gammam1 = adiabatic_index - 1.0d+00
|
||||||
gammam1i = 1.0d+00 / gammam1
|
gammam1i = 1.0d+00 / gammam1
|
||||||
gammaxi = gammam1 / gamma
|
gammaxi = gammam1 / adiabatic_index
|
||||||
|
|
||||||
! obtain the isothermal sound speed
|
! obtain the isothermal sound speed
|
||||||
!
|
!
|
||||||
call get_parameter("csnd" , csnd )
|
call get_parameter("sound_speed", csnd )
|
||||||
|
|
||||||
! calculate additional parameters
|
! calculate additional parameters
|
||||||
!
|
!
|
||||||
@ -1183,7 +1183,7 @@ module equations
|
|||||||
|
|
||||||
! calculate the sonic Mach number factor
|
! calculate the sonic Mach number factor
|
||||||
!
|
!
|
||||||
msfac = 1.0d+00 / (gamma * msmax**2)
|
msfac = 1.0d+00 / (adiabatic_index * msmax**2)
|
||||||
|
|
||||||
! get the tolerance
|
! get the tolerance
|
||||||
!
|
!
|
||||||
@ -1564,7 +1564,10 @@ module equations
|
|||||||
integer :: n, p, nc, np
|
integer :: n, p, nc, np
|
||||||
integer :: i = 1, il = 1, iu = 1
|
integer :: i = 1, il = 1, iu = 1
|
||||||
integer :: j = 1, jl = 1, ju = 1
|
integer :: j = 1, jl = 1, ju = 1
|
||||||
integer :: k = 1, kl = 1, ku = 1
|
integer :: k = 1
|
||||||
|
#if NDIMS == 3
|
||||||
|
integer :: kl = 1, ku = 1
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! temporary arrays
|
! temporary arrays
|
||||||
!
|
!
|
||||||
@ -2366,7 +2369,7 @@ module equations
|
|||||||
|
|
||||||
do i = 1, size(q,2)
|
do i = 1, size(q,2)
|
||||||
|
|
||||||
cs = sqrt(gamma * q(ipr,i) / q(idn,i))
|
cs = sqrt(adiabatic_index * q(ipr,i) / q(idn,i))
|
||||||
|
|
||||||
c(1,i) = q(ivx,i) - cs
|
c(1,i) = q(ivx,i) - cs
|
||||||
c(2,i) = q(ivx,i) + cs
|
c(2,i) = q(ivx,i) + cs
|
||||||
@ -2449,7 +2452,7 @@ module equations
|
|||||||
|
|
||||||
! calculate the adiabatic speed of sound
|
! calculate the adiabatic speed of sound
|
||||||
!
|
!
|
||||||
c = sqrt(gamma * qq(ipr,i,j,k) / qq(idn,i,j,k))
|
c = sqrt(adiabatic_index * qq(ipr,i,j,k) / qq(idn,i,j,k))
|
||||||
|
|
||||||
! calculate the maximum speed
|
! calculate the maximum speed
|
||||||
!
|
!
|
||||||
@ -3480,7 +3483,7 @@ module equations
|
|||||||
|
|
||||||
do i = 1, size(q,2)
|
do i = 1, size(q,2)
|
||||||
|
|
||||||
fa = gamma * q(ipr,i)
|
fa = adiabatic_index * q(ipr,i)
|
||||||
fb = fa + bb(i)
|
fb = fa + bb(i)
|
||||||
fc = max(0.0d+00, fb * fb - 4.0d+00 * fa * bx2(i))
|
fc = max(0.0d+00, fb * fb - 4.0d+00 * fa * bx2(i))
|
||||||
cf = sqrt(max(0.5d+00 * (fb + sqrt(fc)), bb(i)) / q(idn,i))
|
cf = sqrt(max(0.5d+00 * (fb + sqrt(fc)), bb(i)) / q(idn,i))
|
||||||
@ -3566,7 +3569,7 @@ module equations
|
|||||||
|
|
||||||
! calculate the fast magnetosonic speed
|
! calculate the fast magnetosonic speed
|
||||||
!
|
!
|
||||||
c = sqrt((gamma * qq(ipr,i,j,k) + bb) / qq(idn,i,j,k))
|
c = sqrt((adiabatic_index * qq(ipr,i,j,k) + bb) / qq(idn,i,j,k))
|
||||||
|
|
||||||
! calculate the maximum of speed
|
! calculate the maximum of speed
|
||||||
!
|
!
|
||||||
@ -3662,7 +3665,7 @@ module equations
|
|||||||
|
|
||||||
! prepare coefficients
|
! prepare coefficients
|
||||||
!
|
!
|
||||||
gammam2 = gamma - 2.0d+00
|
gammam2 = adiabatic_index - 2.0d+00
|
||||||
|
|
||||||
! reset all elements
|
! reset all elements
|
||||||
!
|
!
|
||||||
@ -4184,7 +4187,7 @@ module equations
|
|||||||
do i = 1, size(q,2)
|
do i = 1, size(q,2)
|
||||||
|
|
||||||
ww = q(idn,i) + q(ipr,i) / gammaxi
|
ww = q(idn,i) + q(ipr,i) / gammaxi
|
||||||
c2 = gamma * q(ipr,i) / ww
|
c2 = adiabatic_index * q(ipr,i) / ww
|
||||||
vv = sum(q(ivx:ivz,i) * q(ivx:ivz,i))
|
vv = sum(q(ivx:ivz,i) * q(ivx:ivz,i))
|
||||||
ss = c2 * (1.0d+00 - vv) / (1.0d+00 - c2)
|
ss = c2 * (1.0d+00 - vv) / (1.0d+00 - c2)
|
||||||
fc = 1.0d+00 + ss
|
fc = 1.0d+00 + ss
|
||||||
@ -4271,7 +4274,7 @@ module equations
|
|||||||
! calculate the square of the sound speed
|
! calculate the square of the sound speed
|
||||||
!
|
!
|
||||||
ww = qq(idn,i,j,k) + qq(ipr,i,j,k) / gammaxi
|
ww = qq(idn,i,j,k) + qq(ipr,i,j,k) / gammaxi
|
||||||
c2 = gamma * qq(ipr,i,j,k) / ww
|
c2 = adiabatic_index * qq(ipr,i,j,k) / ww
|
||||||
ss = c2 * (1.0d+00 - vv) / (1.0d+00 - c2)
|
ss = c2 * (1.0d+00 - vv) / (1.0d+00 - c2)
|
||||||
fc = 1.0d+00 + ss
|
fc = 1.0d+00 + ss
|
||||||
cc = sqrt(ss * (fc - vv))
|
cc = sqrt(ss * (fc - vv))
|
||||||
@ -5425,7 +5428,7 @@ module equations
|
|||||||
|
|
||||||
! prepare parameters for this case
|
! prepare parameters for this case
|
||||||
!
|
!
|
||||||
c2 = gamma * q(ipr,i) / rh
|
c2 = adiabatic_index * q(ipr,i) / rh
|
||||||
v1 = abs(q(ivx,i))
|
v1 = abs(q(ivx,i))
|
||||||
v2 = v1 * v1
|
v2 = v1 * v1
|
||||||
|
|
||||||
@ -5459,7 +5462,7 @@ module equations
|
|||||||
!
|
!
|
||||||
! prepare parameters for this case
|
! prepare parameters for this case
|
||||||
!
|
!
|
||||||
c2 = gamma * q(ipr,i) / rh
|
c2 = adiabatic_index * q(ipr,i) / rh
|
||||||
cc = (1.0d+00 - c2) / vm(i)
|
cc = (1.0d+00 - c2) / vm(i)
|
||||||
gn = b2(i) - c2 * vb(i) * vb(i)
|
gn = b2(i) - c2 * vb(i) * vb(i)
|
||||||
|
|
||||||
@ -5485,7 +5488,7 @@ module equations
|
|||||||
rh = q(idn,i) + q(ipr,i) / gammaxi
|
rh = q(idn,i) + q(ipr,i) / gammaxi
|
||||||
vs = sqrt(vm(i))
|
vs = sqrt(vm(i))
|
||||||
rt = rh + b2(i)
|
rt = rh + b2(i)
|
||||||
c2 = gamma * q(ipr,i) / rh
|
c2 = adiabatic_index * q(ipr,i) / rh
|
||||||
ca = (q(ibx,i) * vs + vb(i) * q(ivx,i) / vs)**2
|
ca = (q(ibx,i) * vs + vb(i) * q(ivx,i) / vs)**2
|
||||||
|
|
||||||
! prepare polynomial coefficients
|
! prepare polynomial coefficients
|
||||||
|
@ -171,7 +171,9 @@ module forcing
|
|||||||
|
|
||||||
! import external procedures and variables
|
! import external procedures and variables
|
||||||
!
|
!
|
||||||
|
#if NDIMS == 3
|
||||||
use constants , only : pi2
|
use constants , only : pi2
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
use iso_fortran_env, only : error_unit
|
use iso_fortran_env, only : error_unit
|
||||||
use parameters , only : get_parameter
|
use parameters , only : get_parameter
|
||||||
use random , only : randuni, randnorz
|
use random , only : randuni, randnorz
|
||||||
@ -191,9 +193,15 @@ module forcing
|
|||||||
character(len=64) :: injection = "none"
|
character(len=64) :: injection = "none"
|
||||||
character(len=64) :: profile_type = "gauss"
|
character(len=64) :: profile_type = "gauss"
|
||||||
character(len=64) :: profile_energy = "off"
|
character(len=64) :: profile_energy = "off"
|
||||||
integer :: i, j, k = 0, l, k2
|
integer :: i, j, l, k2
|
||||||
|
#if NDIMS == 3
|
||||||
|
integer :: k = 0
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
real(kind=8) :: kl2, ku2, kv2, kv
|
real(kind=8) :: kl2, ku2, kv2, kv
|
||||||
real(kind=8) :: fa, fi, uu, phi
|
real(kind=8) :: fa, fi, uu
|
||||||
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: phi
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! local vectors
|
! local vectors
|
||||||
!
|
!
|
||||||
@ -913,7 +921,9 @@ module forcing
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: ni, n
|
integer :: ni, n
|
||||||
|
#if NDIMS == 3
|
||||||
real(kind=8) :: tmp
|
real(kind=8) :: tmp
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
real(kind=8), dimension(3) :: xp, ap
|
real(kind=8), dimension(3) :: xp, ap
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
@ -993,7 +1003,9 @@ module forcing
|
|||||||
|
|
||||||
! import external procedures and variables
|
! import external procedures and variables
|
||||||
!
|
!
|
||||||
|
#if NDIMS == 3
|
||||||
use constants, only : pi2
|
use constants, only : pi2
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
use random , only : randuni, randnorz
|
use random , only : randuni, randnorz
|
||||||
|
|
||||||
! local variables are not implicit by default
|
! local variables are not implicit by default
|
||||||
@ -1007,7 +1019,10 @@ module forcing
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: l
|
integer :: l
|
||||||
real(kind=8) :: acoeff, dcoeff, phi
|
real(kind=8) :: acoeff, dcoeff
|
||||||
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: phi
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
real(kind=8) :: dinj
|
real(kind=8) :: dinj
|
||||||
|
|
||||||
! local vectors
|
! local vectors
|
||||||
@ -1108,8 +1123,15 @@ module forcing
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: l
|
integer :: l
|
||||||
real(kind=8) :: th1, th2, phi, psi, ga, gb, dinj, sqdt
|
real(kind=8) :: th1, dinj, sqdt
|
||||||
complex(kind=8) :: aran, bran, xi1, xi2
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: th2, phi, psi, ga, gb
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
complex(kind=8) :: aran
|
||||||
|
#if NDIMS == 3
|
||||||
|
complex(kind=8) :: bran
|
||||||
|
complex(kind=8) :: xi1, xi2
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
@ -1284,8 +1306,10 @@ module forcing
|
|||||||
!
|
!
|
||||||
use blocks , only : block_data
|
use blocks , only : block_data
|
||||||
use coordinates, only : nm => bcells
|
use coordinates, only : nm => bcells
|
||||||
use coordinates, only : ax, ay, az
|
use coordinates, only : ax, ay, xlen, ylen
|
||||||
use coordinates, only : xlen, ylen, zlen
|
#if NDIMS == 3
|
||||||
|
use coordinates, only : az, zlen
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
use coordinates, only : periodic
|
use coordinates, only : periodic
|
||||||
use equations , only : idn, imx, imy, imz, ien
|
use equations , only : idn, imx, imy, imz, ien
|
||||||
|
|
||||||
@ -1301,7 +1325,10 @@ module forcing
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i, j, k = 1
|
integer :: i, j, k = 1
|
||||||
real(kind=8) :: x2, y2, z2, r2
|
real(kind=8) :: x2, y2, r2
|
||||||
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: z2
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
real(kind=8) :: fx, fy, fz, fp, e1, e2
|
real(kind=8) :: fx, fy, fz, fp, e1, e2
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
@ -1503,7 +1530,10 @@ module forcing
|
|||||||
use blocks , only : block_data
|
use blocks , only : block_data
|
||||||
use constants , only : pi2
|
use constants , only : pi2
|
||||||
use coordinates, only : nm => bcells, nb, ne
|
use coordinates, only : nm => bcells, nb, ne
|
||||||
use coordinates, only : ax, ay, az, advol
|
use coordinates, only : ax, ay, advol
|
||||||
|
#if NDIMS == 3
|
||||||
|
use coordinates, only : az
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
use equations , only : idn, imx, imy, imz, ien
|
use equations , only : idn, imx, imy, imz, ien
|
||||||
|
|
||||||
! local variables are not implicit by default
|
! local variables are not implicit by default
|
||||||
@ -1518,14 +1548,19 @@ module forcing
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i, j, k = 1, l, n
|
integer :: i, j, k = 1, l, n
|
||||||
real(kind=8) :: cs, sn, tt
|
real(kind=8) :: cs, sn
|
||||||
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: tt
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
real(kind=8) :: dvol
|
real(kind=8) :: dvol
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
real(kind=8), dimension(nm):: x, y, z, kx, ky, kz
|
real(kind=8), dimension(nm):: x, y, z
|
||||||
real(kind=8), dimension(nm):: snkx, snky, snkz
|
real(kind=8), dimension(nm):: kx, ky, snkx, snky, cskx, csky
|
||||||
real(kind=8), dimension(nm):: cskx, csky, cskz
|
#if NDIMS == 3
|
||||||
|
real(kind=8), dimension(nm):: kz, snkz, cskz
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
#if NDIMS == 3
|
#if NDIMS == 3
|
||||||
real(kind=8), dimension(3,nm,nm,nm) :: acc
|
real(kind=8), dimension(3,nm,nm,nm) :: acc
|
||||||
real(kind=8), dimension( nm,nm,nm) :: den
|
real(kind=8), dimension( nm,nm,nm) :: den
|
||||||
@ -1719,8 +1754,14 @@ module forcing
|
|||||||
use blocks , only : block_data
|
use blocks , only : block_data
|
||||||
use constants , only : pi2
|
use constants , only : pi2
|
||||||
use coordinates, only : nm => bcells, nb, ne
|
use coordinates, only : nm => bcells, nb, ne
|
||||||
use coordinates, only : ax, ay, az, advol
|
use coordinates, only : ax, ay, advol
|
||||||
use equations , only : ivx, ivy, ivz
|
#if NDIMS == 3
|
||||||
|
use coordinates, only : az
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
use equations , only : ivx, ivy
|
||||||
|
#if NDIMS == 3
|
||||||
|
use equations , only : ivz
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! local variables are not implicit by default
|
! local variables are not implicit by default
|
||||||
!
|
!
|
||||||
@ -1733,14 +1774,19 @@ module forcing
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i, j, k = 1, l
|
integer :: i, j, k = 1, l
|
||||||
real(kind=8) :: cs, sn, tt, dvol
|
real(kind=8) :: cs, sn, dvol
|
||||||
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: tt
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
complex(kind=8) :: cf
|
complex(kind=8) :: cf
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
real(kind=8), dimension(nm):: x, y, z, kx, ky, kz
|
real(kind=8), dimension(nm):: x, y, z
|
||||||
real(kind=8), dimension(nm):: snkx, snky, snkz
|
real(kind=8), dimension(nm):: kx, ky, snkx, snky, cskx, csky
|
||||||
real(kind=8), dimension(nm):: cskx, csky, cskz
|
#if NDIMS == 3
|
||||||
|
real(kind=8), dimension(nm):: kz, snkz, cskz
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
|
@ -377,7 +377,7 @@ module integrals
|
|||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
use equations , only : idn, ipr, ivx, ivy, ivz, ibx, iby, ibz, ibp
|
use equations , only : idn, ipr, ivx, ivy, ivz, ibx, iby, ibz, ibp
|
||||||
use equations , only : ien, imx, imy, imz
|
use equations , only : ien, imx, imy, imz
|
||||||
use equations , only : magnetized, gamma, csnd
|
use equations , only : magnetized, adiabatic_index, csnd
|
||||||
use evolution , only : step, time, dtn
|
use evolution , only : step, time, dtn
|
||||||
use forcing , only : einj, rinj, arms
|
use forcing , only : einj, rinj, arms
|
||||||
#ifdef MPI
|
#ifdef MPI
|
||||||
@ -600,11 +600,11 @@ module integrals
|
|||||||
! get average, minimum and maximum values of sonic Mach number
|
! get average, minimum and maximum values of sonic Mach number
|
||||||
!
|
!
|
||||||
if (ipr > 0) then
|
if (ipr > 0) then
|
||||||
tmp(:,:,:) = sqd(:,:,:) * vel(:,:,:) &
|
tmp(:,:,:) = sqd(:,:,:) * vel(:,:,:) / &
|
||||||
#if NDIMS == 3
|
#if NDIMS == 3
|
||||||
/ sqrt(gamma * pdata%q(ipr,nb:ne,nb:ne,nb:ne))
|
sqrt(adiabatic_index * pdata%q(ipr,nb:ne,nb:ne,nb:ne))
|
||||||
#else /* NDIMS == 3 */
|
#else /* NDIMS == 3 */
|
||||||
/ sqrt(gamma * pdata%q(ipr,nb:ne,nb:ne, : ))
|
sqrt(adiabatic_index * pdata%q(ipr,nb:ne,nb:ne, : ))
|
||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
else
|
else
|
||||||
tmp(:,:,:) = vel(:,:,:) / csnd
|
tmp(:,:,:) = vel(:,:,:) / csnd
|
||||||
|
@ -231,6 +231,17 @@ module interpolations
|
|||||||
!
|
!
|
||||||
kappa = min(kappa, (1.0d+00 - cfl) / cfl)
|
kappa = min(kappa, (1.0d+00 - cfl) / cfl)
|
||||||
|
|
||||||
|
! check ngp
|
||||||
|
!
|
||||||
|
if (mod(ngp,2) == 0 .or. ngp < 3) then
|
||||||
|
if (verbose) then
|
||||||
|
write(error_unit,"('[', a, ']: ', a)") trim(loc), &
|
||||||
|
"The parameter ngp has to be an odd integer >= 3. "// &
|
||||||
|
"Resetting to default value of ngp = 5."
|
||||||
|
end if
|
||||||
|
ngp = 5
|
||||||
|
end if
|
||||||
|
|
||||||
! calculate mgp
|
! calculate mgp
|
||||||
!
|
!
|
||||||
mgp = (ngp - 1) / 2
|
mgp = (ngp - 1) / 2
|
||||||
@ -349,22 +360,12 @@ module interpolations
|
|||||||
reconstruct_states => reconstruct_gp
|
reconstruct_states => reconstruct_gp
|
||||||
order = ngp
|
order = ngp
|
||||||
|
|
||||||
! check the parameters
|
ng = 2
|
||||||
!
|
do while(ng < (ngp + 1) / 2)
|
||||||
if (mod(ngp,2) == 0) then
|
ng = ng + 2
|
||||||
if (verbose) then
|
end do
|
||||||
write(*,*)
|
nghosts = max(nghosts, ng)
|
||||||
write(*,"(1x,a)") "ERROR!"
|
|
||||||
write(*,"(1x,a)") "The parameter ngp has to be an odd integer >= 3."
|
|
||||||
end if
|
|
||||||
status = 1
|
|
||||||
else
|
|
||||||
ng = 2
|
|
||||||
do while(ng < (ngp + 1) / 2)
|
|
||||||
ng = ng + 2
|
|
||||||
end do
|
|
||||||
nghosts = max(nghosts, ng)
|
|
||||||
end if
|
|
||||||
case ("mgp", "MGP")
|
case ("mgp", "MGP")
|
||||||
write(stmp, '(f16.1)') sgp
|
write(stmp, '(f16.1)') sgp
|
||||||
write(name_rec, &
|
write(name_rec, &
|
||||||
@ -379,35 +380,24 @@ module interpolations
|
|||||||
!
|
!
|
||||||
if (status == 0) call prepare_mgp(status)
|
if (status == 0) call prepare_mgp(status)
|
||||||
|
|
||||||
interfaces => interfaces_mgp
|
interfaces => interfaces_mgp
|
||||||
|
|
||||||
|
ng = 2
|
||||||
|
do while(ng < (ngp + 1) / 2)
|
||||||
|
ng = ng + 2
|
||||||
|
end do
|
||||||
|
nghosts = max(nghosts, ng)
|
||||||
|
|
||||||
! check the parameters
|
|
||||||
!
|
|
||||||
if (mod(ngp,2) == 0) then
|
|
||||||
if (verbose) then
|
|
||||||
write(*,*)
|
|
||||||
write(*,"(1x,a)") "ERROR!"
|
|
||||||
write(*,"(1x,a)") "The parameter ngp has to be an odd integer >= 3."
|
|
||||||
end if
|
|
||||||
status = 1
|
|
||||||
else
|
|
||||||
ng = 2
|
|
||||||
do while(ng < (ngp + 1) / 2)
|
|
||||||
ng = ng + 2
|
|
||||||
end do
|
|
||||||
nghosts = max(nghosts, ng)
|
|
||||||
end if
|
|
||||||
case default
|
case default
|
||||||
|
|
||||||
if (verbose) then
|
if (verbose) then
|
||||||
write(*,*)
|
write(error_unit,"('[', a, ']: ', a)") trim(loc), &
|
||||||
write(*,"(1x,a)") "ERROR!"
|
"The selected reconstruction method is not " // &
|
||||||
write(*,"(1x,a)") "The selected reconstruction method is not " // &
|
"implemented: " // trim(sreconstruction) // "." // &
|
||||||
"implemented: " // trim(sreconstruction)
|
"Available methods: 'tvd' 'limo3', 'ppm'," // &
|
||||||
write(*,"(1x,a)") "Available methods: 'tvd' 'limo3', 'ppm'," // &
|
" 'weno3', 'weno5z', 'weno5yc', 'weno5ns'," // &
|
||||||
" 'weno3', 'weno5z', 'weno5yc', 'weno5ns'," // &
|
" 'crweno5z', 'crweno5yc', 'crweno5ns','mp5', " // &
|
||||||
" 'crweno5z', 'crweno5yc', 'crweno5ns','mp5', " // &
|
" 'mp7', 'mp9', 'crmp5', 'crmp5ld', 'crmp7', 'gp', 'mgp'."
|
||||||
" 'mp7', 'crmp5', 'crmp5ld', 'crmp7', 'gp', 'mgp'."
|
|
||||||
end if
|
end if
|
||||||
status = 1
|
status = 1
|
||||||
|
|
||||||
@ -661,8 +651,14 @@ module interpolations
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
logical :: flag
|
logical :: flag
|
||||||
integer :: i, j, i1, j1, k1, i2, j2, k2
|
integer :: i, j, i1, j1, i2, j2
|
||||||
real(kind=max_prec) :: sig, fc, fx, fy, fz, xl, xr, yl, yr, zl, zr
|
#if NDIMS == 3
|
||||||
|
integer :: k1, k2
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
real(kind=max_prec) :: sig, fc, fx, fy, xl, xr, yl, yr
|
||||||
|
#if NDIMS == 3
|
||||||
|
real(kind=max_prec) :: fz, zl, zr
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! local arrays for derivatives
|
! local arrays for derivatives
|
||||||
!
|
!
|
||||||
@ -834,7 +830,10 @@ module interpolations
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i , j , k = 1
|
integer :: i , j , k = 1
|
||||||
integer :: im1, jm1, km1, ip1, jp1, kp1
|
integer :: im1, jm1, ip1, jp1
|
||||||
|
#if NDIMS == 3
|
||||||
|
integer :: km1, kp1
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! local vectors
|
! local vectors
|
||||||
!
|
!
|
||||||
@ -1077,10 +1076,13 @@ module interpolations
|
|||||||
|
|
||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
logical :: flag
|
logical :: flag
|
||||||
integer :: i , j , k = 1
|
integer :: i, il, iu, im1, ip1
|
||||||
integer :: il , jl , kl , iu , ju , ku
|
integer :: j, jl, ju, jm1, jp1
|
||||||
integer :: im1, jm1, km1, ip1, jp1, kp1
|
integer :: k = 1
|
||||||
|
#if NDIMS == 3
|
||||||
|
integer :: kl, ku, km1, kp1
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! local arrays for derivatives
|
! local arrays for derivatives
|
||||||
!
|
!
|
||||||
@ -1269,7 +1271,10 @@ module interpolations
|
|||||||
!
|
!
|
||||||
integer :: i, im1, ip1
|
integer :: i, im1, ip1
|
||||||
integer :: j, jm1, jp1
|
integer :: j, jm1, jp1
|
||||||
integer :: k = 1, km1, kp1
|
integer :: k = 1
|
||||||
|
#if NDIMS == 3
|
||||||
|
integer :: km1, kp1
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
integer :: m
|
integer :: m
|
||||||
#if NDIMS == 3
|
#if NDIMS == 3
|
||||||
integer :: n, np1, np2
|
integer :: n, np1, np2
|
||||||
|
@ -2470,7 +2470,7 @@ module io
|
|||||||
use coordinates , only : zmin, zmax
|
use coordinates , only : zmin, zmax
|
||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
use coordinates , only : bdims => domain_base_dims
|
use coordinates , only : bdims => domain_base_dims
|
||||||
use equations , only : eqsys, eos, nv, pvars, gamma, csnd
|
use equations , only : eqsys, eos, nv, pvars, adiabatic_index, csnd
|
||||||
use evolution , only : step, time, dt, dtn
|
use evolution , only : step, time, dt, dtn
|
||||||
use iso_fortran_env, only : error_unit
|
use iso_fortran_env, only : error_unit
|
||||||
use mpitools , only : nprocs, nproc
|
use mpitools , only : nprocs, nproc
|
||||||
@ -2565,20 +2565,20 @@ module io
|
|||||||
write(lun,"(a)") '<?xml version="1.0" encoding="UTF-8"?>'
|
write(lun,"(a)") '<?xml version="1.0" encoding="UTF-8"?>'
|
||||||
write(lun,"(a)") '<AMUNFile version="1.0" byte_order="LittleEndian">'
|
write(lun,"(a)") '<AMUNFile version="1.0" byte_order="LittleEndian">'
|
||||||
write(lun,"(a)") '<Problem>'
|
write(lun,"(a)") '<Problem>'
|
||||||
call write_attribute_xml(lun, "problem" , problem_name)
|
call write_attribute_xml(lun, "problem" , problem_name)
|
||||||
write(lun,"(a)") '</Problem>'
|
write(lun,"(a)") '</Problem>'
|
||||||
write(lun,"(a)") '<Parallelization>'
|
write(lun,"(a)") '<Parallelization>'
|
||||||
call write_attribute_xml(lun, "nprocs" , nprocs)
|
call write_attribute_xml(lun, "nprocs" , nprocs)
|
||||||
call write_attribute_xml(lun, "nproc" , nproc)
|
call write_attribute_xml(lun, "nproc" , nproc)
|
||||||
write(lun,"(a)") '</Parallelization>'
|
write(lun,"(a)") '</Parallelization>'
|
||||||
write(lun,"(a)") '<Physics>'
|
write(lun,"(a)") '<Physics>'
|
||||||
call write_attribute_xml(lun, "eqsys" , eqsys)
|
call write_attribute_xml(lun, "eqsys" , eqsys)
|
||||||
call write_attribute_xml(lun, "eos" , eos)
|
call write_attribute_xml(lun, "eos" , eos)
|
||||||
call write_attribute_xml(lun, "nvars" , nv)
|
call write_attribute_xml(lun, "nvars" , nv)
|
||||||
call write_attribute_xml(lun, "gamma" , gamma)
|
call write_attribute_xml(lun, "adiabatic_index", adiabatic_index)
|
||||||
call write_attribute_xml(lun, "csnd" , csnd)
|
call write_attribute_xml(lun, "sound_speed" , csnd)
|
||||||
call write_attribute_xml(lun, "viscosity" , viscosity)
|
call write_attribute_xml(lun, "viscosity" , viscosity)
|
||||||
call write_attribute_xml(lun, "resistivity", resistivity)
|
call write_attribute_xml(lun, "resistivity" , resistivity)
|
||||||
write(lun,"(a)") '</Physics>'
|
write(lun,"(a)") '</Physics>'
|
||||||
write(lun,"(a)") '<Geometry>'
|
write(lun,"(a)") '<Geometry>'
|
||||||
call write_attribute_xml(lun, "ndims" , NDIMS)
|
call write_attribute_xml(lun, "ndims" , NDIMS)
|
||||||
@ -3931,7 +3931,7 @@ module io
|
|||||||
use coordinates , only : bdims => domain_base_dims
|
use coordinates , only : bdims => domain_base_dims
|
||||||
use coordinates , only : xmin, xmax, ymin, ymax, zmin, zmax
|
use coordinates , only : xmin, xmax, ymin, ymax, zmin, zmax
|
||||||
use coordinates , only : periodic
|
use coordinates , only : periodic
|
||||||
use equations , only : eqsys, eos, gamma, csnd
|
use equations , only : eqsys, eos, adiabatic_index, csnd
|
||||||
use evolution , only : step, time, dt, dtn
|
use evolution , only : step, time, dt, dtn
|
||||||
use forcing , only : nmodes, einj, fcoefs
|
use forcing , only : nmodes, einj, fcoefs
|
||||||
use hdf5 , only : hid_t
|
use hdf5 , only : hid_t
|
||||||
@ -4033,10 +4033,10 @@ module io
|
|||||||
call write_attribute(gid, 'dt' , dt )
|
call write_attribute(gid, 'dt' , dt )
|
||||||
call write_attribute(gid, 'dtn' , dtn )
|
call write_attribute(gid, 'dtn' , dtn )
|
||||||
if (eos == 'adi') then
|
if (eos == 'adi') then
|
||||||
call write_attribute(gid, 'gamma', gamma)
|
call write_attribute(gid, 'adiabatic_index', adiabatic_index)
|
||||||
end if
|
end if
|
||||||
if (eos == 'iso') then
|
if (eos == 'iso') then
|
||||||
call write_attribute(gid, 'csnd' , csnd )
|
call write_attribute(gid, 'sound_speed', csnd)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
! store the vector attributes
|
! store the vector attributes
|
||||||
|
@ -380,7 +380,7 @@ module problems
|
|||||||
use coordinates, only : az, adz
|
use coordinates, only : az, adz
|
||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
use equations , only : prim2cons
|
use equations , only : prim2cons
|
||||||
use equations , only : gamma
|
use equations , only : adiabatic_index
|
||||||
use equations , only : nv
|
use equations , only : nv
|
||||||
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
||||||
use parameters , only : get_parameter
|
use parameters , only : get_parameter
|
||||||
@ -462,12 +462,12 @@ module problems
|
|||||||
|
|
||||||
! get problem parameters
|
! get problem parameters
|
||||||
!
|
!
|
||||||
call get_parameter("dens" , dens )
|
call get_parameter("dens" , dens )
|
||||||
call get_parameter("ratio" , ratio )
|
call get_parameter("ratio" , ratio )
|
||||||
call get_parameter("radius", radius)
|
call get_parameter("radius" , radius)
|
||||||
call get_parameter("csnd" , csnd )
|
call get_parameter("sound_speed", csnd )
|
||||||
call get_parameter("buni" , buni )
|
call get_parameter("buni" , buni )
|
||||||
call get_parameter("angle" , angle )
|
call get_parameter("angle" , angle )
|
||||||
|
|
||||||
#if NDIMS == 3
|
#if NDIMS == 3
|
||||||
! get the fine grid resolution
|
! get the fine grid resolution
|
||||||
@ -487,7 +487,7 @@ module problems
|
|||||||
|
|
||||||
! calculate parallel and perpendicular pressures from sound speeds
|
! calculate parallel and perpendicular pressures from sound speeds
|
||||||
!
|
!
|
||||||
pr_amb = dens * csnd * csnd / gamma
|
pr_amb = dens * csnd * csnd / adiabatic_index
|
||||||
pr_ovr = pr_amb * ratio
|
pr_ovr = pr_amb * ratio
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -853,7 +853,7 @@ module problems
|
|||||||
use coordinates, only : az, adz
|
use coordinates, only : az, adz
|
||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
use equations , only : prim2cons
|
use equations , only : prim2cons
|
||||||
use equations , only : gamma
|
use equations , only : adiabatic_index
|
||||||
use equations , only : nv
|
use equations , only : nv
|
||||||
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
||||||
use parameters , only : get_parameter
|
use parameters , only : get_parameter
|
||||||
@ -965,7 +965,7 @@ module problems
|
|||||||
dn_amb = dens
|
dn_amb = dens
|
||||||
dn_ovr = dn_amb
|
dn_ovr = dn_amb
|
||||||
pr_amb = pres
|
pr_amb = pres
|
||||||
pr_ovr = (gamma - 1.0d+00) * eexp / dvol
|
pr_ovr = (adiabatic_index - 1.0d+00) * eexp / dvol
|
||||||
|
|
||||||
! calculate initial uniform field components
|
! calculate initial uniform field components
|
||||||
!
|
!
|
||||||
|
@ -502,8 +502,14 @@ module refinement
|
|||||||
!
|
!
|
||||||
integer :: i, im1, ip1
|
integer :: i, im1, ip1
|
||||||
integer :: j, jm1, jp1
|
integer :: j, jm1, jp1
|
||||||
integer :: k = 1, km1, kp1
|
integer :: k = 1
|
||||||
real(kind=8) :: fl, fr, fc, fx, fy, fz
|
#if NDIMS == 3
|
||||||
|
integer :: km1, kp1
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
real(kind=8) :: fl, fr, fc, fx, fy
|
||||||
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: fz
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
! local parameters
|
! local parameters
|
||||||
!
|
!
|
||||||
|
@ -1847,7 +1847,7 @@ module schemes
|
|||||||
vv = sum(vs(1:3) * vs( 1: 3))
|
vv = sum(vs(1:3) * vs( 1: 3))
|
||||||
vb = sum(vs(1:3) * us(ibx:ibz))
|
vb = sum(vs(1:3) * us(ibx:ibz))
|
||||||
|
|
||||||
! calculate inverse gamma
|
! calculate inverse of Lorentz factor
|
||||||
!
|
!
|
||||||
gi = 1.0d+00 - vv
|
gi = 1.0d+00 - vv
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ module shapes
|
|||||||
use coordinates , only : az, adz
|
use coordinates , only : az, adz
|
||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
use equations , only : prim2cons
|
use equations , only : prim2cons
|
||||||
use equations , only : gamma
|
use equations , only : adiabatic_index
|
||||||
use equations , only : nv
|
use equations , only : nv
|
||||||
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
||||||
use parameters , only : get_parameter
|
use parameters , only : get_parameter
|
||||||
@ -421,18 +421,18 @@ module shapes
|
|||||||
|
|
||||||
! get problem parameters
|
! get problem parameters
|
||||||
!
|
!
|
||||||
call get_parameter("dens" , dens )
|
call get_parameter("dens" , dens )
|
||||||
call get_parameter("ratio" , ratio )
|
call get_parameter("ratio" , ratio )
|
||||||
call get_parameter("radius", radius)
|
call get_parameter("radius" , radius)
|
||||||
call get_parameter("csnd" , csnd )
|
call get_parameter("sound_speed", csnd )
|
||||||
call get_parameter("buni" , buni )
|
call get_parameter("buni" , buni )
|
||||||
call get_parameter("angle" , angle )
|
call get_parameter("angle" , angle )
|
||||||
|
|
||||||
! set the conditions inside the radius
|
! set the conditions inside the radius
|
||||||
!
|
!
|
||||||
if (ipr > 0) then
|
if (ipr > 0) then
|
||||||
dn_ovr = dens
|
dn_ovr = dens
|
||||||
pr_ovr = dens * ratio * csnd * csnd / gamma
|
pr_ovr = dens * ratio * csnd * csnd / adiabatic_index
|
||||||
else
|
else
|
||||||
dn_ovr = dens * ratio
|
dn_ovr = dens * ratio
|
||||||
end if
|
end if
|
||||||
|
@ -321,7 +321,10 @@ module sources
|
|||||||
!
|
!
|
||||||
use blocks , only : block_data
|
use blocks , only : block_data
|
||||||
use coordinates , only : nn => bcells
|
use coordinates , only : nn => bcells
|
||||||
use coordinates , only : ax, ay, az, adx, ady, adz
|
use coordinates , only : ax, adx, ay, ady, adz
|
||||||
|
#if NDIMS == 3
|
||||||
|
use coordinates , only : az
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
use equations , only : inx, iny, inz
|
use equations , only : inx, iny, inz
|
||||||
use equations , only : idn, ivx, ivy, ivz, imx, imy, imz, ien
|
use equations , only : idn, ivx, ivy, ivz, imx, imy, imz, ien
|
||||||
use equations , only : ibx, iby, ibz, ibp
|
use equations , only : ibx, iby, ibz, ibp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user