MPI-AMRVAC  3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Data Types | Variables
mod_usr_methods Module Reference

Module with all the methods that users can customize in AMRVAC. More...

Data Types

interface  p_no_args
 
interface  init_one_grid
 Initialize one grid. More...
 
interface  special_bc
 special boundary types, users must assign conservative variables in boundaries More...
 
interface  special_mg_bc
 Special boundary type for radiation hydrodynamics module, only used to set the boundary conditions for the radiation energy. More...
 
interface  internal_bc
 internal boundary, user defined This subroutine can be used to artificially overwrite ALL conservative variables in a user-selected region of the mesh, and thereby act as an internal boundary region. It is called just before external (ghost cell) boundary regions will be set by the BC selection. Here, you could e.g. want to introduce an extra variable (nwextra, to be distinguished from nwaux) which can be used to identify the internal boundary region location. Its effect should always be local as it acts on the mesh. More...
 
interface  process_grid
 this subroutine is ONLY to be used for computing auxiliary variables which happen to be non-local (like div v), and are in no way used for flux computations. As auxiliaries, they are also not advanced More...
 
interface  sub_modify_io
 If defined, this routine is called before writing output, and it can set/modify the variables in the w array. More...
 
interface  process_global
 This subroutine is called at the beginning of each time step by each processor. No communication is specified, so the user has to implement MPI routines if information has to be shared. More...
 
interface  process_adv_grid
 for processing after the advance (PIC-MHD, e.g.) More...
 
interface  process_adv_global
 for processing after the advance (PIC-MHD, e.g.) More...
 
interface  aux_output
 this subroutine can be used in convert, to add auxiliary variables to the converted output file, for further analysis using tecplot, paraview, .... these auxiliary values need to be stored in the nw+1:nw+nwauxio slots More...
 
interface  add_aux_names
 Add names for the auxiliary variables. More...
 
interface  source
 Calculate w(iw)=w(iw)+qdt*SOURCE[wCT,qtC,x] within ixO for all indices iw=iwmin...iwmax. wCT is at time qCT. More...
 
interface  get_dt
 Limit "dt" further if necessary, e.g. due to the special source terms. The getdt_courant (CFL condition) and the getdt subroutine in the AMRVACPHYS module have already been called. More...
 
interface  phys_gravity
 Calculate gravitational acceleration in each dimension. More...
 
interface  phys_dust_get_3d_dragforce
 Calculate the 3d drag force of gas onto dust. More...
 
interface  phys_dust_get_dt
 Calculate the time step associated with the usr drag force. More...
 
interface  phys_visco
 Calculation anormal viscosity depending on space. More...
 
interface  hd_pthermal
 Calculation anormal pressure for hd & energy=.False. More...
 
interface  Rfactor
 Calculation R factor for ideal gas law with partial ionization. More...
 
interface  special_resistivity
 Set the "eta" array for resistive MHD based on w or the "current" variable which has components between idirmin and 3. More...
 
interface  special_opacity
 Set user defined opacity for use in diffusion coeff, heating and cooling, and radiation force. More...
 
interface  special_aniso_opacity
 Set user defined, anisotropic opacity for use in diffusion coeff, heating and cooling, and radiation force. More...
 
interface  special_opacity_qdot
 Set user defined opacity for use in diffusion coeff, heating and cooling, and radiation force. Overwrites special_opacity. More...
 
interface  special_fluxlimiter
 Set user defined FLD flux limiter, lambda. More...
 
interface  special_diffcoef
 Set user defined FLD diffusion coefficient. More...
 
interface  refine_grid
 Enforce additional refinement or coarsening One can use the coordinate info in x and/or time qt=t_n and w(t_n) values w. you must set consistent values for integers refine/coarsen: refine = -1 enforce to not refine refine = 0 doesn't enforce anything refine = 1 enforce refinement coarsen = -1 enforce to not coarsen coarsen = 0 doesn't enforce anything coarsen = 1 enforce coarsen e.g. refine for negative first coordinate x < 0 as if (any(x(ix^S,1) < zero)) refine=1. More...
 
interface  var_for_errest
 this is the place to compute a local auxiliary variable to be used as refinement criterion for the Lohner error estimator only -->it is then requiring and iflag>nw note that ixO=ixI=ixG, hence the term local (gradients need special attention!) More...
 
interface  set_B0
 Here one can add a steady (time-independent) potential background field. More...
 
interface  set_J0
 Here one can add a time-independent background current density. More...
 
interface  set_equi_vars
 Here one can add a steady (time-independent) equi vars. More...
 
interface  transform_w
 adjust w when restart from dat file with different w variables More...
 
