MPI-AMRVAC  2.0
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Data Types | Modules | Functions/Subroutines | Variables
mod_global_parameters.t File Reference

Go to the source code of this file.

Data Types

type  mod_global_parameters::fluxalloc
 

Modules

module  mod_global_parameters
 This module contains definitions of global parameters and variables and some generic functions/subroutines used in AMRVAC.
 

Functions/Subroutines

pure subroutine mod_global_parameters::cross_product (ixIL, ixOL, a, b, axb)
 Cross product of two vectors. More...
 

Variables

character(len= *), parameter mod_global_parameters::undefined = 'undefined'
 
integer mod_global_parameters::npe
 The number of MPI tasks. More...
 
integer mod_global_parameters::mype
 The rank of the current MPI task. More...
 
integer mod_global_parameters::icomm
 The MPI communicator. More...
 
integer mod_global_parameters::ierrmpi
 A global MPI error return code. More...
 
integer mod_global_parameters::log_fh
 MPI file handle for logfile. More...
 
integer mod_global_parameters::type_block
 MPI type for block including ghost cells and its size. More...
 
integer mod_global_parameters::size_block
 
integer mod_global_parameters::type_coarse_block
 MPI type for block coarsened by 2, and for its children blocks. More...
 
integer, dimension(2^d &) mod_global_parameters::type_sub_block
 
integer mod_global_parameters::type_block_io
 MPI type for IO: block excluding ghost cells. More...
 
integer mod_global_parameters::size_block_io
 
integer mod_global_parameters::type_block_io_tf
 MPI type for IO: transformed data excluding ghost cells. More...
 
integer mod_global_parameters::size_block_io_tf
 
integer mod_global_parameters::type_block_xc_io
 MPI type for IO: cell corner (xc) or cell center (xcc) coordinates. More...
 
integer mod_global_parameters::type_block_xcc_io
 
integer mod_global_parameters::type_block_wc_io
 MPI type for IO: cell corner (wc) or cell center (wcc) variables. More...
 
integer mod_global_parameters::type_block_wcc_io
 
integer mod_global_parameters::itag
 
integer mod_global_parameters::irecv
 
integer mod_global_parameters::isend
 
integer, dimension(:), allocatable mod_global_parameters::recvrequest
 
integer, dimension(:), allocatable mod_global_parameters::sendrequest
 
integer, dimension(:,:), allocatable mod_global_parameters::recvstatus
 
integer, dimension(:,:), allocatable mod_global_parameters::sendstatus
 
integer mod_global_parameters::ixm
 the mesh range (within a block with ghost cells) More...
 
integer mod_global_parameters::ll
 
double precision mod_global_parameters::xprob
 minimum and maximum domain boundaries for each dimension More...
 
double precision mod_global_parameters::l
 
integer mod_global_parameters::r_ = -1
 Indices for cylindrical coordinates FOR TESTS, negative value when not used: More...
 
integer mod_global_parameters::phi_ = -1
 
integer mod_global_parameters::z_ = -1
 
integer, parameter mod_global_parameters::ndim =^ND
 Number of spatial dimensions for grid variables. More...
 
integer mod_global_parameters::ndir =ndim
 Number of spatial dimensions (components) for vector variables. More...
 
logical mod_global_parameters::slab
 Cartesian geometry or not. More...
 
integer, dimension(:), allocatable mod_global_parameters::ng
 number of grid blocks in domain per dimension, in array over levels More...
 
integer, dimension(:), allocatable, parameter mod_global_parameters::d = 1|
 
double precision, dimension(:), allocatable mod_global_parameters::dg
 extent of grid blocks in domain per dimension, in array over levels More...
 
integer mod_global_parameters::domain_nx
 number of cells for each dimension in level-one mesh More...
 
integer mod_global_parameters::block_nx
 number of cells for each dimension in grid block excluding ghostcells More...
 
integer, parameter mod_global_parameters::ixglo
 Lower index of grid block arrays (always 1) More...
 
