119 integer,
intent(in) :: ixI^L, ixO^L
120 double precision,
intent(in) :: x(ixI^S,1:ndim)
121 double precision,
intent(inout) :: w(ixI^S,1:nw)
129 integer,
intent(in) :: ixI^L
131 integer,
intent(in) :: ixO^L
133 integer,
intent(in) :: iB
134 double precision,
intent(in) :: qt, x(ixI^S,1:ndim)
135 double precision,
intent(inout) :: w(ixI^S,1:nw)
142 integer,
intent(in) :: iB
155 integer,
intent(in) :: ixI^L,ixO^L,level
156 double precision,
intent(in) :: qt
157 double precision,
intent(inout) :: w(ixI^S,1:nw)
158 double precision,
intent(in) :: x(ixI^S,1:ndim)
166 integer,
intent(in) :: igrid,level,ixI^L,ixO^L
167 double precision,
intent(in) :: qt,x(ixI^S,1:ndim)
168 double precision,
intent(inout) :: w(ixI^S,1:nw)
175 integer,
intent(in) :: ixI^L,ixO^L
176 double precision,
intent(in) :: qt,x(ixI^S,1:ndim)
177 double precision,
intent(inout) :: w(ixI^S,1:nw)
185 integer,
intent(in) :: iit
186 double precision,
intent(in) :: qt
192 integer,
intent(in) :: igrid,level,ixI^L,ixO^L
193 double precision,
intent(in) :: qt,x(ixI^S,1:ndim)
194 double precision,
intent(inout) :: w(ixI^S,1:nw)
200 integer,
intent(in) :: iit
201 double precision,
intent(in) :: qt
212 integer,
intent(in) :: ixI^L,ixO^L
213 double precision,
intent(in) :: x(ixI^S,1:ndim)
214 double precision :: w(ixI^S,nw+nwauxio)
215 double precision :: normconv(0:nw+nwauxio)
221 character(len=*) :: varnames
226 subroutine source(qdt,ixI^L,ixO^L,iw^LIM,qtC,wCT,qt,w,x)
228 integer,
intent(in) :: ixI^L, ixO^L, iw^LIM
229 double precision,
intent(in) :: qdt, qtC, qt
230 double precision,
intent(in) :: wCT(ixI^S,1:nw), x(ixI^S,1:ndim)
231 double precision,
intent(inout) :: w(ixI^S,1:nw)
237 subroutine get_dt(w,ixI^L,ixO^L,dtnew,dx^D,x)
239 integer,
intent(in) :: ixI^L, ixO^L
240 double precision,
intent(in) :: dx^D, x(ixI^S,1:ndim)
241 double precision,
intent(in) :: w(ixI^S,1:nw)
242 double precision,
intent(inout) :: dtnew
248 integer,
intent(in) :: ixI^L, ixO^L
249 double precision,
intent(in) :: x(ixI^S,1:ndim)
250 double precision,
intent(in) :: wCT(ixI^S,1:nw)
251 double precision,
intent(out) :: gravity_field(ixI^S,ndim)
257 integer,
intent(in) :: ixI^L, ixO^L, dust_n_species
258 double precision,
intent(in) :: x(ixI^S, 1:ndim)
259 double precision,
intent(in) :: w(ixI^S, 1:nw)
260 double precision,
intent(out) :: &
261 fdrag(ixI^S, 1:ndir, 1:dust_n_species)
262 double precision,
intent(in) :: ptherm(ixI^S), vgas(ixI^S, ndir)
268 integer,
intent(in) :: ixI^L, ixO^L, dust_n_species
269 double precision,
intent(in) :: dx^D, x(ixI^S,1:ndim)
270 double precision,
intent(in) :: w(ixI^S,1:nw)
271 double precision,
intent(inout) :: dtdust(1:dust_n_species)
277 integer,
intent(in) :: ixI^L, ixO^L
278 double precision,
intent(in) :: x(ixI^S,1:ndim)
279 double precision,
intent(in) :: w(ixI^S,1:nw)
280 double precision,
intent(out) :: mu(ixI^S)
286 integer,
intent(in) :: ixI^L, ixO^L
287 double precision,
intent(in) :: x(ixI^S,1:ndim)
288 double precision,
intent(in) :: w(ixI^S,1:nw)
289 double precision,
intent(out) :: pth(ixI^S)
293 subroutine rfactor(w,x,ixI^L,ixO^L,pth)
295 integer,
intent(in) :: ixI^L, ixO^L
296 double precision,
intent(in) :: x(ixI^S,1:ndim)
297 double precision,
intent(in) :: w(ixI^S,1:nw)
298 double precision,
intent(out) :: pth(ixI^S)
299 end subroutine rfactor
305 integer,
intent(in) :: ixI^L, ixO^L, idirmin
306 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:ndim)
307 double precision :: current(ixI^S,7-2*ndir:3), eta(ixI^S)
314 integer,
intent(in) :: ixI^L, ixO^L
315 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
316 double precision,
intent(out):: kappa(ixO^S)
322 integer,
intent(in) :: ixI^L, ixO^L, idir
323 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
324 double precision,
intent(out):: kappa(ixO^S)
330 integer,
intent(in) :: ixI^L, ixO^L
331 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
332 double precision,
intent(out):: kappa(ixO^S)
338 integer,
intent(in) :: ixI^L, ixO^L
339 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
340 double precision,
intent(out):: fld_lambda(ixI^S),fld_R(ixI^S)
346 integer,
intent(in) :: ixI^L, ixO^L
347 double precision,
intent(inout) :: w(ixI^S, 1:nw)
348 double precision,
intent(in) :: wCT(ixI^S, 1:nw)
349 double precision,
intent(in) :: x(ixI^S, 1:ndim)
363 subroutine refine_grid(igrid,level,ixI^L,ixO^L,qt,w,x,refine,coarsen)
365 integer,
intent(in) :: igrid, level, ixI^L, ixO^L
366 double precision,
intent(in) :: qt, w(ixI^S,1:nw), x(ixI^S,1:ndim)
367 integer,
intent(inout) :: refine, coarsen
376 integer,
intent(in) :: ixI^L,ixO^L,iflag
377 double precision,
intent(in) :: w(ixI^S,1:nw), x(ixI^S,1:ndim)
378 double precision,
intent(out) :: var(ixI^S)
382 subroutine set_b0(ixI^L,ixO^L,x,wB0)
384 integer,
intent(in) :: ixI^L,ixO^L
385 double precision,
intent(in) :: x(ixI^S,1:ndim)
386 double precision,
intent(inout) :: wB0(ixI^S,1:ndir)
387 end subroutine set_b0
390 subroutine set_j0(ixI^L,ixO^L,x,wJ0)
392 integer,
intent(in) :: ixI^L,ixO^L
393 double precision,
intent(in) :: x(ixI^S,1:ndim)
394 double precision,
intent(inout) :: wJ0(ixI^S,7-2*ndir:ndir)
395 end subroutine set_j0
400 integer,
intent(in) :: ixI^L,ixO^L
401 double precision,
intent(in) :: x(ixI^S,1:ndim)
402 double precision,
intent(inout) :: w0(ixI^S,1:number_equi_vars)
408 integer,
intent(in) :: ixI^L, ixO^L, nw_in
409 double precision,
intent(in) :: w_in(ixI^S,1:nw_in)
410 double precision,
intent(in) :: x(ixI^S, 1:ndim)
411 double precision,
intent(out) :: w_out(ixI^S,1:nw)
418 double precision,
intent(in) :: wlocal(1:nw),xlocal(1:ndim),qt
419 double precision,
intent(inout) :: threshold
420 integer,
intent(in) :: level
426 integer,
intent(in) :: qunitconvert
427 character(len=20) :: userconvert_type
436 integer,
intent(in) :: ixI^L, ixO^L
437 integer,
intent(inout) :: flag
438 double precision,
intent(in) :: qt
439 double precision,
intent(inout) :: w(ixI^S,1:nw)
440 double precision,
intent(in) :: x(ixI^S,1:ndim)
446 integer,
intent(in) :: igrid,mynpayload
447 double precision,
intent(in) :: x(1:ndir),u(1:ndir),q,m,particle_time
448 double precision,
intent(out) :: mypayload(mynpayload)
453 integer,
intent(in) :: n_particles
454 double precision,
intent(out) :: x(3, n_particles)
455 double precision,
intent(out) :: v(3, n_particles)
456 double precision,
intent(out) :: q(n_particles)
457 double precision,
intent(out) :: m(n_particles)
458 logical,
intent(out) :: follow(n_particles)
464 integer,
intent(in) :: igrid
465 double precision,
intent(inout) :: x(1:ndir)
466 double precision,
intent(inout) :: v(1:ndir),q,m
467 logical,
intent(inout) :: follow
468 logical,
intent(out) :: check
474 double precision,
intent(in) :: w(ixG^T,1:nw)
475 double precision,
intent(in) :: x(ixG^T,1:ndim)
476 double precision,
intent(out) :: E(ixG^T, ndir)
477 double precision,
intent(out) :: B(ixG^T, ndir)
482 integer,
intent(in) :: ix(ndir)
483 double precision,
intent(in) :: x(ndir)
484 double precision,
intent(in) :: tloc
485 double precision,
intent(out) :: vec(ndir)
491 integer,
intent(in) :: n
492 double precision,
intent(inout) :: x(3)
493 double precision,
intent(in) :: tloc, tlocnew
497 integer,
intent(in) :: n_coarsen
498 integer,
intent(in) :: n_refine
505 integer,
intent(in) :: ixI^L, ixC^L, idir
506 double precision,
intent(in) :: xC(ixI^S,1:ndim)
507 double precision,
intent(out) :: A(ixI^S)
514 integer,
intent(in) :: ixI^L, ixO^L
515 double precision,
intent(in) :: qt, qdt
517 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
547 subroutine set_wlr(ixI^L,ixO^L,qt,wLC,wRC,wLp,wRp,s,idir)
549 integer,
intent(in) :: ixI^L, ixO^L, idir
550 double precision,
intent(in) :: qt
551 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
552 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
561 end subroutine set_wlr
563 subroutine set_surface(ixI^L,x,delx,exp_factor,del_exp_factor,exp_factor_primitive)
565 integer,
intent(in) :: ixI^L
566 double precision,
intent(in) :: delx(ixI^S,1:ndim), x(ixI^S,1:ndim)
567 double precision,
intent(out) :: exp_factor(ixI^S), del_exp_factor(ixI^S)
568 double precision,
intent(out) :: exp_factor_primitive(ixI^S)
572 subroutine set_field_w(igrid,ip,xf,wP,wL,numP,nwP,nwL,dL,forward,ftype,tcondi)
576 integer,
intent(in) :: igrid,ip,numP,nwP,nwL
577 double precision,
intent(in) :: xf(numP,ndim)
578 double precision,
intent(inout) :: wP(numP,nwP),wL(1+nwL)
579 double precision,
intent(in) :: dL
580 logical,
intent(in) :: forward
581 character(len=std_len),
intent(in) :: ftype,tcondi
598 integer,
intent(in) :: igrid
599 double precision,
intent(in) :: xfn(ndim)
600 double precision,
intent(inout) :: field(ndim)
601 character(len=std_len),
intent(in) :: ftype
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.
Calculation anormal viscosity depending on space.
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...
Here one can add a steady (time-independent) equi vars.
Calculate w(iw)=w(iw)+qdt*SOURCE[wCT,qtC,x] within ixO for all indices iw=iwmin......
Set user defined, anisotropic opacity for use in diffusion coeff, heating and cooling,...
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 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...
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
procedure(special_resistivity), pointer usr_special_resistivity
procedure(special_opacity), pointer usr_special_opacity
procedure(process_grid), pointer usr_process_grid
procedure(phys_visco), pointer usr_setvisco
procedure(particle_position), pointer usr_particle_position
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(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(special_opacity_qdot), pointer usr_special_opacity_qdot
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(special_aniso_opacity), pointer usr_special_aniso_opacity
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