106 integer,
intent(in) :: igrid
107 type(state),
target :: psb(max_blocks)
112 integer,
intent(in) :: ixI^L, ixO^L
113 double precision,
intent(inout) :: w(ixI^S, nw)
114 double precision,
intent(in) :: x(ixI^S, 1:^ND)
119 integer,
intent(in) :: ixI^L, ixO^L, idir
120 double precision,
intent(in) :: qt
121 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
122 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
128 integer,
intent(in) :: ixI^L, ixO^L, idim
129 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
130 double precision,
intent(inout) :: cmax(ixI^S)
135 integer,
intent(in) :: ixI^L, ixO^L
136 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
137 double precision,
intent(inout) :: a2max(ndim)
142 integer,
intent(in) :: ixI^L, ixO^L
143 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
144 double precision,
intent(inout) :: cs2max
149 integer,
intent(in) :: ixI^L, ixO^L
150 double precision,
intent(inout) :: w(ixI^S, nw)
151 double precision,
intent(in) :: x(ixI^S, 1:^ND)
152 double precision,
intent(out) :: tco_local, Tmax_local
156 double precision,
intent(in) :: trac_alfa,tco,T_peak,T_bott
161 integer,
intent(in) :: ixI^L, ixO^L
162 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
163 double precision,
intent(out) :: v(ixI^S,1:ndir)
168 integer,
intent(in) :: ixI^L, ixO^L
169 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
170 double precision,
intent(out) :: rho(ixI^S)
175 integer,
intent(in) :: ixI^L, ixO^L, idim
176 double precision,
intent(in) :: wprim(ixI^S, nw)
177 double precision,
intent(in) :: x(ixI^S,1:ndim)
178 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
181 subroutine sub_get_cbounds(wLC, wRC, wLp, wRp, x, ixI^L, ixO^L, idim, Hspeed, cmax, cmin)
184 integer,
intent(in) :: ixI^L, ixO^L, idim
185 double precision,
intent(in) :: wLC(ixI^S, nw), wRC(ixI^S, nw)
186 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
187 double precision,
intent(in) :: x(ixI^S, 1:^ND)
188 double precision,
intent(inout) :: cmax(ixI^S,1:number_species)
189 double precision,
intent(inout),
optional :: cmin(ixI^S,1:number_species)
190 double precision,
intent(in) :: Hspeed(ixI^S,1:number_species)
195 integer,
intent(in) :: ixI^L, ixO^L, idim
196 double precision,
intent(in) :: wC(ixI^S, 1:nw)
197 double precision,
intent(in) :: w(ixI^S, 1:nw)
198 double precision,
intent(in) :: x(ixI^S, 1:^ND)
199 double precision,
intent(out) :: f(ixI^S, nwflux)
204 integer,
intent(in) :: ixI^L, ixO^L
205 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
206 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), wprim(ixI^S, 1:nw), w(ixI^S, 1:nw)
210 qsourcesplit, active)
212 integer,
intent(in) :: ixI^L, ixO^L
213 double precision,
intent(in) :: qdt, dtfactor
214 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(ixI^S,1:nw), x(ixI^S, 1:ndim)
215 double precision,
intent(inout) :: w(ixI^S, 1:nw)
216 logical,
intent(in) :: qsourcesplit
217 logical,
intent(inout) :: active
223 double precision,
intent(in) :: qdt
224 double precision,
intent(in) :: qt
225 logical,
intent(inout) :: active
231 double precision,
intent(in) :: qdt
232 double precision,
intent(in) :: qt
233 logical,
intent(inout) :: active
238 integer,
intent(in) :: igrid
245 double precision,
intent(in) :: qt
246 type(state),
target :: psa(max_blocks)
251 integer,
intent(in) :: ixI^L, ixO^L
252 double precision,
intent(in) :: dx^D, x(ixI^S, 1:^ND)
253 double precision,
intent(in) :: w(ixI^S, 1:nw)
254 double precision,
intent(inout) :: dtnew
259 logical,
intent(in) :: primitive
260 integer,
intent(in) :: ixI^L, ixO^L
261 double precision,
intent(in) :: w(ixI^S,1:nw)
262 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
267 integer,
intent(in) :: ixI^L, ixO^L
268 double precision,
intent(in) :: w(ixI^S,nw)
269 double precision,
intent(in) :: x(ixI^S,1:ndim)
270 double precision,
intent(out):: pth(ixI^S)
275 integer,
intent(in) :: ixI^L, ixO^L
276 double precision,
intent(inout) :: w(ixI^S,nw)
277 double precision,
intent(in) :: x(ixI^S,1:ndim)
282 integer,
intent(in) :: ixI^L, ixO^L
283 double precision,
intent(inout) :: w(ixI^S,nw)
288 integer,
intent(in) :: ixI^L, ixO^L
289 double precision,
intent(in) :: w(ixI^S,nw)
290 double precision,
intent(in) :: x(ixI^S,1:ndim)
291 double precision,
intent(out):: tgas(ixI^S)
296 integer,
intent(in) :: ixI^L, ixO^L
297 double precision,
intent(in) :: w(ixI^S,nw)
298 double precision,
intent(in) :: x(ixI^S,1:ndim)
299 double precision,
intent(out):: trad(ixI^S)
303 integer,
intent(in) :: file_handle
308 logical,
intent(in) :: primitive
309 integer,
intent(in) :: ixI^L,ixO^L
310 double precision,
intent(inout) :: w(ixI^S,1:nw)
311 double precision,
intent(in) :: x(ixI^S,1:ndim)
312 character(len=*),
intent(in) :: subname
317 integer,
intent(in) :: ixI^L, ixO^L
318 double precision,
intent(in) :: w(ixI^S, nw)
319 double precision,
intent(out) :: out(ixO^S)
325 integer,
intent(in) :: ixI^L, ixO^L, idim
326 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
327 double precision,
intent(in) :: cmax(ixI^S)
328 double precision,
intent(in),
optional :: cmin(ixI^S)
329 type(ct_velocity),
intent(inout):: vcts
334 integer,
intent(in) :: ixI^L, ixO^L
335 double precision,
intent(in) :: qt, qdt
337 double precision,
intent(in) :: wprim(ixI^S,1:nw)
339 type(state) :: sCT, s
340 type(ct_velocity) :: vcts
341 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
342 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
347 integer,
intent(in) :: ixO^L
353 type(state),
target :: psa(max_blocks)
354 double precision,
intent(in) :: qtC
359 type(state),
target :: psa(max_blocks)
360 type(state),
target :: psb(max_blocks)
361 double precision,
intent(in) :: qdt
362 double precision,
intent(in) :: qtC
363 double precision,
intent(in) :: dtfactor
368 integer,
intent(in) :: ixI^L, ixO^L
369 double precision,
intent(in) :: wCT(ixI^S,nw),x(ixI^S,1:ndim)
370 double precision,
intent(inout) :: w(ixI^S,nw)
394 call mpistop(
"Error: phys_to_conserved not defined")
397 call mpistop(
"Error: phys_to_primitive not defined")
403 call mpistop(
"Error: no phys_get_cmax not defined")
415 call mpistop(
"Error: no phys_get_cbounds not defined")
418 call mpistop(
"Error: no phys_get_flux not defined")
421 call mpistop(
"Error: no phys_get_dt not defined")
473 integer,
intent(in) :: ixI^L, ixO^L, idir
474 double precision,
intent(in) :: qt
475 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
476 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
482 integer,
intent(in) :: ixI^L, ixO^L, idim
483 double precision,
intent(in) :: wprim(ixI^S, nw)
484 double precision,
intent(in) :: x(ixI^S,1:ndim)
485 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
491 integer,
intent(in) :: ixI^L, ixO^L
492 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
493 double precision,
intent(inout) :: a2max(ndim)
494 call mpistop(
"Error: entered dummy_get_a2max")
500 integer,
intent(in) :: ixI^L, ixO^L
501 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
502 double precision,
intent(inout) :: cs2max
503 call mpistop(
"Error: entered dummy_get_cs2max")
508 integer,
intent(in) :: ixI^L, ixO^L
509 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
510 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), wprim(ixI^S,1:nw),w(ixI^S, 1:nw)
514 qsourcesplit, active)
516 integer,
intent(in) :: ixI^L, ixO^L
517 double precision,
intent(in) :: qdt,dtfactor
518 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(ixI^S,1:nw), x(ixI^S, 1:ndim)
519 double precision,
intent(inout) :: w(ixI^S, 1:nw)
520 logical,
intent(in) :: qsourcesplit
521 logical,
intent(inout) :: active
527 logical,
intent(in) :: primitive
528 integer,
intent(in) :: ixI^L, ixO^L
529 double precision,
intent(in) :: w(ixI^S,1:nw)
530 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
539 integer,
intent(in) :: ixI^L, ixO^L
540 double precision,
intent(in) :: w(ixI^S, nw)
541 double precision,
intent(in) :: x(ixI^S, 1:ndim)
542 double precision,
intent(out):: pth(ixI^S)
544 call mpistop(
"No get_pthermal method specified")
551 integer,
intent(in) :: ixI^L, ixO^L
552 double precision,
intent(inout) :: w(ixI^S, nw)
553 double precision,
intent(in) :: x(ixI^S, 1:ndim)
562 integer,
intent(in) :: ixI^L, ixO^L
563 double precision,
intent(inout) :: w(ixI^S, nw)
565 call mpistop(
"No get_auxiliary_prim method specified")
570 integer,
intent(in) :: igrid
571 type(state),
target :: psb(max_blocks)
576 integer,
intent(in) :: fh
577 integer,
dimension(MPI_STATUS_SIZE) :: st
581 integer,
parameter :: n_par = 0
583 call mpi_file_write(fh, n_par, 1, mpi_integer, st, er)
588 logical,
intent(in) :: primitive
589 integer,
intent(in) :: ixI^L,ixO^L
590 double precision,
intent(inout) :: w(ixI^S,1:nw)
591 double precision,
intent(in) :: x(ixI^S,1:ndim)
592 character(len=*),
intent(in) :: subname
598 integer,
intent(in) :: ixI^L, ixO^L, idim
599 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
600 double precision,
intent(in) :: cmax(ixI^S)
601 double precision,
intent(in),
optional :: cmin(ixI^S)
602 type(ct_velocity),
intent(inout):: vcts
607 integer,
intent(in) :: ixI^L, ixO^L
608 double precision,
intent(in) :: qt, qdt
610 double precision,
intent(in) :: wprim(ixI^S,1:nw)
611 type(state) :: sCT, s
612 type(ct_velocity) :: vcts
613 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
614 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
619 integer,
intent(in) :: ixO^L
625 type(state),
target :: psa(max_blocks)
626 double precision,
intent(in) :: qtC
627 integer :: iigrid, igrid
631 do iigrid=1,igridstail; igrid=igrids(iigrid);
632 psa(igrid)%w = 0.0d0*psa(igrid)%w
641 type(state),
target :: psa(max_blocks)
642 type(state),
target :: psb(max_blocks)
643 double precision,
intent(in) :: qdt
644 double precision,
intent(in) :: qtC
645 double precision,
intent(in) :: dtfactor
646 integer :: iigrid, igrid
650 do iigrid=1,igridstail; igrid=igrids(iigrid);
651 psa(igrid)%w = psb(igrid)%w
Add global source terms on complete domain (potentially implicit)
set equilibrium variables other than b0 (e.g. p0 and rho0)
Add special advance in each advect step.
subroutine, public mpistop(message)
Exit MPI-AMRVAC with an error message.
This module contains definitions of global parameters and variables and some generic functions/subrou...
logical stagger_grid
True for using stagger grid.
integer ndir
Number of spatial dimensions (components) for vector variables.
subroutine phys_hllc_check
subroutine phys_roe_check()
This module defines the procedures of a physics module. It contains function pointers for the various...
procedure(sub_get_a2max), pointer phys_get_a2max
procedure(sub_get_ct_velocity), pointer phys_get_ct_velocity
subroutine dummy_implicit_update(dtfactor, qdt, qtc, psa, psb)
subroutine dummy_boundary_adjust(igrid, psb)
procedure(sub_convert), pointer phys_to_primitive
procedure(sub_get_tgas), pointer phys_get_tgas
integer, parameter flux_tvdlf
Indicates the flux should be treated with tvdlf.
procedure(sub_small_values), pointer phys_handle_small_values
procedure(sub_write_info), pointer phys_write_info
procedure(sub_get_flux), pointer phys_get_flux
procedure(sub_evaluate_implicit), pointer phys_evaluate_implicit
subroutine dummy_get_auxiliary(ixil, ixol, w, x)
subroutine dummy_face_to_center(ixol, s)
subroutine dummy_modify_wlr(ixil, ixol, qt, wlc, wrc, wlp, wrp, s, idir)
subroutine dummy_get_a2max(w, x, ixil, ixol, a2max)
procedure(sub_get_cbounds), pointer phys_get_cbounds
procedure(sub_check_params), pointer phys_te_images
procedure(sub_get_dt), pointer phys_get_dt
subroutine dummy_update_faces(ixil, ixol, qt, qdt, wprim, fc, fe, sct, s, vcts)
logical phys_partial_ionization
Solve partially ionized one-fluid plasma.
logical phys_total_energy
Solve total energy equation or not.
integer, parameter flux_hll
Indicates the flux should be treated with hll.
procedure(sub_get_pthermal), pointer phys_get_pthermal
procedure(sub_update_temperature), pointer phys_update_temperature
procedure(sub_get_tcutoff), pointer phys_get_tcutoff
subroutine dummy_get_pthermal(w, x, ixil, ixol, pth)
procedure(sub_add_source_geom), pointer phys_add_source_geom
procedure(sub_check_params), pointer phys_check_params
integer, parameter flux_default
Indicates a normal flux.
subroutine dummy_get_cs2max(w, x, ixil, ixol, cs2max)
procedure(sub_get_cs2max), pointer phys_get_cs2max
procedure(sub_get_auxiliary), pointer phys_get_auxiliary
subroutine dummy_get_h_speed(wprim, x, ixil, ixol, idim, hspeed)
subroutine dummy_small_values(primitive, w, x, ixil, ixol, subname)
procedure(sub_get_auxiliary_prim), pointer phys_get_auxiliary_prim
integer, parameter flux_special
Indicates the flux should be specially treated.
procedure(sub_trac_after_setdt), pointer phys_trac_after_setdt
integer, parameter flux_no_dissipation
Indicates dissipation should be omitted.
subroutine dummy_add_source_geom(qdt, dtfactor, ixil, ixol, wct, wprim, w, x)
procedure(sub_set_equi_vars), pointer phys_set_equi_vars
integer, dimension(:, :), allocatable flux_type
Array per direction per variable, which can be used to specify that certain fluxes have to be treated...
integer phys_wider_stencil
To use wider stencils in flux calculations. A value of 1 will extend it by one cell in both direction...
subroutine dummy_init_params
procedure(sub_update_faces), pointer phys_update_faces
procedure(sub_convert), pointer phys_to_conserved
character(len=name_len) physics_type
String describing the physics type of the simulation.
procedure(sub_check_w), pointer phys_check_w
subroutine dummy_get_ct_velocity(vcts, wlp, wrp, ixil, ixol, idim, cmax, cmin)
procedure(sub_set_mg_bounds), pointer phys_set_mg_bounds
logical phys_equi_pe
if equilibrium pressure is splitted
procedure(sub_implicit_update), pointer phys_implicit_update
procedure(sub_get_trad), pointer phys_get_trad
subroutine dummy_evaluate_implicit(qtc, psa)
subroutine dummy_check_params
procedure(sub_clean_divb), pointer phys_clean_divb
procedure(sub_boundary_adjust), pointer phys_boundary_adjust
subroutine dummy_add_source(qdt, dtfactor, ixil, ixol, wct, wctprim, w, x, qsourcesplit, active)
double precision phys_gamma
procedure(sub_global_source), pointer phys_global_source_after
procedure(sub_add_source), pointer phys_add_source
procedure(sub_face_to_center), pointer phys_face_to_center
procedure(sub_modify_wlr), pointer phys_modify_wlr
subroutine dummy_write_info(fh)
procedure(sub_get_h_speed), pointer phys_get_h_speed
subroutine dummy_get_auxiliary_prim(ixil, ixol, w)
logical phys_internal_e
Solve internal energy instead of total energy.
procedure(sub_get_cmax), pointer phys_get_cmax
procedure(sub_get_rho), pointer phys_get_rho
procedure(sub_get_v), pointer phys_get_v
subroutine dummy_check_w(primitive, ixil, ixol, w, w_flag)
logical phys_energy
Solve energy equation or not.
procedure(sub_special_advance), pointer phys_special_advance
Module with all the methods that users can customize in AMRVAC.