integer mod_global_parameters::ixghi
 Upper index of grid block arrays. More...
 
integer, parameter mod_global_parameters::ixgslo
 Lower index of stagger grid block arrays (always 0) More...
 
integer mod_global_parameters::ixgshi
 Upper index of stagger grid block arrays. More...
 
integer mod_global_parameters::nghostcells
 Number of ghost cells surrounding a grid. More...
 
integer, parameter mod_global_parameters::stretch_none = 0
 No stretching. More...
 
integer, parameter mod_global_parameters::stretch_uni = 1
 Unidirectional stretching from a side. More...
 
integer, parameter mod_global_parameters::stretch_symm = 2
 Symmetric stretching around the center. More...
 
logical mod_global_parameters::stretch_uncentered
 If true, adjust mod_geometry routines to account for grid stretching (but the flux computation will not) More...
 
logical mod_global_parameters::slab_stretched
 Stretched Cartesian geometry or not. More...
 
logical, dimension(ndim) mod_global_parameters::stretched_dim
 True if a dimension is stretched. More...
 
integer, dimension(ndim) mod_global_parameters::stretch_type
 What kind of stretching is used per dimension. More...
 
double precision, dimension(ndim) mod_global_parameters::qstretch_baselevel
 stretch factor between cells at AMR level 1, per dimension More...
 
integer, dimension(ndim) mod_global_parameters::nstretchedblocks_baselevel
 (even) number of (symmetrically) stretched blocks at AMR level 1, per dimension More...
 
integer, dimension(:,:), allocatable mod_global_parameters::nstretchedblocks
 (even) number of (symmetrically) stretched blocks per level and dimension More...
 
double precision mod_global_parameters::xstretch
 physical extent of stretched border in symmetric stretching More...
 
double precision, dimension(:,:), allocatable mod_global_parameters::qstretch
 Stretching factors and first cell size for each AMR level and dimension. More...
 
double precision, dimension(:,:), allocatable mod_global_parameters::dxfirst
 
double precision, dimension(:,:), allocatable mod_global_parameters::dxfirst_1mq
 
double precision, dimension(:,:), allocatable mod_global_parameters::dxmid
 
integer, parameter mod_global_parameters::nodehi =^ND+1
 grid hierarchy info (level and grid indices) More...
 
integer, parameter mod_global_parameters::plevel_ =1
 
integer, parameter mod_global_parameters::pig
 
integer, parameter mod_global_parameters::d_ =plevel_+^D
 
integer, dimension(:,:), allocatable mod_global_parameters::node
 
integer, dimension(:,:), allocatable mod_global_parameters::node_sub
 
integer, parameter mod_global_parameters::rnodehi =3*^ND
 grid location info (corner coordinates and grid spacing) More...
 
integer, parameter mod_global_parameters::rpxmin0_ =0
 
integer, parameter mod_global_parameters::rpxmin
 
integer, parameter mod_global_parameters::rpxmax0_ =^ND
 
integer, parameter mod_global_parameters::rpxmax
 
integer, parameter mod_global_parameters::rpdx
 
double precision, dimension(:,:), allocatable mod_global_parameters::rnode
 Corner coordinates. More...
 
double precision, dimension(:,:), allocatable mod_global_parameters::rnode_sub
 
double precision, dimension(:,:), allocatable mod_global_parameters::dx
 
double precision, dimension(ndim) mod_global_parameters::dxlevel
 
integer, parameter mod_global_parameters::nsavehi =100
 Maximum number of saves that can be defined by tsave or itsave. More...
 
integer, parameter mod_global_parameters::nfile = 5
 Number of output methods. More...
 
character(len=40), dimension(nfile), parameter mod_global_parameters::output_names = ['log ', 'normal ', 'slice ', 'collapsed', 'analysis ']
 Names of the output methods. More...
 
logical, dimension(ndim) mod_global_parameters::collapse
 If collapse(DIM) is true, generate output integrated over DIM. More...
 
