The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Data Types | Variables
mod_usr_methods Module Reference

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

Data Types

interface  a_refine_threshold
 use different threshold in special regions for AMR to reduce/increase resolution there where nothing/something interesting happens. More...
interface  add_aux_names
 Add names for the auxiliary variables. More...
interface  after_refine
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  create_particles
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  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  hd_pthermal
 Calculation anormal pressure for hd & energy=.False. More...
interface  init_one_grid
 Initialize one grid. More...
interface  init_vector_potential
 initialize vector potential on cell edges for magnetic field 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  p_no_args
interface  particle_analytic
interface  particle_fields
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_gravity
 Calculate gravitational acceleration in each dimension. More...
interface  phys_visco
 Calculation anormal viscosity depending on space. More...
interface  process_adv_global
 for processing after the advance (PIC-MHD, e.g.) More...
interface  process_adv_grid
 for processing after the advance (PIC-MHD, e.g.) 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_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  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  set_B0
 Here one can add a steady (time-independent) potential background field. More...
interface  set_electric_field
interface  set_flux
 allow user to explicitly set flux at cell interfaces for finite volume scheme More...
interface  set_J0
 Here one can add a time-independent background current density. 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  special_bc
 special boundary types, users must assign conservative variables in boundaries More...
interface  special_convert
 Allow user to use their own data-postprocessing procedures. 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  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  transform_w
 regenerate w and eqpartf arrays to output into *tf.dat More...
interface  update_payload
 Update payload of particles. 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...


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(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_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(particle_fields), pointer usr_particle_fields => null()
procedure(particle_analytic), pointer usr_particle_analytic => null()
procedure(after_refine), pointer usr_after_refine => null()
procedure(set_flux), pointer usr_set_flux => null()
procedure(init_vector_potential), pointer usr_init_vector_potential => null()
procedure(set_electric_field), pointer usr_set_electric_field => 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 23 of file mod_usr_methods.t.

◆ usr_after_refine

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

Definition at line 75 of file mod_usr_methods.t.

◆ usr_aux_output

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

Definition at line 22 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 39 of file mod_usr_methods.t.

◆ usr_create_particles

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

Definition at line 70 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 47 of file mod_usr_methods.t.

◆ usr_flag_grid

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

Definition at line 60 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 48 of file mod_usr_methods.t.

◆ usr_get_dt

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

Definition at line 43 of file mod_usr_methods.t.

◆ usr_gravity

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

Definition at line 44 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 36 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 81 of file mod_usr_methods.t.

◆ usr_internal_bc

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

Definition at line 16 of file mod_usr_methods.t.

◆ usr_modify_output

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

Definition at line 24 of file mod_usr_methods.t.

◆ usr_particle_analytic

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

Definition at line 72 of file mod_usr_methods.t.

◆ usr_particle_fields

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

Definition at line 71 of file mod_usr_methods.t.

◆ usr_print_log

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

Definition at line 19 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 33 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 32 of file mod_usr_methods.t.

◆ usr_process_global

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

Definition at line 29 of file mod_usr_methods.t.

◆ usr_process_grid

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

Definition at line 28 of file mod_usr_methods.t.

◆ usr_refine_grid

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

Definition at line 57 of file mod_usr_methods.t.

◆ usr_refine_threshold

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

Definition at line 59 of file mod_usr_methods.t.

◆ usr_set_b0

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

Definition at line 63 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 84 of file mod_usr_methods.t.

◆ usr_set_flux

procedure(set_flux), pointer mod_usr_methods::usr_set_flux => null()

Definition at line 78 of file mod_usr_methods.t.

◆ usr_set_j0

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

Definition at line 65 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 54 of file mod_usr_methods.t.

◆ usr_setvisco

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

Definition at line 51 of file mod_usr_methods.t.

◆ usr_source

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

Definition at line 42 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 25 of file mod_usr_methods.t.

◆ usr_special_resistivity

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

Definition at line 66 of file mod_usr_methods.t.

◆ usr_transform_w

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

Definition at line 21 of file mod_usr_methods.t.

◆ usr_update_payload

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

Definition at line 69 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 58 of file mod_usr_methods.t.

◆ usr_write_analysis

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

Definition at line 20 of file mod_usr_methods.t.