124 integer,
intent(in) :: ixI^L, ixO^L
125 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
126 logical,
intent(in) :: primitive
127 double precision,
intent(out):: zeta(ixI^S), thread_radius(ixI^S)
128 double precision,
intent(out):: lperp_alfven(ixI^S)
137 integer,
intent(in) :: ixI^L, ixO^L
138 double precision,
intent(in) :: x(ixI^S,1:ndim)
139 double precision,
intent(inout) :: w(ixI^S,1:nw)
147 integer,
intent(in) :: ixI^L
149 integer,
intent(in) :: ixO^L
151 integer,
intent(in) :: iB
152 double precision,
intent(in) :: qdt,qt, x(ixI^S,1:ndim)
153 double precision,
intent(inout) :: w(ixI^S,1:nw)
158 double precision,
intent(in) :: qt, qdt
165 integer,
intent(in) :: iB
178 integer,
intent(in) :: ixI^L,ixO^L,level
179 double precision,
intent(in) :: qt, qdt
180 double precision,
intent(inout) :: w(ixI^S,1:nw)
181 double precision,
intent(in) :: x(ixI^S,1:ndim)
189 integer,
intent(in) :: igrid,level,ixI^L,ixO^L
190 double precision,
intent(in) :: qt,x(ixI^S,1:ndim)
191 double precision,
intent(inout) :: w(ixI^S,1:nw)
198 integer,
intent(in) :: ixI^L,ixO^L
199 double precision,
intent(in) :: qt,x(ixI^S,1:ndim)
200 double precision,
intent(inout) :: w(ixI^S,1:nw)
208 integer,
intent(in) :: iit
209 double precision,
intent(in) :: qt
215 integer,
intent(in) :: igrid,level,ixI^L,ixO^L
216 double precision,
intent(in) :: qt,x(ixI^S,1:ndim)
217 double precision,
intent(inout) :: w(ixI^S,1:nw)
223 integer,
intent(in) :: iit
224 double precision,
intent(in) :: qt
235 integer,
intent(in) :: ixI^L,ixO^L
236 double precision,
intent(in) :: x(ixI^S,1:ndim)
237 double precision :: w(ixI^S,nw+nwauxio)
238 double precision :: normconv(0:nw+nwauxio)
244 character(len=*) :: varnames
249 subroutine source(qdt,ixI^L,ixO^L,iw^LIM,qtC,wCT,qt,w,x)
251 integer,
intent(in) :: ixI^L, ixO^L, iw^LIM
252 double precision,
intent(in) :: qdt, qtC, qt
253 double precision,
intent(in) :: wCT(ixI^S,1:nw), x(ixI^S,1:ndim)
254 double precision,
intent(inout) :: w(ixI^S,1:nw)
260 subroutine get_dt(w,ixI^L,ixO^L,dtnew,dx^D,x)
262 integer,
intent(in) :: ixI^L, ixO^L
263 double precision,
intent(in) :: dx^D, x(ixI^S,1:ndim)
264 double precision,
intent(in) :: w(ixI^S,1:nw)
265 double precision,
intent(inout) :: dtnew
271 integer,
intent(in) :: ixI^L, ixO^L
272 double precision,
intent(in) :: x(ixI^S,1:ndim)
273 double precision,
intent(in) :: wCT(ixI^S,1:nw)
274 double precision,
intent(out) :: gravity_field(ixI^S,ndim)
280 integer,
intent(in) :: ixI^L, ixO^L, dust_n_species
281 double precision,
intent(in) :: x(ixI^S, 1:ndim)
282 double precision,
intent(in) :: w(ixI^S, 1:nw)
283 double precision,
intent(out) :: &
284 fdrag(ixI^S, 1:ndir, 1:dust_n_species)
285 double precision,
intent(in) :: ptherm(ixI^S), vgas(ixI^S, ndir)
291 integer,
intent(in) :: ixI^L, ixO^L, dust_n_species
292 double precision,
intent(in) :: dx^D, x(ixI^S,1:ndim)
293 double precision,
intent(in) :: w(ixI^S,1:nw)
294 double precision,
intent(inout) :: dtdust(1:dust_n_species)
300 integer,
intent(in) :: ixI^L, ixO^L
301 double precision,
intent(in) :: x(ixI^S,1:ndim)
302 double precision,
intent(in) :: wp(ixI^S,1:nw)
303 double precision,
intent(out) :: mu(ixI^S)
309 integer,
intent(in) :: ixI^L, ixO^L
310 double precision,
intent(in) :: x(ixI^S,1:ndim)
311 double precision,
intent(in) :: w(ixI^S,1:nw)
312 double precision,
intent(out) :: pth(ixI^S)
318 integer,
intent(in) :: ixI^L, ixO^L
319 double precision,
intent(in) :: x(ixI^S,1:ndim)
320 double precision,
intent(in) :: w(ixI^S,1:nw)
321 double precision,
intent(out) :: pth(ixI^S)
327 integer,
intent(in) :: ixI^L, ixO^L
328 double precision,
intent(in) :: x(ixI^S,1:ndim)
329 double precision,
intent(in) :: w(ixI^S,1:nw)
330 double precision,
intent(out) :: adiab(ixI^S)
337 integer,
intent(in) :: ixI^L, ixO^L, idirmin
338 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:ndim)
339 double precision,
intent(in) :: current(ixI^S,7-2*ndir:3)
340 double precision,
intent(out) :: eta(ixI^S)
347 integer,
intent(in) :: ixI^L, ixO^L
348 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
349 double precision,
intent(out):: kappa(ixI^S)
355 integer,
intent(in) :: ixI^L, ixO^L
356 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
357 double precision,
intent(out):: fld_lambda(ixI^S),fld_R(ixI^S)
363 integer,
intent(in) :: ixI^L, ixO^L
364 double precision,
intent(inout) :: w(ixI^S, 1:nw)
365 double precision,
intent(in) :: wprim(ixI^S, 1:nw)
366 double precision,
intent(in) :: x(ixI^S, 1:ndim)
380 subroutine refine_grid(igrid,level,ixI^L,ixO^L,qt,w,x,refine,coarsen)
382 integer,
intent(in) :: igrid, level, ixI^L, ixO^L
383 double precision,
intent(in) :: qt, w(ixI^S,1:nw), x(ixI^S,1:ndim)
384 integer,
intent(inout) :: refine, coarsen
393 integer,
intent(in) :: ixI^L,ixO^L,iflag
394 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
395 double precision,
intent(out) :: var(ixI^S)
401 integer,
intent(in) :: ixI^L,ixO^L
402 double precision,
intent(in) :: x(ixI^S,1:ndim)
403 double precision,
intent(inout) :: wB0(ixI^S,1:ndir)
409 integer,
intent(in) :: ixI^L,ixO^L
410 double precision,
intent(in) :: x(ixI^S,1:ndim)
411 double precision,
intent(inout) :: wJ0(ixI^S,7-2*ndir:ndir)
417 integer,
intent(in) :: ixI^L,ixO^L
418 double precision,
intent(in) :: x(ixI^S,1:ndim)
419 double precision,
intent(inout) :: w0(ixI^S,1:number_equi_vars)
425 integer,
intent(in) :: ixI^L, ixO^L, nw_in
426 double precision,
intent(in) :: w_in(ixI^S,1:nw_in)
427 double precision,
intent(in) :: x(ixI^S, 1:ndim)
428 double precision,
intent(out) :: w_out(ixI^S,1:nw)
435 double precision,
intent(in) :: wlocal(1:nw),xlocal(1:ndim),qt
436 double precision,
intent(inout) :: threshold
437 integer,
intent(in) :: level
443 integer,
intent(in) :: qunitconvert
444 character(len=20) :: userconvert_type
453 integer,
intent(in) :: ixI^L, ixO^L
454 integer,
intent(inout) :: flag
455 double precision,
intent(in) :: qt
456 double precision,
intent(inout) :: w(ixI^S,1:nw)
457 double precision,
intent(in) :: x(ixI^S,1:ndim)
463 integer,
intent(in) :: igrid,mynpayload
464 double precision,
intent(in) :: x(1:ndir),u(1:ndir),q,m,particle_time
465 double precision,
intent(out) :: mypayload(mynpayload)
470 integer,
intent(in) :: n_particles
471 double precision,
intent(out) :: x(3, n_particles)
472 double precision,
intent(out) :: v(3, n_particles)
473 double precision,
intent(out) :: q(n_particles)
474 double precision,
intent(out) :: m(n_particles)
475 logical,
intent(out) :: follow(n_particles)
481 integer,
intent(in) :: igrid
482 double precision,
intent(inout) :: x(1:ndir)
483 double precision,
intent(inout) :: v(1:ndir),q,m
484 logical,
intent(inout) :: follow
485 logical,
intent(out) :: check
491 double precision,
intent(in) :: w(ixG^T,1:nw)
492 double precision,
intent(in) :: x(ixG^T,1:ndim)
493 double precision,
intent(out) :: E(ixG^T, ndir)
494 double precision,
intent(out) :: B(ixG^T, ndir)
499 integer,
intent(in) :: ix(ndir)
500 double precision,
intent(in) :: x(ndir)
501 double precision,
intent(in) :: tloc
502 double precision,
intent(out) :: vec(ndir)
508 integer,
intent(in) :: n
509 double precision,
intent(inout) :: x(3)
510 double precision,
intent(in) :: tloc, tlocnew
514 integer,
intent(in) :: n_coarsen
515 integer,
intent(in) :: n_refine
522 integer,
intent(in) :: ixI^L, ixC^L, idir
523 double precision,
intent(in) :: xC(ixI^S,1:ndim)
524 double precision,
intent(out) :: A(ixI^S)
531 integer,
intent(in) :: ixI^L, ixO^L
532 double precision,
intent(in) :: qt, qdt
534 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
564 subroutine set_wlr(ixI^L,ixO^L,qt,wLC,wRC,wLp,wRp,s,idir)
566 integer,
intent(in) :: ixI^L, ixO^L, idir
567 double precision,
intent(in) :: qt
568 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
569 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
580 subroutine set_surface(ixI^L,x,delx,exp_factor,del_exp_factor,exp_factor_primitive)
582 integer,
intent(in) :: ixI^L
583 double precision,
intent(in) :: delx(ixI^S,1:ndim), x(ixI^S,1:ndim)
584 double precision,
intent(out) :: exp_factor(ixI^S), del_exp_factor(ixI^S)
585 double precision,
intent(out) :: exp_factor_primitive(ixI^S)
589 subroutine set_field_w(igrid,ip,xf,wP,wL,numP,nwP,nwL,dL,forward,ftype,tcondi)
593 integer,
intent(in) :: igrid,ip,numP,nwP,nwL
594 double precision,
intent(in) :: xf(numP,ndim)
595 double precision,
intent(inout) :: wP(numP,nwP),wL(1+nwL)
596 double precision,
intent(in) :: dL
597 logical,
intent(in) :: forward
598 character(len=std_len),
intent(in) :: ftype,tcondi
615 integer,
intent(in) :: igrid
616 double precision,
intent(in) :: xfn(ndim)
617 double precision,
intent(inout) :: field(ndim)
618 character(len=std_len),
intent(in) :: ftype
630 integer,
intent(in) :: ixI^L, ixO^L
631 double precision,
intent(in) :: x(ixI^S,1:ndim), w(ixI^S,1:nw)
632 double precision,
intent(out):: Qgrid(ixI^S)
use different threshold in special regions for AMR to reduce/increase resolution there where nothing/...
Add names for the auxiliary variables.
this subroutine can be used in convert, to add auxiliary variables to the converted output file,...
Check arbitrary particle conditions or modifications.
flag=-1 : Treat all cells active, omit deactivation (onentry, default) flag=0 : Treat as normal domai...
Limit "dt" further if necessary, e.g. due to the special source terms. The getdt_courant (CFL conditi...
Calculation anormal pressure for hd & energy=.False.
initialize vector potential on cell edges for magnetic field
internal boundary, user defined This subroutine can be used to artificially overwrite ALL conservativ...
Associate fields to particle.
User-defined particle movement.
Calculate the 3d drag force of gas onto dust.
Calculate the time step associated with the usr drag force.
Calculate gravitational acceleration in each dimension.
for processing after the advance (PIC-MHD, e.g.)
for processing after the advance (PIC-MHD, e.g.)
This subroutine is called at the beginning of each time step by each processor. No communication is s...
this subroutine is ONLY to be used for computing auxiliary variables which happen to be non-local (li...
Enforce additional refinement or coarsening One can use the coordinate info in x and/or time qt=t_n a...
Calculation R factor for ideal gas law with partial ionization.
Here one can add a steady (time-independent) potential background field.
Here one can add a steady (time-independent) equi vars.
Here one can add a time-independent background current density.
Calculation anormal viscosity depending on space.
allow user to specify 'variables' left and right state at physical boundaries to control flux through...
Calculate w(iw)=w(iw)+qdt*SOURCE[wCT,qtC,x] within ixO for all indices iw=iwmin......
special boundary types, users must assign conservative variables in boundaries
Allow user to use their own data-postprocessing procedures.
Set user defined FLD diffusion coefficient.
Set user defined FLD flux limiter, lambda.
Special boundary type for radiation hydrodynamics module, only used to set the boundary conditions fo...
Set user defined opacity for use in diffusion coeff, heating and cooling, and radiation force.
Set the "eta" array for resistive MHD based on w or the "current" variable which has components betwe...
Calculate volumetric heating rate for TRAC broadening.
If defined, this routine is called before writing output, and it can set/modify the variables in the ...
Update payload of particles.
this is the place to compute a local auxiliary variable to be used as refinement criterion for the Lo...
This module contains definitions of global parameters and variables and some generic functions/subrou...
Module with all the methods that users can customize in AMRVAC.
procedure(rfactor), pointer usr_rfactor
procedure(source), pointer usr_source_after
procedure(source), pointer usr_source
procedure(special_resistivity), pointer usr_special_resistivity
procedure(set_adiab), pointer usr_set_adiab
procedure(special_opacity), pointer usr_special_opacity
procedure(set_adiab), pointer usr_set_gamma
procedure(process_grid), pointer usr_process_grid
procedure(sub_get_heating), pointer usr_get_heating
procedure(particle_position), pointer usr_particle_position
procedure(special_prepare_bc), pointer usr_prepare_boundary
procedure(check_particle), pointer usr_check_particle
procedure(p_no_args), pointer usr_improve_initial_condition
procedure(a_refine_threshold), pointer usr_refine_threshold
procedure(set_surface), pointer usr_set_surface
procedure(phys_dust_get_dt), pointer usr_dust_get_dt
procedure(phys_gravity), pointer usr_gravity
procedure(aux_output), pointer usr_aux_output
procedure(p_no_args), pointer usr_print_log
procedure(phys_dust_get_3d_dragforce), pointer usr_get_3d_dragforce
procedure(special_diffcoef), pointer usr_special_diffcoef
procedure(process_adv_grid), pointer usr_process_adv_grid
procedure(particle_analytic), pointer usr_particle_analytic
procedure(set_viscosity), pointer usr_set_viscosity
procedure(uawsom_coefficients), pointer usr_uawsom_coefficients
Optionally provide local UAWSoM closure coefficients. The returned thread radius and Alfven correlati...
procedure(special_convert), pointer usr_special_convert
procedure(create_particles), pointer usr_create_particles
procedure(init_one_grid), pointer usr_init_one_grid
Initialize earch grid block data.
procedure(update_payload), pointer usr_update_payload
procedure(p_no_args), pointer usr_write_analysis
procedure(sub_modify_io), pointer usr_modify_output
procedure(p_no_args), pointer usr_before_main_loop
procedure(special_fluxlimiter), pointer usr_special_fluxlimiter
procedure(set_field_w), pointer usr_set_field_w
procedure(flag_grid), pointer usr_flag_grid
procedure(process_global), pointer usr_process_global
procedure(special_bc), pointer usr_special_bc
procedure(process_adv_global), pointer usr_process_adv_global
procedure(internal_bc), pointer usr_internal_bc
procedure(set_equi_vars), pointer usr_set_equi_vars
procedure(special_mg_bc), pointer usr_special_mg_bc
procedure(set_j0), pointer usr_set_j0
procedure(particle_fields), pointer usr_particle_fields
procedure(refine_grid), pointer usr_refine_grid
procedure(hd_pthermal), pointer usr_set_pthermal
procedure(init_vector_potential), pointer usr_init_vector_potential
procedure(p_no_args), pointer usr_set_parameters
Initialize the user's settings (after initializing amrvac)
procedure(var_for_errest), pointer usr_var_for_errest
procedure(set_b0), pointer usr_set_b0
procedure(set_electric_field), pointer usr_set_electric_field
procedure(set_wlr), pointer usr_set_wlr
procedure(transform_w), pointer usr_transform_w
procedure(after_refine), pointer usr_after_refine
procedure(get_dt), pointer usr_get_dt
procedure(set_field), pointer usr_set_field
procedure(add_aux_names), pointer usr_add_aux_names