double precision, dimension(nsavehi, nfile) mod_global_parameters::tsave
 Save output of type N on times tsave(:, N) More...
 
double precision, dimension(nfile) mod_global_parameters::tsavelast
 
double precision, dimension(nfile) mod_global_parameters::dtsave
 Repeatedly save output of type N when dtsave(N) simulation time has passed. More...
 
integer, dimension(nsavehi, nfile) mod_global_parameters::itsave
 Save output of type N on iterations itsave(:, N) More...
 
integer, dimension(nfile) mod_global_parameters::itsavelast
 
integer, dimension(nfile) mod_global_parameters::ditsave
 Repeatedly save output of type N when ditsave(N) time steps have passed. More...
 
integer, dimension(nfile) mod_global_parameters::isavet
 
integer, dimension(nfile) mod_global_parameters::isaveit
 
integer mod_global_parameters::collapselevel
 The level at which to produce line-integrated / collapsed output. More...
 
integer, dimension(1:nfile) mod_global_parameters::n_saves
 Number of saved files of each type. More...
 
double precision mod_global_parameters::time_between_print
 to monitor timeintegration loop at given wall-clock time intervals More...
 
double precision mod_global_parameters::time_bc
 accumulated wall-clock time spent on boundary conditions More...
 
integer mod_global_parameters::snapshotnext
 IO: snapshot and collapsed views output numbers/labels. More...
 
integer mod_global_parameters::collapsenext
 
integer, parameter mod_global_parameters::filelog_ = 1
 Constant indicating log output. More...
 
integer, parameter mod_global_parameters::fileout_ = 2
 Constant indicating regular output. More...
 
integer, parameter mod_global_parameters::fileslice_ = 3
 Constant indicating slice output. More...
 
integer, parameter mod_global_parameters::filecollapse_ = 4
 Constant indicating collapsed output. More...
 
integer, parameter mod_global_parameters::fileanalysis_ = 5
 Constant indicating analysis output (see Writing a custom analysis subroutine) More...
 
integer, parameter mod_global_parameters::unitstdin =5
 Unit for standard input. More...
 
integer, parameter mod_global_parameters::unitterm =6
 Unit for standard output. More...
 
integer, parameter mod_global_parameters::uniterr =6
 Unit for error messages. More...
 
integer, parameter mod_global_parameters::unitpar =9
 
integer, parameter mod_global_parameters::unitconvert =10
 
integer, parameter mod_global_parameters::unitslice =11
 
integer, parameter mod_global_parameters::unitsnapshot =12
 
integer, parameter mod_global_parameters::unitcollapse =13
 
integer, parameter mod_global_parameters::unitanalysis =14
 
integer mod_global_parameters::nwauxio
 Number of auxiliary variables that are only included in output. More...
 
logical mod_global_parameters::nocartesian
 IO switches for conversion. More...
 
logical, dimension(:), allocatable mod_global_parameters::w_write
 
logical, dimension(:), allocatable mod_global_parameters::writelevel
 
double precision, dimension(ndim, 2) mod_global_parameters::writespshift
 
integer mod_global_parameters::level_io
 
integer mod_global_parameters::level_io_min
 
integer mod_global_parameters::level_io_max
 
character(len=std_len), dimension(:), allocatable mod_global_parameters::par_files
 Which par files are used as input. More...
 
character(len=std_len) mod_global_parameters::base_filename
 Base file name for simulation output, which will be followed by a number. More...
 
character(len=std_len) mod_global_parameters::restart_from_file
 If not 'unavailable', resume from snapshot with this base file name. More...
 
character(len=std_len) mod_global_parameters::typefilelog
 Which type of log to write: 'normal', 'special', 'regression_test'. More...
 
integer mod_global_parameters::snapshotini
 Resume from the snapshot with this index. More...
 
logical mod_global_parameters::resume_previous_run
 If true, restart a previous run from the latest snapshot. More...
 
logical mod_global_parameters::convert
 If true and restart_from_file is given, convert snapshots to other file formats. More...
 
