113 integer,
intent(in) :: igrid
114 type(state),
target :: psb(max_blocks)
119 integer,
intent(in) :: ixI^L, ixO^L
120 double precision,
intent(inout) :: w(ixI^S, nw)
121 double precision,
intent(in) :: x(ixI^S, 1:^ND)
126 integer,
intent(in) :: ixI^L, ixO^L, idir
127 double precision,
intent(in) :: qt
128 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
129 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
136 integer,
intent(in) :: ixI^L, ixO^L, idims
137 double precision,
intent(inout) :: w(ixI^S, 1:nw)
138 double precision,
intent(in) :: x(ixI^S, 1:ndim)
139 double precision,
intent(out) :: wb_phi(ixI^S)
140 double precision,
intent(out) :: wb_phi_face(ixI^S)
141 double precision,
intent(out) :: wb_T(ixI^S)
145 wb_phi, wb_phi_face, wb_T)
147 integer,
intent(in) :: ixI^L, ixL^L, ixR^L, idims
148 double precision,
intent(inout) :: wLp(ixI^S, 1:nw), wRp(ixI^S, 1:nw)
149 double precision,
intent(inout) :: w(ixI^S, 1:nw)
150 double precision,
intent(in) :: wb_phi(ixI^S), wb_phi_face(ixI^S)
151 double precision,
intent(in) :: wb_T(ixI^S)
156 integer,
intent(in) :: ixI^L, ixO^L
157 double precision,
intent(inout) :: w(ixI^S, 1:nw)
158 double precision,
intent(in) :: x(ixI^S, 1:ndim)
163 integer,
intent(in) :: ixI^L, ixO^L, idim
164 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
165 double precision,
intent(inout) :: cmax(ixI^S)
170 integer,
intent(in) :: ixI^L, ixO^L
171 double precision,
intent(inout) :: w(ixI^S, nw)
172 double precision,
intent(in) :: x(ixI^S, 1:^ND)
173 double precision,
intent(out) :: tco_local, Tmax_local
177 double precision,
intent(in) :: trac_alfa,tco,T_peak,T_bott
182 integer,
intent(in) :: ixI^L, ixO^L
183 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
184 double precision,
intent(out) :: v(ixI^S,1:ndir)
189 integer,
intent(in) :: ixI^L, ixO^L
190 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
191 double precision,
intent(out) :: rho(ixI^S)
196 integer,
intent(in) :: ixI^L, ixO^L, idim
197 double precision,
intent(in) :: wprim(ixI^S, nw)
198 double precision,
intent(in) :: x(ixI^S,1:ndim)
199 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
202 subroutine sub_get_cbounds(wLC, wRC, wLp, wRp, x, ixI^L, ixO^L, idim, Hspeed, cmax, cmin)
205 integer,
intent(in) :: ixI^L, ixO^L, idim
206 double precision,
intent(in) :: wLC(ixI^S, nw), wRC(ixI^S, nw)
207 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
208 double precision,
intent(in) :: x(ixI^S, 1:^ND)
209 double precision,
intent(inout) :: cmax(ixI^S,1:number_species)
210 double precision,
intent(inout),
optional :: cmin(ixI^S,1:number_species)
211 double precision,
intent(in) :: Hspeed(ixI^S,1:number_species)
216 integer,
intent(in) :: ixI^L, ixO^L, idim
217 double precision,
intent(in) :: wC(ixI^S, 1:nw)
218 double precision,
intent(in) :: w(ixI^S, 1:nw)
219 double precision,
intent(in) :: x(ixI^S, 1:^ND)
220 double precision,
intent(out) :: f(ixI^S, nwflux)
225 integer,
intent(in) :: ixI^L, ixO^L
226 double precision,
intent(inout) :: w(ixI^S, nw)
227 double precision,
intent(in) :: x(ixI^S, 1:ndim)
232 integer,
intent(in) :: ixi^
l, ixo^
l
233 double precision,
intent(in) :: w(ixi^s, nw)
234 double precision :: ei(ixo^s)
239 integer,
intent(in) :: ixI^L, ixO^L
240 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
241 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), wprim(ixI^S, 1:nw), w(ixI^S, 1:nw)
245 qsourcesplit, active)
247 integer,
intent(in) :: ixI^L, ixO^L
248 double precision,
intent(in) :: qdt, dtfactor
249 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(ixI^S,1:nw), x(ixI^S, 1:ndim)
250 double precision,
intent(inout) :: w(ixI^S, 1:nw)
251 logical,
intent(in) :: qsourcesplit
252 logical,
intent(inout) :: active
258 double precision,
intent(in) :: qdt
259 double precision,
intent(in) :: qt
260 logical,
intent(inout) :: active
266 double precision,
intent(in) :: qdt
267 double precision,
intent(in) :: qt
268 logical,
intent(inout) :: active
273 integer,
intent(in) :: igrid
280 double precision,
intent(in) :: qt
281 type(state),
target :: psa(max_blocks)
286 integer,
intent(in) :: ixI^L, ixO^L
287 double precision,
intent(in) :: dx^D, x(ixI^S, 1:^ND)
288 double precision,
intent(in) :: w(ixI^S, 1:nw)
289 double precision,
intent(inout) :: dtnew
294 logical,
intent(in) :: primitive
295 integer,
intent(in) :: ixI^L, ixO^L
296 double precision,
intent(in) :: w(ixI^S,1:nw)
297 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
302 integer,
intent(in) :: ixI^L, ixO^L
303 double precision,
intent(in) :: w(ixI^S,nw)
304 double precision,
intent(in) :: x(ixI^S,1:ndim)
305 double precision,
intent(out):: pth(ixI^S)
310 integer,
intent(in) :: ixI^L, ixO^L
311 double precision,
intent(inout) :: w(ixI^S,nw)
312 double precision,
intent(in) :: x(ixI^S,1:ndim)
317 integer,
intent(in) :: ixI^L, ixO^L
318 double precision,
intent(inout) :: w(ixI^S,nw)
323 integer,
intent(in) :: ixI^L, ixO^L
324 double precision,
intent(in) :: w(ixI^S,nw)
325 double precision,
intent(in) :: x(ixI^S,1:ndim)
326 double precision,
intent(out):: tgas(ixI^S)
331 integer,
intent(in) :: ixI^L, ixO^L
332 double precision,
intent(in) :: w(ixI^S,nw)
333 double precision,
intent(in) :: x(ixI^S,1:ndim)
334 double precision,
intent(out):: cmax(ixI^S)
339 integer,
intent(in) :: ixI^L, ixO^L
340 double precision,
intent(in) :: w(ixI^S,nw)
341 double precision,
intent(in) :: x(ixI^S,1:ndim)
342 double precision,
intent(out):: cmax(ixI^S)
346 integer,
intent(in) :: file_handle
351 logical,
intent(in) :: primitive
352 integer,
intent(in) :: ixI^L,ixO^L
353 double precision,
intent(inout) :: w(ixI^S,1:nw)
354 double precision,
intent(in) :: x(ixI^S,1:ndim)
355 character(len=*),
intent(in) :: subname
361 integer,
intent(in) :: ixI^L, ixO^L, idim
362 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
363 double precision,
intent(in) :: cmax(ixI^S)
364 double precision,
intent(in),
optional :: cmin(ixI^S)
365 type(ct_velocity),
intent(inout):: vcts
370 integer,
intent(in) :: ixI^L, ixO^L
371 double precision,
intent(in) :: qt, qdt
373 double precision,
intent(in) :: wprim(ixI^S,1:nw)
375 type(state) :: sCT, s
376 type(ct_velocity) :: vcts
377 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
378 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
383 integer,
intent(in) :: ixO^L
389 type(state),
target :: psa(max_blocks)
390 double precision,
intent(in) :: qtC
395 type(state),
target :: psa(max_blocks)
396 type(state),
target :: psb(max_blocks)
397 double precision,
intent(in) :: qdt
398 double precision,
intent(in) :: qtC
399 double precision,
intent(in) :: dtfactor
404 integer,
intent(in) :: ixI^L, ixO^L, idims
406 double precision,
intent(in) :: wC(ixI^S,nw)
408 double precision,
intent(in) :: w(ixI^S,nw)
409 double precision,
intent(in) :: x(ixI^S,1:ndim)
410 double precision,
intent(out) :: f(ixI^S,1:ndir)
434 call mpistop(
"Error: phys_to_conserved not defined")
437 call mpistop(
"Error: phys_to_primitive not defined")
443 call mpistop(
"Error: no phys_get_cmax not defined")
449 call mpistop(
"Error: no phys_get_cbounds not defined")
452 call mpistop(
"Error: no phys_get_flux not defined")
455 call mpistop(
"Error: no phys_get_dt not defined")
510 integer,
intent(in) :: ixI^L, ixO^L, idir
511 double precision,
intent(in) :: qt
512 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
513 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
519 integer,
intent(in) :: ixI^L, ixO^L, idim
520 double precision,
intent(in) :: wprim(ixI^S, nw)
521 double precision,
intent(in) :: x(ixI^S,1:ndim)
522 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
527 integer,
intent(in) :: ixI^L, ixO^L
528 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
529 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), wprim(ixI^S,1:nw),w(ixI^S, 1:nw)
533 qsourcesplit, active)
535 integer,
intent(in) :: ixI^L, ixO^L
536 double precision,
intent(in) :: qdt,dtfactor
537 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(ixI^S,1:nw), x(ixI^S, 1:ndim)
538 double precision,
intent(inout) :: w(ixI^S, 1:nw)
539 logical,
intent(in) :: qsourcesplit
540 logical,
intent(inout) :: active
546 logical,
intent(in) :: primitive
547 integer,
intent(in) :: ixI^L, ixO^L
548 double precision,
intent(in) :: w(ixI^S,1:nw)
549 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
558 integer,
intent(in) :: ixI^L, ixO^L
559 double precision,
intent(in) :: w(ixI^S, nw)
560 double precision,
intent(in) :: x(ixI^S, 1:ndim)
561 double precision,
intent(out):: pth(ixI^S)
563 call mpistop(
"No get_pthermal method specified")
570 integer,
intent(in) :: ixI^L, ixO^L
571 double precision,
intent(inout) :: w(ixI^S, nw)
572 double precision,
intent(in) :: x(ixI^S, 1:ndim)
581 integer,
intent(in) :: ixI^L, ixO^L
582 double precision,
intent(inout) :: w(ixI^S, nw)
584 call mpistop(
"No get_auxiliary_prim method specified")
589 integer,
intent(in) :: igrid
590 type(state),
target :: psb(max_blocks)
595 integer,
intent(in) :: fh
596 integer,
dimension(MPI_STATUS_SIZE) :: st
600 integer,
parameter :: n_par = 0
602 call mpi_file_write(fh, n_par, 1, mpi_integer, st, er)
607 logical,
intent(in) :: primitive
608 integer,
intent(in) :: ixI^L,ixO^L
609 double precision,
intent(inout) :: w(ixI^S,1:nw)
610 double precision,
intent(in) :: x(ixI^S,1:ndim)
611 character(len=*),
intent(in) :: subname
617 integer,
intent(in) :: ixI^L, ixO^L, idim
618 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
619 double precision,
intent(in) :: cmax(ixI^S)
620 double precision,
intent(in),
optional :: cmin(ixI^S)
621 type(ct_velocity),
intent(inout):: vcts
626 integer,
intent(in) :: ixI^L, ixO^L
627 double precision,
intent(in) :: qt, qdt
629 double precision,
intent(in) :: wprim(ixI^S,1:nw)
630 type(state) :: sCT, s
631 type(ct_velocity) :: vcts
632 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
633 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
638 integer,
intent(in) :: ixO^L
644 type(state),
target :: psa(max_blocks)
645 double precision,
intent(in) :: qtC
646 integer :: iigrid, igrid
650 do iigrid=1,igridstail; igrid=igrids(iigrid);
651 psa(igrid)%w = 0.0d0*psa(igrid)%w
660 type(state),
target :: psa(max_blocks)
661 type(state),
target :: psb(max_blocks)
662 double precision,
intent(in) :: qdt
663 double precision,
intent(in) :: qtC
664 double precision,
intent(in) :: dtfactor
665 integer :: iigrid, igrid
669 do iigrid=1,igridstail; igrid=igrids(iigrid);
670 psa(igrid)%w = psb(igrid)%w
679 integer,
intent(in) :: ixI^L, ixO^L, idims
681 double precision,
intent(in) :: wC(ixI^S,nw)
683 double precision,
intent(in) :: w(ixI^S,nw)
684 double precision,
intent(in) :: x(ixI^S,1:ndim)
685 double precision,
intent(out) :: f(ixI^S,1:ndir)
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_check_params), pointer phys_bind_eos_to_source
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_wb_transform), pointer phys_wb_transform
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_e_to_ei), pointer phys_e_to_ei
procedure(sub_get_flux), pointer phys_get_flux
procedure(sub_e_to_ei), pointer phys_ei_to_e
procedure(sub_evaluate_implicit), pointer phys_evaluate_implicit
subroutine dummy_get_auxiliary(ixil, ixol, w, x)
subroutine dummy_face_to_center(ixol, s)
procedure(sub_get_pthermal), pointer phys_get_gamma1
subroutine dummy_modify_wlr(ixil, ixol, qt, wlc, wrc, wlp, wrp, s, idir)
procedure(sub_get_cbounds), pointer phys_get_cbounds
logical phys_hd_mom_conserve_fix
exclude Maxwell stress flux from momentum flux (use hydrodynamic momentum flux) for conservation fix ...
procedure(sub_check_params), pointer phys_te_images
procedure(sub_wb_inverse), pointer phys_wb_inverse
procedure(sub_get_dt), pointer phys_get_dt
subroutine dummy_update_faces(ixil, ixol, qt, qdt, wprim, fc, fe, sct, s, vcts)
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_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
procedure(sub_wb_prolong), pointer phys_wb_prolong
integer, parameter flux_default
Indicates a normal flux.
procedure(sub_get_auxiliary), pointer phys_get_auxiliary
integer transverse_ghost_cells
extra ghost cells in the transverse dimensions for fluxes of CT
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.
procedure(sub_get_ei), pointer phys_get_ei
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...
procedure(sub_get_rfactor), pointer phys_get_rfactor
integer phys_wider_stencil
To use wider stencils in flux calculations. A value of 1 will extend it by one cell in both direction...
procedure(sub_get_hd_mom_flux), pointer phys_get_hd_mom_flux
subroutine dummy_init_params
procedure(sub_update_faces), pointer phys_update_faces
procedure(sub_convert), pointer phys_to_prolong
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
procedure(sub_implicit_update), pointer phys_implicit_update
procedure(sub_convert), pointer phys_from_prolong
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)
procedure(sub_get_csrad2), pointer phys_get_csrad2
logical phys_energy
Solve energy equation or not.
subroutine dummy_get_hd_mom_flux(wc, w, x, ixil, ixol, idims, f)
procedure(sub_special_advance), pointer phys_special_advance
Module with all the methods that users can customize in AMRVAC.