interface  a_refine_threshold
 use different threshold in special regions for AMR to reduce/increase resolution there where nothing/something interesting happens. More...
 
interface  special_convert
 Allow user to use their own data-postprocessing procedures. More...
 
interface  flag_grid
 flag=-1 : Treat all cells active, omit deactivation (onentry, default) flag=0 : Treat as normal domain flag=1 : Treat as passive, but reduce by safety belt flag=2 : Always treat as passive More...
 
interface  update_payload
 Update payload of particles. More...
 
interface  create_particles
 Create particles. More...
 
interface  check_particle
 Check arbitrary particle conditions or modifications. More...
 
interface  particle_fields
 Associate fields to particle. More...
 
interface  particle_analytic
 
interface  particle_position
 User-defined particle movement. More...
 
interface  after_refine
 
interface  init_vector_potential
 initialize vector potential on cell edges for magnetic field More...
 
interface  set_electric_field
 
interface  set_wLR
 allow user to specify 'variables' left and right state at physical boundaries to control flux through the boundary surface More...
 
interface  set_surface
 
interface  set_field_w
 
interface  set_field
 

Variables

procedure(p_no_args), pointer usr_set_parameters => null()
 Initialize the user's settings (after initializing amrvac) More...
 
procedure(init_one_grid), pointer usr_init_one_grid => null()
 Initialize earch grid block data. More...
 
procedure(special_bc), pointer usr_special_bc => null()
 
procedure(special_mg_bc), pointer usr_special_mg_bc => null()
 
procedure(internal_bc), pointer usr_internal_bc => null()
 
procedure(p_no_args), pointer usr_print_log => null()
 
procedure(p_no_args), pointer usr_write_analysis => null()
 
procedure(transform_w), pointer usr_transform_w => null()
 
procedure(aux_output), pointer usr_aux_output => null()
 
procedure(add_aux_names), pointer usr_add_aux_names => null()
 
procedure(sub_modify_io), pointer usr_modify_output => null()
 
procedure(special_convert), pointer usr_special_convert => null()
 
procedure(process_grid), pointer usr_process_grid => null()
 
procedure(process_global), pointer usr_process_global => null()
 
procedure(process_adv_grid), pointer usr_process_adv_grid => null()
 
procedure(process_adv_global), pointer usr_process_adv_global => null()
 
procedure(p_no_args), pointer usr_improve_initial_condition => null()
 
procedure(p_no_args), pointer usr_before_main_loop => null()
 
procedure(source), pointer usr_source => null()
 
procedure(get_dt), pointer usr_get_dt => null()
 
procedure(phys_gravity), pointer usr_gravity => null()
 
procedure(phys_dust_get_dt), pointer usr_dust_get_dt => null()
 
procedure(phys_dust_get_3d_dragforce), pointer usr_get_3d_dragforce => null()
 
procedure(phys_visco), pointer usr_setvisco => null()
 
procedure(hd_pthermal), pointer usr_set_pthermal => null()
 
procedure(refine_grid), pointer usr_refine_grid => null()
 
procedure(var_for_errest), pointer usr_var_for_errest => null()
 
procedure(a_refine_threshold), pointer usr_refine_threshold => null()
 
procedure(flag_grid), pointer usr_flag_grid => null()
 
procedure(set_b0), pointer usr_set_b0 => null()
 
procedure(set_equi_vars), pointer usr_set_equi_vars => null()
 
procedure(set_j0), pointer usr_set_j0 => null()
 
procedure(special_resistivity), pointer usr_special_resistivity => null()
 
procedure(update_payload), pointer usr_update_payload => null()
 
procedure(create_particles), pointer usr_create_particles => null()
 
procedure(check_particle), pointer usr_check_particle => null()
 
procedure(particle_fields), pointer usr_particle_fields => null()
 
procedure(particle_analytic), pointer usr_particle_analytic => null()
 
procedure(particle_position), pointer usr_particle_position => null()
 
procedure(special_opacity), pointer usr_special_opacity => null()
 
procedure(special_aniso_opacity), pointer usr_special_aniso_opacity => null()
 
procedure(special_opacity_qdot), pointer usr_special_opacity_qdot => null()
 
procedure(special_fluxlimiter), pointer usr_special_fluxlimiter => null()
 
procedure(special_diffcoef), pointer usr_special_diffcoef => null()
 
procedure(after_refine), pointer usr_after_refine => null()
 
procedure(init_vector_potential), pointer usr_init_vector_potential => null()
 
procedure(set_electric_field), pointer usr_set_electric_field => null()
 
procedure(set_wlr), pointer usr_set_wlr => null()
 
procedure(set_surface), pointer usr_set_surface => null()
 
procedure(set_field_w), pointer usr_set_field_w => null()
 
