110 integer,
intent(in) :: igrid
111 type(state),
target :: psb(max_blocks)
116 integer,
intent(in) :: ixI^L, ixO^L
117 double precision,
intent(inout) :: w(ixI^S, nw)
118 double precision,
intent(in) :: x(ixI^S, 1:^ND)
121 subroutine sub_modify_wlr(ixI^L, ixO^L, qt, wLC, wRC, wLp, wRp, s, idir)
123 integer,
intent(in) :: ixI^L, ixO^L, idir
124 double precision,
intent(in) :: qt
125 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
126 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
128 end subroutine sub_modify_wlr
132 integer,
intent(in) :: ixI^L, ixO^L, idim
133 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
134 double precision,
intent(inout) :: cmax(ixI^S)
139 integer,
intent(in) :: ixI^L, ixO^L
140 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
141 double precision,
intent(inout) :: a2max(ndim)
146 integer,
intent(in) :: ixI^L, ixO^L
147 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
148 double precision,
intent(inout) :: cs2max
153 integer,
intent(in) :: ixI^L, ixO^L
154 double precision,
intent(inout) :: w(ixI^S, nw)
155 double precision,
intent(in) :: x(ixI^S, 1:^ND)
156 double precision,
intent(out) :: tco_local, Tmax_local
160 double precision,
intent(in) :: trac_alfa,tco,T_peak,T_bott
165 integer,
intent(in) :: ixI^L, ixO^L
166 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
167 double precision,
intent(out) :: v(ixI^S,1:ndir)
172 integer,
intent(in) :: ixI^L, ixO^L
173 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
174 double precision,
intent(out) :: rho(ixI^S)
177 subroutine sub_get_h_speed(wprim,x,ixI^L,ixO^L,idim,Hspeed)
179 integer,
intent(in) :: ixI^L, ixO^L, idim
180 double precision,
intent(in) :: wprim(ixI^S, nw)
181 double precision,
intent(in) :: x(ixI^S,1:ndim)
182 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
183 end subroutine sub_get_h_speed
185 subroutine sub_get_cbounds(wLC, wRC, wLp, wRp, x, ixI^L, ixO^L, idim, Hspeed, cmax, cmin)
188 integer,
intent(in) :: ixI^L, ixO^L, idim
189 double precision,
intent(in) :: wLC(ixI^S, nw), wRC(ixI^S, nw)
190 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
191 double precision,
intent(in) :: x(ixI^S, 1:^ND)
192 double precision,
intent(inout) :: cmax(ixI^S,1:number_species)
193 double precision,
intent(inout),
optional :: cmin(ixI^S,1:number_species)
194 double precision,
intent(in) :: Hspeed(ixI^S,1:number_species)
199 integer,
intent(in) :: ixI^L, ixO^L, idim
200 double precision,
intent(in) :: wC(ixI^S, 1:nw)
201 double precision,
intent(in) :: w(ixI^S, 1:nw)
202 double precision,
intent(in) :: x(ixI^S, 1:^ND)
203 double precision,
intent(out) :: f(ixI^S, nwflux)
208 integer,
intent(in) :: ixI^L, ixO^L
209 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
210 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), w(ixI^S, 1:nw)
214 qsourcesplit, active)
216 integer,
intent(in) :: ixI^L, ixO^L
217 double precision,
intent(in) :: qdt, dtfactor
218 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(ixI^S,1:nw), x(ixI^S, 1:ndim)
219 double precision,
intent(inout) :: w(ixI^S, 1:nw)
220 logical,
intent(in) :: qsourcesplit
221 logical,
intent(inout) :: active
227 double precision,
intent(in) :: qdt
228 double precision,
intent(in) :: qt
229 logical,
intent(inout) :: active
235 double precision,
intent(in) :: qdt
236 double precision,
intent(in) :: qt
237 logical,
intent(inout) :: active
242 integer,
intent(in) :: igrid
249 double precision,
intent(in) :: qt
250 type(state),
target :: psa(max_blocks)
255 integer,
intent(in) :: ixI^L, ixO^L
256 double precision,
intent(in) :: dx^D, x(ixI^S, 1:^ND)
257 double precision,
intent(in) :: w(ixI^S, 1:nw)
258 double precision,
intent(inout) :: dtnew
263 logical,
intent(in) :: primitive
264 integer,
intent(in) :: ixI^L, ixO^L
265 double precision,
intent(in) :: w(ixI^S,1:nw)
266 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
271 integer,
intent(in) :: ixI^L, ixO^L
272 double precision,
intent(in) :: w(ixI^S,nw)
273 double precision,
intent(in) :: x(ixI^S,1:ndim)
274 double precision,
intent(out):: pth(ixI^S)
279 integer,
intent(in) :: ixI^L, ixO^L
280 double precision,
intent(inout) :: w(ixI^S,nw)
281 double precision,
intent(in) :: x(ixI^S,1:ndim)
286 integer,
intent(in) :: ixI^L, ixO^L
287 double precision,
intent(inout) :: w(ixI^S,nw)
292 integer,
intent(in) :: ixI^L, ixO^L
293 double precision,
intent(in) :: w(ixI^S,nw)
294 double precision,
intent(in) :: x(ixI^S,1:ndim)
295 double precision,
intent(out):: tgas(ixI^S)
300 integer,
intent(in) :: ixI^L, ixO^L
301 double precision,
intent(in) :: w(ixI^S,nw)
302 double precision,
intent(in) :: x(ixI^S,1:ndim)
303 double precision,
intent(out):: trad(ixI^S)
307 integer,
intent(in) :: file_handle
312 logical,
intent(in) :: primitive
313 integer,
intent(in) :: ixI^L,ixO^L
314 double precision,
intent(inout) :: w(ixI^S,1:nw)
315 double precision,
intent(in) :: x(ixI^S,1:ndim)
316 character(len=*),
intent(in) :: subname
321 integer,
intent(in) :: ixI^L, ixO^L
322 double precision,
intent(in) :: w(ixI^S, nw)
323 double precision,
intent(out) :: out(ixO^S)
329 integer,
intent(in) :: ixI^L, ixO^L, idim
330 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
331 double precision,
intent(in) :: cmax(ixI^S)
332 double precision,
intent(in),
optional :: cmin(ixI^S)
333 type(ct_velocity),
intent(inout):: vcts
338 integer,
intent(in) :: ixI^L, ixO^L
339 double precision,
intent(in) :: qt, qdt
341 double precision,
intent(in) :: wprim(ixI^S,1:nw)
343 type(state) :: sCT, s
344 type(ct_velocity) :: vcts
345 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
346 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
351 integer,
intent(in) :: ixO^L
357 type(state),
target :: psa(max_blocks)
358 double precision,
intent(in) :: qtC
363 type(state),
target :: psa(max_blocks)
364 type(state),
target :: psb(max_blocks)
365 double precision,
intent(in) :: qdt
366 double precision,
intent(in) :: qtC
367 double precision,
intent(in) :: dtfactor
372 integer,
intent(in) :: ixI^L, ixO^L
373 double precision,
intent(in) :: wCT(ixI^S,nw),x(ixI^S,1:ndim)
374 double precision,
intent(inout) :: w(ixI^S,nw)
398 call mpistop(
"Error: phys_to_conserved not defined")
401 call mpistop(
"Error: phys_to_primitive not defined")
407 call mpistop(
"Error: no phys_get_cmax not defined")
419 call mpistop(
"Error: no phys_get_cbounds not defined")
422 call mpistop(
"Error: no phys_get_flux not defined")
425 call mpistop(
"Error: no phys_get_dt not defined")
477 integer,
intent(in) :: ixI^L, ixO^L, idir
478 double precision,
intent(in) :: qt
479 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
480 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
486 integer,
intent(in) :: ixI^L, ixO^L, idim
487 double precision,
intent(in) :: wprim(ixI^S, nw)
488 double precision,
intent(in) :: x(ixI^S,1:ndim)
489 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
495 integer,
intent(in) :: ixI^L, ixO^L
496 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
497 double precision,
intent(inout) :: a2max(ndim)
498 call mpistop(
"Error: entered dummy_get_a2max")
504 integer,
intent(in) :: ixI^L, ixO^L
505 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
506 double precision,
intent(inout) :: cs2max
507 call mpistop(
"Error: entered dummy_get_cs2max")
512 integer,
intent(in) :: ixI^L, ixO^L
513 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
514 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), w(ixI^S, 1:nw)
518 qsourcesplit, active)
520 integer,
intent(in) :: ixI^L, ixO^L
521 double precision,
intent(in) :: qdt,dtfactor
522 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(ixI^S,1:nw), x(ixI^S, 1:ndim)
523 double precision,
intent(inout) :: w(ixI^S, 1:nw)
524 logical,
intent(in) :: qsourcesplit
525 logical,
intent(inout) :: active
531 logical,
intent(in) :: primitive
532 integer,
intent(in) :: ixI^L, ixO^L
533 double precision,
intent(in) :: w(ixI^S,1:nw)
534 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
543 integer,
intent(in) :: ixI^L, ixO^L
544 double precision,
intent(in) :: w(ixI^S, nw)
545 double precision,
intent(in) :: x(ixI^S, 1:ndim)
546 double precision,
intent(out):: pth(ixI^S)
548 call mpistop(
"No get_pthermal method specified")
555 integer,
intent(in) :: ixI^L, ixO^L
556 double precision,
intent(inout) :: w(ixI^S, nw)
557 double precision,
intent(in) :: x(ixI^S, 1:ndim)
566 integer,
intent(in) :: ixI^L, ixO^L
567 double precision,
intent(inout) :: w(ixI^S, nw)
569 call mpistop(
"No get_auxiliary_prim method specified")
574 integer,
intent(in) :: igrid
575 type(state),
target :: psb(max_blocks)
580 integer,
intent(in) :: fh
581 integer,
dimension(MPI_STATUS_SIZE) :: st
585 integer,
parameter :: n_par = 0
587 call mpi_file_write(fh, n_par, 1, mpi_integer, st, er)
592 logical,
intent(in) :: primitive
593 integer,
intent(in) :: ixI^L,ixO^L
594 double precision,
intent(inout) :: w(ixI^S,1:nw)
595 double precision,
intent(in) :: x(ixI^S,1:ndim)
596 character(len=*),
intent(in) :: subname
602 integer,
intent(in) :: ixI^L, ixO^L, idim
603 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
604 double precision,
intent(in) :: cmax(ixI^S)
605 double precision,
intent(in),
optional :: cmin(ixI^S)
606 type(ct_velocity),
intent(inout):: vcts
611 integer,
intent(in) :: ixI^L, ixO^L
612 double precision,
intent(in) :: qt, qdt
614 double precision,
intent(in) :: wprim(ixI^S,1:nw)
615 type(state) :: sCT, s
616 type(ct_velocity) :: vcts
617 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
618 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
623 integer,
intent(in) :: ixO^L
629 type(state),
target :: psa(max_blocks)
630 double precision,
intent(in) :: qtC
631 integer :: iigrid, igrid
635 do iigrid=1,igridstail; igrid=igrids(iigrid);
636 psa(igrid)%w = 0.0d0*psa(igrid)%w
645 type(state),
target :: psa(max_blocks)
646 type(state),
target :: psb(max_blocks)
647 double precision,
intent(in) :: qdt
648 double precision,
intent(in) :: qtC
649 double precision,
intent(in) :: dtfactor
650 integer :: iigrid, igrid
654 do iigrid=1,igridstail; igrid=igrids(iigrid);
655 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_update_faces(ixIL, ixOL, qt, qdt, wprim, fC, fE, sCT, s, vcts)
subroutine dummy_boundary_adjust(igrid, psb)
subroutine dummy_get_ct_velocity(vcts, wLp, wRp, ixIL, ixOL, idim, cmax, cmin)
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
logical phys_req_diagonal
Whether the physics routines require diagonal ghost cells, for example for computing a curl.
procedure(sub_get_cbounds), pointer phys_get_cbounds
procedure(sub_check_params), pointer phys_te_images
subroutine dummy_face_to_center(ixOL, s)
procedure(sub_get_dt), pointer phys_get_dt
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
subroutine dummy_get_h_speed(wprim, x, ixIL, ixOL, idim, Hspeed)
procedure(sub_update_temperature), pointer phys_update_temperature
procedure(sub_get_tcutoff), pointer phys_get_tcutoff
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.
procedure(sub_get_cs2max), pointer phys_get_cs2max
procedure(sub_get_auxiliary), pointer phys_get_auxiliary
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_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
procedure(sub_set_mg_bounds), pointer phys_set_mg_bounds
subroutine dummy_evaluate_implicit(qtC, psa)
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_add_source_geom(qdt, dtfactor, ixIL, ixOL, wCT, w, x)
subroutine dummy_check_params
subroutine dummy_get_auxiliary(ixIL, ixOL, w, x)
procedure(sub_clean_divb), pointer phys_clean_divb
subroutine dummy_implicit_update(dtfactor, qdt, qtC, psa, psb)
procedure(sub_boundary_adjust), pointer phys_boundary_adjust
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
subroutine dummy_get_pthermal(w, x, ixIL, ixOL, pth)
procedure(sub_modify_wlr), pointer phys_modify_wlr
subroutine dummy_write_info(fh)
procedure(sub_get_h_speed), pointer phys_get_h_speed
logical phys_internal_e
Solve internal energy instead of total energy.
subroutine dummy_get_cs2max(w, x, ixIL, ixOL, cs2max)
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_add_source(qdt, dtfactor, ixIL, ixOL, wCT, wCTprim, w, x, qsourcesplit, active)
subroutine dummy_get_auxiliary_prim(ixIL, ixOL, w)
subroutine dummy_get_a2max(w, x, ixIL, ixOL, a2max)
subroutine dummy_small_values(primitive, w, x, ixIL, ixOL, subname)
logical phys_energy
Solve energy equation or not.
subroutine dummy_check_w(primitive, ixIL, ixOL, w, w_flag)
procedure(sub_special_advance), pointer phys_special_advance
subroutine dummy_modify_wlr(ixIL, ixOL, qt, wLC, wRC, wLp, wRp, s, idir)
Module with all the methods that users can customize in AMRVAC.