logical mod_global_parameters::autoconvert
 If true, already convert to output format during the run. More...
 
logical mod_global_parameters::saveprim
 If true, convert from conservative to primitive variables in output. More...
 
character(len=std_len) mod_global_parameters::convert_type
 Which format to use when converting. More...
 
character(len=std_len) mod_global_parameters::collapse_type
 
double precision, dimension(:), allocatable mod_global_parameters::w_convert_factor
 Conversion factors the primitive variables. More...
 
double precision mod_global_parameters::length_convert_factor
 
double precision mod_global_parameters::time_convert_factor
 Conversion factor for time unit. More...
 
integer mod_global_parameters::saveigrid
 
double precision mod_global_parameters::xload
 Stores the memory and load imbalance, used in printlog. More...
 
double precision mod_global_parameters::xmemory
 
logical mod_global_parameters::crash =.false.
 Save a snapshot before crash a run met unphysical values. More...
 
double precision mod_global_parameters::unit_length =1.d0
 Physical scaling factor for length. More...
 
double precision mod_global_parameters::unit_time =1.d0
 Physical scaling factor for time. More...
 
double precision mod_global_parameters::unit_density =1.d0
 Physical scaling factor for density. More...
 
double precision mod_global_parameters::unit_velocity =0.d0
 Physical scaling factor for velocity. More...
 
double precision mod_global_parameters::unit_temperature =1.d0
 Physical scaling factor for temperature. More...
 
double precision mod_global_parameters::unit_pressure =1.d0
 Physical scaling factor for pressure. More...
 
double precision mod_global_parameters::unit_magneticfield =1.d0
 Physical scaling factor for magnetic field. More...
 
double precision mod_global_parameters::unit_numberdensity =1.d0
 Physical scaling factor for number density. More...
 
double precision mod_global_parameters::small_temperature
 error handling More...
 
double precision mod_global_parameters::small_pressure
 
double precision mod_global_parameters::small_density
 
double precision mod_global_parameters::bdip =0.d0
 amplitude of background dipolar, quadrupolar, octupolar, user's field More...
 
double precision mod_global_parameters::bquad =0.d0
 
double precision mod_global_parameters::boct =0.d0
 
double precision mod_global_parameters::busr =0.d0
 
logical mod_global_parameters::check_small_values =.false.
 check and optionally fix unphysical small values (density, gas pressure) More...
 
logical mod_global_parameters::small_values_use_primitive =.false.
 Use primitive variables when correcting small values. More...
 
logical, dimension(:), allocatable mod_global_parameters::small_values_fix_iw
 Whether to apply small value fixes to certain variables. More...
 
logical mod_global_parameters::b0field =.false.
 split magnetic field as background B0 field More...
 
logical mod_global_parameters::si_unit =.false.
 Use SI units (.true.) or use cgs units (.false.) More...
 
logical mod_global_parameters::phys_energy =.true.
 Solve energy equation or not. More...
 
logical mod_global_parameters::solve_internal_e =.false.
 Solve polytropic process instead of solving total energy. More...
 
logical mod_global_parameters::angmomfix =.false.
 Enable to strictly conserve the angular momentum (works both in cylindrical and spherical coordinates) More...
 
logical mod_global_parameters::use_particles =.false.
 Use particles module or not. More...
 
logical mod_global_parameters::use_multigrid = .false.
 Use multigrid (only available in 2D and 3D) More...
 
integer mod_global_parameters::max_blocks
 The maximum number of grid blocks in a processor. More...
 
integer, parameter mod_global_parameters::nlevelshi = 20
 The maximum number of levels in the grid refinement. More...
 
integer mod_global_parameters::refine_max_level
 Maximal number of AMR levels. More...
 
double precision, dimension(:), allocatable mod_global_parameters::w_refine_weight
 Weights of variables used to calculate error for mesh refinement. More...
 
double precision mod_global_parameters::tfixgrid
 Fix the AMR grid after this time. More...
 
