Merge branch 'master' into reconnection
This commit is contained in:
commit
2d4ac65efb
@ -66,7 +66,7 @@ if(ENABLE_MPI)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_OPENMP "Enable OpenMP support." ON)
|
option(ENABLE_OPENMP "Enable OpenMP support." OFF)
|
||||||
if(ENABLE_OPENMP)
|
if(ENABLE_OPENMP)
|
||||||
find_package(OpenMP COMPONENTS Fortran)
|
find_package(OpenMP COMPONENTS Fortran)
|
||||||
if(OpenMP_Fortran_FOUND)
|
if(OpenMP_Fortran_FOUND)
|
||||||
|
@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="amunpy",
|
name="amunpy",
|
||||||
version="0.9.7",
|
version="0.9.8",
|
||||||
author="Grzegorz Kowal",
|
author="Grzegorz Kowal",
|
||||||
author_email="grzegorz@amuncode.org",
|
author_email="grzegorz@amuncode.org",
|
||||||
description="Python Interface for the AMUN code's snapshots",
|
description="Python Interface for the AMUN code's snapshots",
|
||||||
|
@ -21,6 +21,6 @@ __all__ = [ 'AmunXML', 'AmunH5', 'WriteVTK', \
|
|||||||
|
|
||||||
__author__ = "Grzegorz Kowal"
|
__author__ = "Grzegorz Kowal"
|
||||||
__copyright__ = "Copyright 2018-2022 Grzegorz Kowal <grzegorz@amuncode.org>"
|
__copyright__ = "Copyright 2018-2022 Grzegorz Kowal <grzegorz@amuncode.org>"
|
||||||
__version__ = "0.9.7"
|
__version__ = "0.9.8"
|
||||||
__maintainer__ = "Grzegorz Kowal"
|
__maintainer__ = "Grzegorz Kowal"
|
||||||
__email__ = "grzegorz@amuncode.org"
|
__email__ = "grzegorz@amuncode.org"
|
||||||
|
@ -177,14 +177,18 @@ class Amun:
|
|||||||
"""
|
"""
|
||||||
Add derived variables.
|
Add derived variables.
|
||||||
"""
|
"""
|
||||||
|
denflag = 'dens' in self.variables
|
||||||
|
preflag = 'pres' in self.variables
|
||||||
|
velflag = all(v in self.variables for v in ['velx','vely','velz'])
|
||||||
|
magflag = all(v in self.variables for v in ['magx','magy','magz'])
|
||||||
self.variables['refinement level'] = 'mlev'
|
self.variables['refinement level'] = 'mlev'
|
||||||
if 'dens' in self.variables:
|
if denflag:
|
||||||
self.variables['density'] = 'dens'
|
self.variables['density'] = 'dens'
|
||||||
self.variables['logarithm of density'] = 'logd'
|
self.variables['logarithm of density'] = 'logd'
|
||||||
if 'pres' in self.variables or self.attributes['eos'] == 'iso':
|
if preflag or self.attributes['eos'] == 'iso':
|
||||||
self.variables['pressure'] = 'pres'
|
self.variables['pressure'] = 'pres'
|
||||||
self.variables['logarithm of pressure'] = 'logp'
|
self.variables['logarithm of pressure'] = 'logp'
|
||||||
if all(v in self.variables for v in ['velx','vely','velz']):
|
if velflag:
|
||||||
self.variables['velocity'] = 'vvec'
|
self.variables['velocity'] = 'vvec'
|
||||||
self.variables['velocity magnitude'] = 'velo'
|
self.variables['velocity magnitude'] = 'velo'
|
||||||
self.variables['x-velocity'] = 'velx'
|
self.variables['x-velocity'] = 'velx'
|
||||||
@ -196,7 +200,7 @@ class Amun:
|
|||||||
self.variables['z-vorticity'] = 'vorz'
|
self.variables['z-vorticity'] = 'vorz'
|
||||||
self.variables['vorticity'] = 'wvec'
|
self.variables['vorticity'] = 'wvec'
|
||||||
self.variables['vorticity magnitude'] = 'vort'
|
self.variables['vorticity magnitude'] = 'vort'
|
||||||
if all(v in self.variables for v in ['magx','magy','magz']):
|
if magflag:
|
||||||
self.variables['magnetic field'] = 'bvec'
|
self.variables['magnetic field'] = 'bvec'
|
||||||
self.variables['magnetic field magnitude'] = 'magn'
|
self.variables['magnetic field magnitude'] = 'magn'
|
||||||
self.variables['x-magnetic field'] = 'magx'
|
self.variables['x-magnetic field'] = 'magx'
|
||||||
@ -210,25 +214,22 @@ class Amun:
|
|||||||
self.variables['current density magnitude'] = 'curr'
|
self.variables['current density magnitude'] = 'curr'
|
||||||
if 'bpsi' in self.variables:
|
if 'bpsi' in self.variables:
|
||||||
self.variables['magnetic divergence potential'] = 'bpsi'
|
self.variables['magnetic divergence potential'] = 'bpsi'
|
||||||
if 'pres' in self.variables and 'adiabatic_index' in self.attributes:
|
if preflag and 'adiabatic_index' in self.attributes:
|
||||||
self.variables['internal energy'] = 'eint'
|
self.variables['internal energy'] = 'eint'
|
||||||
if all(v in self.variables for v in ['dens', 'pres']):
|
if denflag and preflag:
|
||||||
self.variables['temperature'] = 'temp'
|
self.variables['temperature'] = 'temp'
|
||||||
if self.attributes['eqsys'] in [ 'hd', 'mhd' ] \
|
if self.attributes['eqsys'] in ['hd','mhd'] and denflag and velflag:
|
||||||
and all(v in self.variables for v in ['dens','velx','vely','velz']):
|
|
||||||
self.variables['kinetic energy'] = 'ekin'
|
self.variables['kinetic energy'] = 'ekin'
|
||||||
if self.attributes['eqsys'] in [ 'mhd', 'srmhd' ] \
|
if self.attributes['eqsys'] in ['mhd','srmhd'] and magflag:
|
||||||
and all(v in self.variables for v in ['magx','magy','magz']):
|
|
||||||
self.variables['magnetic energy'] = 'emag'
|
self.variables['magnetic energy'] = 'emag'
|
||||||
self.variables['magnetic pressure'] = 'emag'
|
self.variables['magnetic pressure'] = 'emag'
|
||||||
if all(v in self.variables for v in ['velx','vely','velz', 'magx','magy','magz']) in self.variables:
|
if velflag and magflag:
|
||||||
self.variables['electric field'] = 'evec'
|
self.variables['electric field'] = 'evec'
|
||||||
self.variables['electric field magnitude'] = 'elec'
|
self.variables['electric field magnitude'] = 'elec'
|
||||||
self.variables['x-electric field'] = 'elex'
|
self.variables['x-electric field'] = 'elex'
|
||||||
self.variables['y-electric field'] = 'eley'
|
self.variables['y-electric field'] = 'eley'
|
||||||
self.variables['z-electric field'] = 'elez'
|
self.variables['z-electric field'] = 'elez'
|
||||||
if self.attributes['eqsys'] in [ 'srhd', 'srmhd' ] \
|
if self.attributes['eqsys'] in ['srhd','srmhd'] and velflag:
|
||||||
and all(v in self.variables for v in ['velx','vely','velz']):
|
|
||||||
self.variables['Lorentz factor'] = 'lore'
|
self.variables['Lorentz factor'] = 'lore'
|
||||||
|
|
||||||
delete_datasets = ['dens','pres','velx','vely','velz','magx','magy','magz','bpsi']
|
delete_datasets = ['dens','pres','velx','vely','velz','magx','magy','magz','bpsi']
|
||||||
|
@ -316,7 +316,7 @@ module boundaries
|
|||||||
#ifdef MPI
|
#ifdef MPI
|
||||||
use blocks , only : block_info, pointer_info
|
use blocks , only : block_info, pointer_info
|
||||||
#endif /* MPI */
|
#endif /* MPI */
|
||||||
use blocks , only : ndims, nsides
|
use blocks , only : nsides
|
||||||
use coordinates, only : minlev, maxlev
|
use coordinates, only : minlev, maxlev
|
||||||
use coordinates, only : nh => ncells_half
|
use coordinates, only : nh => ncells_half
|
||||||
use coordinates, only : nb, ne, nbm, nbp, nem, nep
|
use coordinates, only : nb, ne, nbm, nbp, nem, nep
|
||||||
@ -862,7 +862,6 @@ module boundaries
|
|||||||
!
|
!
|
||||||
subroutine boundary_variables(t, dt, status)
|
subroutine boundary_variables(t, dt, status)
|
||||||
|
|
||||||
use blocks , only : ndims
|
|
||||||
use coordinates, only : minlev, maxlev
|
use coordinates, only : minlev, maxlev
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -1391,7 +1391,11 @@ module equations
|
|||||||
use blocks , only : block_data
|
use blocks , only : block_data
|
||||||
use coordinates, only : nn => bcells
|
use coordinates, only : nn => bcells
|
||||||
use helpers , only : print_message
|
use helpers , only : print_message
|
||||||
|
#if NDIMS == 3
|
||||||
use coordinates, only : ax, ay, az
|
use coordinates, only : ax, ay, az
|
||||||
|
#else /* NDIMS == 3 */
|
||||||
|
use coordinates, only : ax, ay
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user