procedure(set_field), pointer usr_set_field => null()
 
procedure(rfactor), pointer usr_rfactor => null()
 

Detailed Description

Module with all the methods that users can customize in AMRVAC.

Each procedure pointer can be initialized in a user's mod_usr.t

Variable Documentation

◆ usr_add_aux_names

procedure(add_aux_names), pointer mod_usr_methods::usr_add_aux_names => null()

Definition at line 25 of file mod_usr_methods.t.

◆ usr_after_refine

procedure(after_refine), pointer mod_usr_methods::usr_after_refine => null()

Definition at line 88 of file mod_usr_methods.t.

◆ usr_aux_output

procedure(aux_output), pointer mod_usr_methods::usr_aux_output => null()

Definition at line 24 of file mod_usr_methods.t.

◆ usr_before_main_loop

procedure(p_no_args), pointer mod_usr_methods::usr_before_main_loop => null()

Definition at line 41 of file mod_usr_methods.t.

◆ usr_check_particle

procedure(check_particle), pointer mod_usr_methods::usr_check_particle => null()

Definition at line 75 of file mod_usr_methods.t.

◆ usr_create_particles

procedure(create_particles), pointer mod_usr_methods::usr_create_particles => null()

Definition at line 74 of file mod_usr_methods.t.

◆ usr_dust_get_dt

procedure(phys_dust_get_dt), pointer mod_usr_methods::usr_dust_get_dt => null()

Definition at line 49 of file mod_usr_methods.t.

◆ usr_flag_grid

procedure(flag_grid), pointer mod_usr_methods::usr_flag_grid => null()

Definition at line 62 of file mod_usr_methods.t.

◆ usr_get_3d_dragforce

procedure(phys_dust_get_3d_dragforce), pointer mod_usr_methods::usr_get_3d_dragforce => null()

Definition at line 50 of file mod_usr_methods.t.

◆ usr_get_dt

procedure(get_dt), pointer mod_usr_methods::usr_get_dt => null()

Definition at line 45 of file mod_usr_methods.t.

◆ usr_gravity

procedure(phys_gravity), pointer mod_usr_methods::usr_gravity => null()

Definition at line 46 of file mod_usr_methods.t.

◆ usr_improve_initial_condition

procedure(p_no_args), pointer mod_usr_methods::usr_improve_initial_condition => null()

Definition at line 38 of file mod_usr_methods.t.

◆ usr_init_one_grid

procedure(init_one_grid), pointer mod_usr_methods::usr_init_one_grid => null()

Initialize earch grid block data.

Definition at line 12 of file mod_usr_methods.t.

◆ usr_init_vector_potential

procedure(init_vector_potential), pointer mod_usr_methods::usr_init_vector_potential => null()

Definition at line 91 of file mod_usr_methods.t.

◆ usr_internal_bc

procedure(internal_bc), pointer mod_usr_methods::usr_internal_bc => null()

Definition at line 18 of file mod_usr_methods.t.

◆ usr_modify_output

procedure(sub_modify_io), pointer mod_usr_methods::usr_modify_output => null()

Definition at line 26 of file mod_usr_methods.t.

◆ usr_particle_analytic

procedure(particle_analytic), pointer mod_usr_methods::usr_particle_analytic => null()

Definition at line 77 of file mod_usr_methods.t.

◆ usr_particle_fields

procedure(particle_fields), pointer mod_usr_methods::usr_particle_fields => null()

Definition at line 76 of file mod_usr_methods.t.

◆ usr_particle_position

procedure(particle_position), pointer mod_usr_methods::usr_particle_position => null()

Definition at line 78 of file mod_usr_methods.t.

◆ usr_print_log

procedure(p_no_args), pointer mod_usr_methods::usr_print_log => null()

Definition at line 21 of file mod_usr_methods.t.

◆ usr_process_adv_global

procedure(process_adv_global), pointer mod_usr_methods::usr_process_adv_global => null()

Definition at line 35 of file mod_usr_methods.t.

◆ usr_process_adv_grid

procedure(process_adv_grid), pointer mod_usr_methods::usr_process_adv_grid => null()

Definition at line 34 of file mod_usr_methods.t.

◆ usr_process_global

procedure(process_global), pointer mod_usr_methods::usr_process_global => null()

Definition at line 31 of file mod_usr_methods.t.

◆ usr_process_grid

procedure(process_grid), pointer mod_usr_methods::usr_process_grid => null()

Definition at line 30 of file mod_usr_methods.t.

◆ usr_refine_grid

procedure(refine_grid), pointer mod_usr_methods::usr_refine_grid => null()

Definition at line 59 of file mod_usr_methods.t.

◆ usr_refine_threshold