integer mod_global_parameters::itfixgrid
 Fix the AMR grid after this many time steps. More...
 
integer mod_global_parameters::ditregrid
 Reconstruct the AMR grid once every ditregrid iteration(s) More...
 
double precision, dimension(:), allocatable mod_global_parameters::amr_wavefilter
 refinement: lohner estimate wavefilter setting More...
 
integer mod_global_parameters::refine_criterion
 
logical mod_global_parameters::prolongprimitive
 
logical mod_global_parameters::coarsenprimitive
 
double precision, dimension(:), allocatable mod_global_parameters::refine_threshold
 Error tolerance for refinement decision. More...
 
double precision, dimension(:), allocatable mod_global_parameters::derefine_ratio
 
logical mod_global_parameters::reset_grid
 If true, rebuild the AMR grid upon restarting. More...
 
logical mod_global_parameters::stagger_grid =.false.
 True for using stagger grid. More...
 
integer mod_global_parameters::nbufferx
 Number of cells as buffer zone. More...
 
integer mod_global_parameters::levmin
 
integer mod_global_parameters::levmax
 
integer mod_global_parameters::levmax_sub
 
integer mod_global_parameters::iprob
 problem switch allowing different setups in same usr_mod.t More...
 
integer, dimension(3, 3) mod_global_parameters::kr
 Kronecker delta tensor. More...
 
integer, dimension(3, 3, 3) mod_global_parameters::lvc
 Levi-Civita tensor. More...
 
double precision mod_global_parameters::dt
 
double precision, dimension(:), allocatable mod_global_parameters::dt_grid
 
logical mod_global_parameters::time_advance
 
double precision mod_global_parameters::courantpar
 The Courant (CFL) number used for the simulation. More...
 
character(len=std_len) mod_global_parameters::typecourant
 How to compute the CFL-limited time step. More...
 
double precision mod_global_parameters::dtpar
 If dtpar is positive, it sets the timestep dt, otherwise courantpar is used to limit the time step based on the Courant condition. More...
 
double precision mod_global_parameters::dtdiffpar
 For resistive MHD, the time step is also limited by the diffusion time: \( dt < dtdiffpar \times dx^2/eta \). More...
 
double precision mod_global_parameters::global_time
 The global simulation time. More...
 
double precision mod_global_parameters::time_init
 Start time for the simulation. More...
 
double precision mod_global_parameters::time_max
 End time for the simulation. More...
 
double precision mod_global_parameters::wall_time_max
 Ending wall time (in hours) for the simulation. More...
 
double precision mod_global_parameters::dtmin
 Stop the simulation when the time step becomes smaller than this value. More...
 
logical mod_global_parameters::reset_time
 If true, reset iteration count and global_time to original values, and start writing snapshots at index 0. More...
 
logical mod_global_parameters::reset_it
 If true, reset iteration count to 0. More...
 
logical mod_global_parameters::firstprocess
 If true, call initonegrid_usr upon restarting. More...
 
logical mod_global_parameters::pass_wall_time
 If true, wall time is up, modify snapshotnext for later overwrite. More...
 
integer mod_global_parameters::it
 Number of time steps taken. More...
 
integer mod_global_parameters::it_max
 Stop the simulation after this many time steps have been taken. More...
 
integer mod_global_parameters::it_init
 initial iteration count More...
 
integer mod_global_parameters::slowsteps
 If > 1, then in the first slowsteps-1 time steps dt is reduced by a factor \( 1 - (1- step/slowsteps)^2 \). More...
 
integer mod_global_parameters::istep
 Index of the sub-step in a multi-step time integrator. More...
 
integer mod_global_parameters::nstep
 How many sub-steps the time integrator takes. More...
 
character(len=std_len) mod_global_parameters::time_integrator
 Which time integrator to use. More...
 
character(len=std_len) mod_global_parameters::typelimited
 What should be used as a basis for the limiting in TVD methods. Options are 'original', 'previous' and 'predictor'. More...
 
