105 integer,
intent(in) :: igrid
106 type(state),
target :: psb(max_blocks)
111 integer,
intent(in) :: ixI^L, ixO^L
112 double precision,
intent(inout) :: w(ixI^S, nw)
113 double precision,
intent(in) :: x(ixI^S, 1:^ND)
116 subroutine sub_modify_wlr(ixI^L, ixO^L, qt, wLC, wRC, wLp, wRp, s, idir)
118 integer,
intent(in) :: ixI^L, ixO^L, idir
119 double precision,
intent(in) :: qt
120 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
121 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
123 end subroutine sub_modify_wlr
127 integer,
intent(in) :: ixI^L, ixO^L, idim
128 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
129 double precision,
intent(inout) :: cmax(ixI^S)
134 integer,
intent(in) :: ixI^L, ixO^L
135 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
136 double precision,
intent(inout) :: a2max(ndim)
141 integer,
intent(in) :: ixI^L, ixO^L
142 double precision,
intent(inout) :: w(ixI^S, nw)
143 double precision,
intent(in) :: x(ixI^S, 1:^ND)
144 double precision,
intent(out) :: tco_local, Tmax_local
150 integer,
intent(in) :: ixI^L, ixO^L
151 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
152 double precision,
intent(out) :: v(ixI^S,1:ndir)
156 subroutine sub_get_h_speed(wprim,x,ixI^L,ixO^L,idim,Hspeed)
158 integer,
intent(in) :: ixI^L, ixO^L, idim
159 double precision,
intent(in) :: wprim(ixI^S, nw)
160 double precision,
intent(in) :: x(ixI^S,1:ndim)
161 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
162 end subroutine sub_get_h_speed
164 subroutine sub_get_cbounds(wLC, wRC, wLp, wRp, x, ixI^L, ixO^L, idim, Hspeed, cmax, cmin)
167 integer,
intent(in) :: ixI^L, ixO^L, idim
168 double precision,
intent(in) :: wLC(ixI^S, nw), wRC(ixI^S, nw)
169 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
170 double precision,
intent(in) :: x(ixI^S, 1:^ND)
171 double precision,
intent(inout) :: cmax(ixI^S,1:number_species)
172 double precision,
intent(inout),
optional :: cmin(ixI^S,1:number_species)
173 double precision,
intent(in) :: Hspeed(ixI^S,1:number_species)
178 integer,
intent(in) :: ixI^L, ixO^L, idim
179 double precision,
intent(in) :: wC(ixI^S, 1:nw)
180 double precision,
intent(in) :: w(ixI^S, 1:nw)
181 double precision,
intent(in) :: x(ixI^S, 1:^ND)
182 double precision,
intent(out) :: f(ixI^S, nwflux)
187 integer,
intent(in) :: ixI^L,ixO^L
188 double precision,
intent(in) :: x(ixI^S,1:ndim)
189 double precision,
intent(inout) :: w(ixI^S,1:nw)
194 integer,
intent(in) :: ixI^L, ixO^L
195 double precision,
intent(in) :: qdt, x(ixI^S, 1:^ND)
196 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), w(ixI^S, 1:nw)
200 qsourcesplit, active, wCTprim)
202 integer,
intent(in) :: ixI^L, ixO^L
203 double precision,
intent(in) :: qdt
204 double precision,
intent(in) :: wCT(ixI^S, 1:nw), x(ixI^S, 1:ndim)
205 double precision,
intent(inout) :: w(ixI^S, 1:nw)
206 logical,
intent(in) :: qsourcesplit
207 logical,
intent(inout) :: active
208 double precision,
intent(in),
optional :: wCTprim(ixI^S,1:nw)
214 double precision,
intent(in) :: qdt
215 double precision,
intent(in) :: qt
216 logical,
intent(inout) :: active
222 double precision,
intent(in) :: qdt
223 double precision,
intent(in) :: qt
224 logical,
intent(inout) :: active
229 integer,
intent(in) :: igrid
236 double precision,
intent(in) :: qt
237 type(state),
target :: psa(max_blocks)
242 integer,
intent(in) :: ixI^L, ixO^L
243 double precision,
intent(in) :: dx^D, x(ixI^S, 1:^ND)
244 double precision,
intent(in) :: w(ixI^S, 1:nw)
245 double precision,
intent(inout) :: dtnew
250 logical,
intent(in) :: primitive
251 integer,
intent(in) :: ixI^L, ixO^L
252 double precision,
intent(in) :: w(ixI^S,1:nw)
253 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
258 integer,
intent(in) :: ixI^L, ixO^L
259 double precision,
intent(in) :: w(ixI^S,nw)
260 double precision,
intent(in) :: x(ixI^S,1:ndim)
261 double precision,
intent(out):: pth(ixI^S)
266 integer,
intent(in) :: ixI^L, ixO^L
267 double precision,
intent(in) :: w(ixI^S,nw)
268 double precision,
intent(in) :: x(ixI^S,1:ndim)
269 double precision,
intent(out):: tgas(ixI^S)
274 integer,
intent(in) :: ixI^L, ixO^L
275 double precision,
intent(in) :: w(ixI^S,nw)
276 double precision,
intent(in) :: x(ixI^S,1:ndim)
277 double precision,
intent(out):: trad(ixI^S)
281 integer,
intent(in) :: file_handle
286 integer,
intent(in) :: ixI^L, ixO^L
287 double precision,
intent(in) :: x(ixI^S,1:ndim)
288 double precision,
intent(inout) :: fC(ixI^S,1:nwflux,1:ndim), wnew(ixI^S,1:nw)
289 integer,
intent(in) :: idim
294 logical,
intent(in) :: primitive
295 integer,
intent(in) :: ixI^L,ixO^L
296 double precision,
intent(inout) :: w(ixI^S,1:nw)
297 double precision,
intent(in) :: x(ixI^S,1:ndim)
298 character(len=*),
intent(in) :: subname
303 integer,
intent(in) :: ixI^L, ixO^L
304 double precision,
intent(in) :: w(ixI^S, nw)
305 double precision,
intent(out) :: out(ixO^S)
311 integer,
intent(in) :: ixI^L, ixO^L, idim
312 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
313 double precision,
intent(in) :: cmax(ixI^S)
314 double precision,
intent(in),
optional :: cmin(ixI^S)
315 type(ct_velocity),
intent(inout):: vcts
320 integer,
intent(in) :: ixI^L, ixO^L
321 double precision,
intent(in) :: qt, qdt
323 double precision,
intent(in) :: wprim(ixI^S,1:nw)
325 type(state) :: sCT, s
326 type(ct_velocity) :: vcts
327 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
328 double precision,
intent(inout) :: fE(ixI^S,7-2*ndim:3)
333 integer,
intent(in) :: ixO^L
339 type(state),
target :: psa(max_blocks)
340 double precision,
intent(in) :: qtC
345 type(state),
target :: psa(max_blocks)
346 type(state),
target :: psb(max_blocks)
347 double precision,
intent(in) :: qdt
348 double precision,
intent(in) :: qtC
349 double precision,
intent(in) :: dtfactor
375 call mpistop(
"Error: phys_to_conserved not defined")
378 call mpistop(
"Error: phys_to_primitive not defined")
384 call mpistop(
"Error: no phys_get_cmax not defined")
393 call mpistop(
"Error: no phys_get_cbounds not defined")
396 call mpistop(
"Error: no phys_get_flux not defined")
399 call mpistop(
"Error: no phys_get_dt not defined")
450 integer,
intent(in) :: ixI^L, ixO^L, idir
451 double precision,
intent(in) :: qt
452 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
453 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
459 integer,
intent(in) :: ixI^L, ixO^L, idim
460 double precision,
intent(in) :: wprim(ixI^S, nw)
461 double precision,
intent(in) :: x(ixI^S,1:ndim)
462 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
467 integer,
intent(in) :: ixI^L, ixO^L
468 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
469 double precision,
intent(inout) :: a2max(ndim)
470 call mpistop(
"Error: entered dummy_get_a2max")
475 integer,
intent(in) :: ixI^L, ixO^L
476 double precision,
intent(in) :: qdt, x(ixI^S, 1:^ND)
477 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), w(ixI^S, 1:nw)
481 qsourcesplit, active, wCTprim)
483 integer,
intent(in) :: ixI^L, ixO^L
484 double precision,
intent(in) :: qdt
485 double precision,
intent(in) :: wCT(ixI^S, 1:nw), x(ixI^S, 1:ndim)
486 double precision,
intent(inout) :: w(ixI^S, 1:nw)
487 logical,
intent(in) :: qsourcesplit
488 logical,
intent(inout) :: active
489 double precision,
intent(in),
optional :: wCTprim(ixI^S,1:nw)
495 logical,
intent(in) :: primitive
496 integer,
intent(in) :: ixI^L, ixO^L
497 double precision,
intent(in) :: w(ixI^S,1:nw)
498 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
506 integer,
intent(in) :: ixI^L, ixO^L
507 double precision,
intent(in) :: w(ixI^S, nw)
508 double precision,
intent(in) :: x(ixI^S, 1:ndim)
509 double precision,
intent(out):: pth(ixI^S)
511 call mpistop(
"No get_pthermal method specified")
516 integer,
intent(in) :: igrid
517 type(state),
target :: psb(max_blocks)
522 integer,
intent(in) :: fh
523 integer,
dimension(MPI_STATUS_SIZE) :: st
527 integer,
parameter :: n_par = 0
529 call mpi_file_write(fh, n_par, 1, mpi_integer, st, er)
534 double precision,
intent(in) :: x(ixI^S,1:ndim)
535 double precision,
intent(inout) :: fC(ixI^S,1:nwflux,1:ndim), wnew(ixI^S,1:nw)
536 integer,
intent(in) :: ixI^L, ixO^L
537 integer,
intent(in) :: idim
542 logical,
intent(in) :: primitive
543 integer,
intent(in) :: ixI^L,ixO^L
544 double precision,
intent(inout) :: w(ixI^S,1:nw)
545 double precision,
intent(in) :: x(ixI^S,1:ndim)
546 character(len=*),
intent(in) :: subname
552 integer,
intent(in) :: ixI^L, ixO^L, idim
553 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
554 double precision,
intent(in) :: cmax(ixI^S)
555 double precision,
intent(in),
optional :: cmin(ixI^S)
556 type(ct_velocity),
intent(inout):: vcts
561 integer,
intent(in) :: ixI^L, ixO^L
562 double precision,
intent(in) :: qt, qdt
564 double precision,
intent(in) :: wprim(ixI^S,1:nw)
565 type(state) :: sCT, s
566 type(ct_velocity) :: vcts
567 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
568 double precision,
intent(inout) :: fE(ixI^S,7-2*ndim:3)
573 integer,
intent(in) :: ixO^L
579 type(state),
target :: psa(max_blocks)
580 double precision,
intent(in) :: qtC
581 integer :: iigrid, igrid
585 do iigrid=1,igridstail; igrid=igrids(iigrid);
586 psa(igrid)%w = 0.0d0*psa(igrid)%w
595 type(state),
target :: psa(max_blocks)
596 type(state),
target :: psb(max_blocks)
597 double precision,
intent(in) :: qdt
598 double precision,
intent(in) :: qtC
599 double precision,
intent(in) :: dtfactor
600 integer :: iigrid, igrid
604 do iigrid=1,igridstail; igrid=igrids(iigrid);
605 psa(igrid)%w = psb(igrid)%w
subroutine mpistop(message)
Exit MPI-AMRVAC with an error message.
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.
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_ppm_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
subroutine dummy_angmomfix(fC, x, wnew, ixIL, ixOL, idim)
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
subroutine dummy_add_source_geom(qdt, ixIL, ixOL, wCT, w, x)
procedure(sub_check_params), pointer phys_te_images
logical phys_solve_eaux
Solve internal energy and total energy equations.
subroutine dummy_add_source(qdt, ixIL, ixOL, wCT, w, x, qsourcesplit, active, wCTprim)
subroutine dummy_face_to_center(ixOL, s)
procedure(sub_get_dt), pointer phys_get_dt
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_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.
integer, parameter flux_special
Indicates the flux should be specially treated.
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)
procedure(sub_energy_synchro), pointer phys_energy_synchro
procedure(sub_implicit_update), pointer phys_implicit_update
procedure(sub_get_trad), pointer phys_get_trad
subroutine dummy_check_params
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 enery instead of total energy.
procedure(sub_angmomfix), pointer phys_angmomfix
procedure(sub_get_cmax), pointer phys_get_cmax
procedure(sub_get_v), pointer phys_get_v
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.