MPI-AMRVAC  2.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Functions/Subroutines | Variables
mod_variables Module Reference

Functions/Subroutines

integer function var_set_fluxvar (name_cons, name_prim, ix, need_bc)
 Set generic flux variable. More...
 
integer function var_set_extravar (name_cons, name_prim, ix)
 Set extra variable, which is not advected and has no boundary conditions. This has to be done after defining flux variables and auxiliary variables. More...
 
integer function var_set_auxvar (name_cons, name_prim, ix)
 Set auxiliary variable, which is not advected but has boundary conditions. This has to be done after defining flux variables. More...
 
integer function var_set_rho ()
 Set density variable. More...
 
integer function, dimension(ndir) var_set_momentum (ndir)
 Set momentum variables. More...
 
integer function var_set_energy ()
 Set energy variable. More...
 
integer function, dimension(ndir) var_set_bfield (ndir)
 Set magnetic field variables. More...
 

Variables

integer nwflux = 0
 Number of flux variables. More...
 
integer nwfluxbc = 0
 Number of flux variables which need user to specify boundary type. More...
 
integer nwaux = 0
 Number of auxiliary variables. More...
 
integer nwextra = 0
 Number of extra variables. More...
 
integer nw = 0
 Total number of variables. More...
 
integer nws = 0
 Total number of stagger variables. More...
 
integer nvector = 0
 Number of vector variables (used for writing output) More...
 
integer, dimension(:), allocatable iw_vector
 Indices of vector variables. More...
 
integer, parameter max_nw = 50
 Maximum number of variables. More...
 
character(len=name_len), dimension(max_nwprim_wnames
 Primitive variable names. More...
 
character(len=name_len), dimension(max_nwcons_wnames
 Conservative variable names. More...
 
integer, protected iw_rho = -1
 Index of the (gas) density. More...
 
integer, dimension(:), allocatable, protected iw_mom
 Indices of the momentum density. More...
 
integer, protected iw_e = -1
 Index of the energy density. More...
 
integer, dimension(:), allocatable, protected iw_mag
 Indices of the magnetic field components. More...
 

Function/Subroutine Documentation

◆ var_set_auxvar()

integer function mod_variables::var_set_auxvar ( character(len=*), intent(in)  name_cons,
character(len=*), intent(in)  name_prim,
integer, intent(in), optional  ix 
)

Set auxiliary variable, which is not advected but has boundary conditions. This has to be done after defining flux variables.

Definition at line 105 of file mod_variables.t.

◆ var_set_bfield()

integer function, dimension(ndir) mod_variables::var_set_bfield ( integer, intent(in)  ndir)

Set magnetic field variables.

Definition at line 170 of file mod_variables.t.

Here is the call graph for this function:

◆ var_set_energy()

integer function mod_variables::var_set_energy ( )

Set energy variable.

Definition at line 157 of file mod_variables.t.

◆ var_set_extravar()

integer function mod_variables::var_set_extravar ( character(len=*), intent(in)  name_cons,
character(len=*), intent(in)  name_prim,
integer, intent(in), optional  ix 
)

Set extra variable, which is not advected and has no boundary conditions. This has to be done after defining flux variables and auxiliary variables.

Definition at line 85 of file mod_variables.t.

◆ var_set_fluxvar()

integer function mod_variables::var_set_fluxvar ( character(len=*), intent(in)  name_cons,
character(len=*), intent(in)  name_prim,
integer, intent(in), optional  ix,
logical, intent(in), optional  need_bc 
)

Set generic flux variable.

Parameters
[in]name_consConservative name
[in]name_primPrimitive name
[in]ixOptional index (to make var1, var2, ...)
[in]need_bcRequire boundary condition (default: true)

Definition at line 58 of file mod_variables.t.

◆ var_set_momentum()

integer function, dimension(ndir) mod_variables::var_set_momentum ( integer, intent(in)  ndir)

Set momentum variables.

Definition at line 137 of file mod_variables.t.

Here is the call graph for this function:

◆ var_set_rho()

integer function mod_variables::var_set_rho ( )

Set density variable.

Definition at line 124 of file mod_variables.t.

Variable Documentation

◆ cons_wnames

character(len=name_len), dimension(max_nw) mod_variables::cons_wnames

Conservative variable names.

Definition at line 38 of file mod_variables.t.

◆ iw_e

integer, protected mod_variables::iw_e = -1

Index of the energy density.

Definition at line 49 of file mod_variables.t.

◆ iw_mag

integer, dimension(:), allocatable, protected mod_variables::iw_mag

Indices of the magnetic field components.

Definition at line 52 of file mod_variables.t.

◆ iw_mom

integer, dimension(:), allocatable, protected mod_variables::iw_mom

Indices of the momentum density.

Definition at line 46 of file mod_variables.t.

◆ iw_rho

integer, protected mod_variables::iw_rho = -1

Index of the (gas) density.

Definition at line 43 of file mod_variables.t.

◆ iw_vector

integer, dimension(:), allocatable mod_variables::iw_vector

Indices of vector variables.

Definition at line 29 of file mod_variables.t.

◆ max_nw

integer, parameter mod_variables::max_nw = 50

Maximum number of variables.

Definition at line 32 of file mod_variables.t.

◆ nvector

integer mod_variables::nvector = 0

Number of vector variables (used for writing output)

Definition at line 26 of file mod_variables.t.

◆ nw

integer mod_variables::nw = 0

Total number of variables.

Definition at line 20 of file mod_variables.t.

◆ nwaux

integer mod_variables::nwaux = 0

Number of auxiliary variables.

Definition at line 14 of file mod_variables.t.

◆ nwextra

integer mod_variables::nwextra = 0

Number of extra variables.

Definition at line 17 of file mod_variables.t.

◆ nwflux

integer mod_variables::nwflux = 0

Number of flux variables.

Definition at line 8 of file mod_variables.t.

◆ nwfluxbc

integer mod_variables::nwfluxbc = 0

Number of flux variables which need user to specify boundary type.

Definition at line 11 of file mod_variables.t.

◆ nws

integer mod_variables::nws = 0

Total number of stagger variables.

Definition at line 23 of file mod_variables.t.

◆ prim_wnames

character(len=name_len), dimension(max_nw) mod_variables::prim_wnames

Primitive variable names.

Definition at line 35 of file mod_variables.t.