character(len=std_len) mod_global_parameters::typesourcesplit
 How to apply dimensional splitting to the source terms, see disretization.md. More...
 
character(len=std_len), dimension(:), allocatable mod_global_parameters::flux_scheme
 Which spatial discretization to use (per grid level) More...
 
character(len=std_len), dimension(:), allocatable mod_global_parameters::typepred1
 The spatial dicretization for the predictor step when using a two step method. More...
 
integer, dimension(:), allocatable mod_global_parameters::type_limiter
 Type of slope limiter used for reconstructing variables on cell edges. More...
 
integer, dimension(:), allocatable mod_global_parameters::type_gradient_limiter
 Type of slope limiter used for computing gradients or divergences, when typegrad or typediv are set to 'limited'. More...
 
integer mod_global_parameters::typelimiter
 
integer mod_global_parameters::typegradlimiter
 
character(len=std_len) mod_global_parameters::typeprolonglimit
 Limiter used for prolongation to refined grids and ghost cells. More...
 
character(len=std_len), dimension(:), allocatable mod_global_parameters::typeentropy
 Which type of entropy fix to use with Riemann-type solvers. More...
 
character(len=std_len) mod_global_parameters::typetvd
 Which type of TVD method to use. More...
 
character(len=std_len) mod_global_parameters::typeboundspeed
 Which type of TVDLF method to use. More...
 
character(len=std_len) mod_global_parameters::typeaverage
 
character(len=std_len) mod_global_parameters::typedimsplit
 
character(len=std_len) mod_global_parameters::typeaxial ='default'
 
character(len=std_len) mod_global_parameters::typepoly
 
integer mod_global_parameters::nxdiffusehllc
 
double precision, dimension(:), allocatable mod_global_parameters::entropycoef
 
double precision mod_global_parameters::tvdlfeps
 
logical, dimension(:), allocatable mod_global_parameters::loglimit
 
logical, dimension(:), allocatable mod_global_parameters::logflag
 
logical mod_global_parameters::flathllc
 
logical mod_global_parameters::flatcd
 
logical mod_global_parameters::flatsh
 
logical mod_global_parameters::source_split_usr
 Use split or unsplit way to add user's source terms, default: unsplit. More...
 
logical mod_global_parameters::dimsplit
 
character(len=std_len) mod_global_parameters::typediv
 
character(len=std_len) mod_global_parameters::typegrad
 
character(len=std_len) mod_global_parameters::typecurl
 
double precision mod_global_parameters::cmax_global
 global fastest wave speed needed in fd scheme and glm method More...
 
double precision mod_global_parameters::vmax_global
 global fastest flow speed needed in glm method More...
 
logical mod_global_parameters::need_global_cmax =.false.
 need global maximal wave speed More...
 
logical mod_global_parameters::need_global_vmax =.false.
 need global maximal flow speed More...
 
logical, dimension(ndim) mod_global_parameters::periodb
 True for dimensions with periodic boundaries. More...
 
logical, dimension(2, ndim) mod_global_parameters::poleb
 Indicates whether there is a pole at a boundary. More...
 
logical, dimension(ndim) mod_global_parameters::aperiodb
 True for dimensions with aperiodic boundaries. More...
 
logical mod_global_parameters::save_physical_boundary
 True for save physical boundary cells in dat files. More...
 
character(len=std_len), dimension(:, :), allocatable mod_global_parameters::typeboundary
 Array indicating the type of boundary condition per variable and per physical boundary. More...
 
character(len=std_len) mod_global_parameters::typeghostfill ='linear'
 
character(len=std_len) mod_global_parameters::prolongation_method
 
logical mod_global_parameters::internalboundary
 
integer, parameter mod_global_parameters::ismin
 
integer, parameter mod_global_parameters::ismax
 
type(fluxalloc), dimension(:,:,:), allocatable mod_global_parameters::pflux
 store flux to fix conservation More...
 
logical, dimension(:), allocatable mod_global_parameters::phyboundblock