108 integer,
intent(in) :: igrid
109 type(state),
target :: psb(max_blocks)
114 integer,
intent(in) :: ixI^L, ixO^L
115 double precision,
intent(inout) :: w(ixI^S, nw)
116 double precision,
intent(in) :: x(ixI^S, 1:^ND)
119 subroutine sub_modify_wlr(ixI^L, ixO^L, qt, wLC, wRC, wLp, wRp, s, idir)
121 integer,
intent(in) :: ixI^L, ixO^L, idir
122 double precision,
intent(in) :: qt
123 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
124 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
126 end subroutine sub_modify_wlr
130 integer,
intent(in) :: ixI^L, ixO^L, idim
131 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
132 double precision,
intent(inout) :: cmax(ixI^S)
137 integer,
intent(in) :: ixI^L, ixO^L
138 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
139 double precision,
intent(inout) :: a2max(ndim)
144 integer,
intent(in) :: ixI^L, ixO^L
145 double precision,
intent(inout) :: w(ixI^S, nw)
146 double precision,
intent(in) :: x(ixI^S, 1:^ND)
147 double precision,
intent(out) :: tco_local, Tmax_local
151 double precision,
intent(in) :: trac_alfa,tco,T_peak,T_bott
157 integer,
intent(in) :: ixI^L, ixO^L
158 double precision,
intent(in) :: w(ixI^S,nw), x(ixI^S,1:^ND)
159 double precision,
intent(out) :: v(ixI^S,1:ndir)
163 subroutine sub_get_h_speed(wprim,x,ixI^L,ixO^L,idim,Hspeed)
165 integer,
intent(in) :: ixI^L, ixO^L, idim
166 double precision,
intent(in) :: wprim(ixI^S, nw)
167 double precision,
intent(in) :: x(ixI^S,1:ndim)
168 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
169 end subroutine sub_get_h_speed
171 subroutine sub_get_cbounds(wLC, wRC, wLp, wRp, x, ixI^L, ixO^L, idim, Hspeed, cmax, cmin)
174 integer,
intent(in) :: ixI^L, ixO^L, idim
175 double precision,
intent(in) :: wLC(ixI^S, nw), wRC(ixI^S, nw)
176 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
177 double precision,
intent(in) :: x(ixI^S, 1:^ND)
178 double precision,
intent(inout) :: cmax(ixI^S,1:number_species)
179 double precision,
intent(inout),
optional :: cmin(ixI^S,1:number_species)
180 double precision,
intent(in) :: Hspeed(ixI^S,1:number_species)
185 integer,
intent(in) :: ixI^L, ixO^L, idim
186 double precision,
intent(in) :: wC(ixI^S, 1:nw)
187 double precision,
intent(in) :: w(ixI^S, 1:nw)
188 double precision,
intent(in) :: x(ixI^S, 1:^ND)
189 double precision,
intent(out) :: f(ixI^S, nwflux)
194 integer,
intent(in) :: ixI^L, ixO^L
195 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
196 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), w(ixI^S, 1:nw)
200 qsourcesplit, active)
202 integer,
intent(in) :: ixI^L, ixO^L
203 double precision,
intent(in) :: qdt, dtfactor
204 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(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
213 double precision,
intent(in) :: qdt
214 double precision,
intent(in) :: qt
215 logical,
intent(inout) :: active
221 double precision,
intent(in) :: qdt
222 double precision,
intent(in) :: qt
223 logical,
intent(inout) :: active
228 integer,
intent(in) :: igrid
235 double precision,
intent(in) :: qt
236 type(state),
target :: psa(max_blocks)
241 integer,
intent(in) :: ixI^L, ixO^L
242 double precision,
intent(in) :: dx^D, x(ixI^S, 1:^ND)
243 double precision,
intent(in) :: w(ixI^S, 1:nw)
244 double precision,
intent(inout) :: dtnew
249 logical,
intent(in) :: primitive
250 integer,
intent(in) :: ixI^L, ixO^L
251 double precision,
intent(in) :: w(ixI^S,1:nw)
252 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
257 integer,
intent(in) :: ixI^L, ixO^L
258 double precision,
intent(in) :: w(ixI^S,nw)
259 double precision,
intent(in) :: x(ixI^S,1:ndim)
260 double precision,
intent(out):: pth(ixI^S)
265 integer,
intent(in) :: ixI^L, ixO^L
266 double precision,
intent(inout) :: w(ixI^S,nw)
267 double precision,
intent(in) :: x(ixI^S,1:ndim)
272 integer,
intent(in) :: ixI^L, ixO^L
273 double precision,
intent(inout) :: w(ixI^S,nw)
278 integer,
intent(in) :: ixI^L, ixO^L
279 double precision,
intent(in) :: w(ixI^S,nw)
280 double precision,
intent(in) :: x(ixI^S,1:ndim)
281 double precision,
intent(out):: tgas(ixI^S)
286 integer,
intent(in) :: ixI^L, ixO^L
287 double precision,
intent(in) :: w(ixI^S,nw)
288 double precision,
intent(in) :: x(ixI^S,1:ndim)
289 double precision,
intent(out):: trad(ixI^S)
293 integer,
intent(in) :: file_handle
298 logical,
intent(in) :: primitive
299 integer,
intent(in) :: ixI^L,ixO^L
300 double precision,
intent(inout) :: w(ixI^S,1:nw)
301 double precision,
intent(in) :: x(ixI^S,1:ndim)
302 character(len=*),
intent(in) :: subname
307 integer,
intent(in) :: ixI^L, ixO^L
308 double precision,
intent(in) :: w(ixI^S, nw)
309 double precision,
intent(out) :: out(ixO^S)
315 integer,
intent(in) :: ixI^L, ixO^L, idim
316 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
317 double precision,
intent(in) :: cmax(ixI^S)
318 double precision,
intent(in),
optional :: cmin(ixI^S)
319 type(ct_velocity),
intent(inout):: vcts
324 integer,
intent(in) :: ixI^L, ixO^L
325 double precision,
intent(in) :: qt, qdt
327 double precision,
intent(in) :: wprim(ixI^S,1:nw)
329 type(state) :: sCT, s
330 type(ct_velocity) :: vcts
331 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
332 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
337 integer,
intent(in) :: ixO^L
343 type(state),
target :: psa(max_blocks)
344 double precision,
intent(in) :: qtC
349 type(state),
target :: psa(max_blocks)
350 type(state),
target :: psb(max_blocks)
351 double precision,
intent(in) :: qdt
352 double precision,
intent(in) :: qtC
353 double precision,
intent(in) :: dtfactor
358 integer,
intent(in) :: ixI^L, ixO^L
359 double precision,
intent(in) :: wCT(ixI^S,nw),x(ixI^S,1:ndim)
360 double precision,
intent(inout) :: w(ixI^S,nw)
384 call mpistop(
"Error: phys_to_conserved not defined")
387 call mpistop(
"Error: phys_to_primitive not defined")
393 call mpistop(
"Error: no phys_get_cmax not defined")
402 call mpistop(
"Error: no phys_get_cbounds not defined")
405 call mpistop(
"Error: no phys_get_flux not defined")
408 call mpistop(
"Error: no phys_get_dt not defined")
460 integer,
intent(in) :: ixI^L, ixO^L, idir
461 double precision,
intent(in) :: qt
462 double precision,
intent(inout) :: wLC(ixI^S,1:nw), wRC(ixI^S,1:nw)
463 double precision,
intent(inout) :: wLp(ixI^S,1:nw), wRp(ixI^S,1:nw)
469 integer,
intent(in) :: ixI^L, ixO^L, idim
470 double precision,
intent(in) :: wprim(ixI^S, nw)
471 double precision,
intent(in) :: x(ixI^S,1:ndim)
472 double precision,
intent(out) :: Hspeed(ixI^S,1:number_species)
478 integer,
intent(in) :: ixI^L, ixO^L
479 double precision,
intent(in) :: w(ixI^S, nw), x(ixI^S, 1:^ND)
480 double precision,
intent(inout) :: a2max(ndim)
481 call mpistop(
"Error: entered dummy_get_a2max")
486 integer,
intent(in) :: ixI^L, ixO^L
487 double precision,
intent(in) :: qdt, dtfactor, x(ixI^S, 1:^ND)
488 double precision,
intent(inout) :: wCT(ixI^S, 1:nw), w(ixI^S, 1:nw)
492 qsourcesplit, active)
494 integer,
intent(in) :: ixI^L, ixO^L
495 double precision,
intent(in) :: qdt,dtfactor
496 double precision,
intent(in) :: wCT(ixI^S, 1:nw), wCTprim(ixI^S,1:nw), x(ixI^S, 1:ndim)
497 double precision,
intent(inout) :: w(ixI^S, 1:nw)
498 logical,
intent(in) :: qsourcesplit
499 logical,
intent(inout) :: active
505 logical,
intent(in) :: primitive
506 integer,
intent(in) :: ixI^L, ixO^L
507 double precision,
intent(in) :: w(ixI^S,1:nw)
508 logical,
intent(inout) :: w_flag(ixI^S,1:nw)
517 integer,
intent(in) :: ixI^L, ixO^L
518 double precision,
intent(in) :: w(ixI^S, nw)
519 double precision,
intent(in) :: x(ixI^S, 1:ndim)
520 double precision,
intent(out):: pth(ixI^S)
522 call mpistop(
"No get_pthermal method specified")
529 integer,
intent(in) :: ixI^L, ixO^L
530 double precision,
intent(inout) :: w(ixI^S, nw)
531 double precision,
intent(in) :: x(ixI^S, 1:ndim)
540 integer,
intent(in) :: ixI^L, ixO^L
541 double precision,
intent(inout) :: w(ixI^S, nw)
543 call mpistop(
"No get_auxiliary_prim method specified")
548 integer,
intent(in) :: igrid
549 type(state),
target :: psb(max_blocks)
554 integer,
intent(in) :: fh
555 integer,
dimension(MPI_STATUS_SIZE) :: st
559 integer,
parameter :: n_par = 0
561 call mpi_file_write(fh, n_par, 1, mpi_integer, st, er)
566 logical,
intent(in) :: primitive
567 integer,
intent(in) :: ixI^L,ixO^L
568 double precision,
intent(inout) :: w(ixI^S,1:nw)
569 double precision,
intent(in) :: x(ixI^S,1:ndim)
570 character(len=*),
intent(in) :: subname
576 integer,
intent(in) :: ixI^L, ixO^L, idim
577 double precision,
intent(in) :: wLp(ixI^S, nw), wRp(ixI^S, nw)
578 double precision,
intent(in) :: cmax(ixI^S)
579 double precision,
intent(in),
optional :: cmin(ixI^S)
580 type(ct_velocity),
intent(inout):: vcts
585 integer,
intent(in) :: ixI^L, ixO^L
586 double precision,
intent(in) :: qt, qdt
588 double precision,
intent(in) :: wprim(ixI^S,1:nw)
589 type(state) :: sCT, s
590 type(ct_velocity) :: vcts
591 double precision,
intent(in) :: fC(ixI^S,1:nwflux,1:ndim)
592 double precision,
intent(inout) :: fE(ixI^S,sdim:3)
597 integer,
intent(in) :: ixO^L
603 type(state),
target :: psa(max_blocks)
604 double precision,
intent(in) :: qtC
605 integer :: iigrid, igrid
609 do iigrid=1,igridstail; igrid=igrids(iigrid);
610 psa(igrid)%w = 0.0d0*psa(igrid)%w
619 type(state),
target :: psa(max_blocks)
620 type(state),
target :: psb(max_blocks)
621 double precision,
intent(in) :: qdt
622 double precision,
intent(in) :: qtC
623 double precision,
intent(in) :: dtfactor
624 integer :: iigrid, igrid
628 do iigrid=1,igridstail; igrid=igrids(iigrid);
629 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_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.
procedure(sub_get_cmax), pointer phys_get_cmax
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.