procedure(a_refine_threshold), pointer mod_usr_methods::usr_refine_threshold => null()

Definition at line 61 of file mod_usr_methods.t.

◆ usr_rfactor

procedure(rfactor), pointer mod_usr_methods::usr_rfactor => null()

Definition at line 109 of file mod_usr_methods.t.

◆ usr_set_b0

procedure(set_b0), pointer mod_usr_methods::usr_set_b0 => null()

Definition at line 65 of file mod_usr_methods.t.

◆ usr_set_electric_field

procedure(set_electric_field), pointer mod_usr_methods::usr_set_electric_field => null()

Definition at line 94 of file mod_usr_methods.t.

◆ usr_set_equi_vars

procedure(set_equi_vars), pointer mod_usr_methods::usr_set_equi_vars => null()

Definition at line 67 of file mod_usr_methods.t.

◆ usr_set_field

procedure(set_field), pointer mod_usr_methods::usr_set_field => null()

Definition at line 106 of file mod_usr_methods.t.

◆ usr_set_field_w

procedure(set_field_w), pointer mod_usr_methods::usr_set_field_w => null()

Definition at line 105 of file mod_usr_methods.t.

◆ usr_set_j0

procedure(set_j0), pointer mod_usr_methods::usr_set_j0 => null()

Definition at line 69 of file mod_usr_methods.t.

◆ usr_set_parameters

procedure(p_no_args), pointer mod_usr_methods::usr_set_parameters => null()

Initialize the user's settings (after initializing amrvac)

Definition at line 10 of file mod_usr_methods.t.

◆ usr_set_pthermal

procedure(hd_pthermal), pointer mod_usr_methods::usr_set_pthermal => null()

Definition at line 56 of file mod_usr_methods.t.

◆ usr_set_surface

procedure(set_surface), pointer mod_usr_methods::usr_set_surface => null()

Definition at line 102 of file mod_usr_methods.t.

◆ usr_set_wlr

procedure(set_wlr), pointer mod_usr_methods::usr_set_wlr => null()

Definition at line 97 of file mod_usr_methods.t.

◆ usr_setvisco

procedure(phys_visco), pointer mod_usr_methods::usr_setvisco => null()

Definition at line 53 of file mod_usr_methods.t.

◆ usr_source

procedure(source), pointer mod_usr_methods::usr_source => null()

Definition at line 44 of file mod_usr_methods.t.

◆ usr_special_aniso_opacity

procedure(special_aniso_opacity), pointer mod_usr_methods::usr_special_aniso_opacity => null()

Definition at line 82 of file mod_usr_methods.t.

◆ usr_special_bc

procedure(special_bc), pointer mod_usr_methods::usr_special_bc => null()

Definition at line 15 of file mod_usr_methods.t.

◆ usr_special_convert

procedure(special_convert), pointer mod_usr_methods::usr_special_convert => null()

Definition at line 27 of file mod_usr_methods.t.

◆ usr_special_diffcoef

procedure(special_diffcoef), pointer mod_usr_methods::usr_special_diffcoef => null()

Definition at line 85 of file mod_usr_methods.t.

◆ usr_special_fluxlimiter

procedure(special_fluxlimiter), pointer mod_usr_methods::usr_special_fluxlimiter => null()

Definition at line 84 of file mod_usr_methods.t.

◆ usr_special_mg_bc

procedure(special_mg_bc), pointer mod_usr_methods::usr_special_mg_bc => null()

Definition at line 16 of file mod_usr_methods.t.

◆ usr_special_opacity

procedure(special_opacity), pointer mod_usr_methods::usr_special_opacity => null()

Definition at line 81 of file mod_usr_methods.t.

◆ usr_special_opacity_qdot

procedure(special_opacity_qdot), pointer mod_usr_methods::usr_special_opacity_qdot => null()

Definition at line 83 of file mod_usr_methods.t.

◆ usr_special_resistivity

procedure(special_resistivity), pointer mod_usr_methods::usr_special_resistivity => null()

Definition at line 70 of file mod_usr_methods.t.

◆ usr_transform_w

procedure(transform_w), pointer mod_usr_methods::usr_transform_w => null()

Definition at line 23 of file mod_usr_methods.t.

◆ usr_update_payload

procedure(update_payload), pointer mod_usr_methods::usr_update_payload => null()

Definition at line 73 of file mod_usr_methods.t.

◆ usr_var_for_errest

procedure(var_for_errest), pointer mod_usr_methods::usr_var_for_errest => null()

Definition at line 60 of file mod_usr_methods.t.

◆ usr_write_analysis

procedure(p_no_args), pointer mod_usr_methods::usr_write_analysis => null()

Definition at line 22 of file mod_usr_methods.t.