MPI-AMRVAC
3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
This module defines the procedures of a physics module. It contains function pointers for the various supported routines. An actual physics module has to set these pointers to its implementation of these routines. More...
Data Types | |
interface | sub_check_params |
interface | sub_set_mg_bounds |
interface | sub_boundary_adjust |
interface | sub_convert |
interface | sub_modify_wLR |
interface | sub_get_cmax |
interface | sub_get_a2max |
interface | sub_get_cs2max |
interface | sub_get_tcutoff |
interface | sub_trac_after_setdt |
interface | sub_get_v |
interface | sub_get_rho |
interface | sub_get_H_speed |
interface | sub_get_cbounds |
interface | sub_get_flux |
interface | sub_add_source_geom |
interface | sub_add_source |
interface | sub_global_source |
Add global source terms on complete domain (potentially implicit) More... | |
interface | sub_clean_divb |
clean initial divb More... | |
interface | sub_set_equi_vars |
set equilibrium variables other than b0 (e.g. p0 and rho0) More... | |
interface | sub_special_advance |
Add special advance in each advect step. More... | |
interface | sub_get_dt |
interface | sub_check_w |
interface | sub_get_pthermal |
interface | sub_get_auxiliary |
interface | sub_get_auxiliary_prim |
interface | sub_get_tgas |
interface | sub_get_trad |
interface | sub_write_info |
interface | sub_small_values |
interface | sub_get_var |
interface | sub_get_ct_velocity |
interface | sub_update_faces |
interface | sub_face_to_center |
interface | sub_evaluate_implicit |
interface | sub_implicit_update |
interface | sub_update_temperature |
Functions/Subroutines | |
subroutine | phys_check () |
subroutine | dummy_init_params |
subroutine | dummy_check_params |
subroutine | dummy_modify_wlr (ixIL, ixOL, qt, wLC, wRC, wLp, wRp, s, idir) |
subroutine | dummy_get_h_speed (wprim, x, ixIL, ixOL, idim, Hspeed) |
subroutine | dummy_get_a2max (w, x, ixIL, ixOL, a2max) |
subroutine | dummy_get_cs2max (w, x, ixIL, ixOL, cs2max) |
subroutine | dummy_add_source_geom (qdt, dtfactor, ixIL, ixOL, wCT, w, x) |
subroutine | dummy_add_source (qdt, dtfactor, ixIL, ixOL, wCT, wCTprim, w, x, qsourcesplit, active) |
subroutine | dummy_check_w (primitive, ixIL, ixOL, w, w_flag) |
subroutine | dummy_get_pthermal (w, x, ixIL, ixOL, pth) |
subroutine | dummy_get_auxiliary (ixIL, ixOL, w, x) |
subroutine | dummy_get_auxiliary_prim (ixIL, ixOL, w) |
subroutine | dummy_boundary_adjust (igrid, psb) |
subroutine | dummy_write_info (fh) |
subroutine | dummy_small_values (primitive, w, x, ixIL, ixOL, subname) |
subroutine | dummy_get_ct_velocity (vcts, wLp, wRp, ixIL, ixOL, idim, cmax, cmin) |
subroutine | dummy_update_faces (ixIL, ixOL, qt, qdt, wprim, fC, fE, sCT, s, vcts) |
subroutine | dummy_face_to_center (ixOL, s) |
subroutine | dummy_evaluate_implicit (qtC, psa) |
subroutine | dummy_implicit_update (dtfactor, qdt, qtC, psa, psb) |
Variables | |
double precision | phys_gamma =5.d0/3.d0 |
character(len=name_len) | physics_type = "" |
String describing the physics type of the simulation. More... | |
integer | phys_wider_stencil = 0 |
To use wider stencils in flux calculations. A value of 1 will extend it by one cell in both directions, in any dimension. More... | |
logical | phys_req_diagonal = .true. |
Whether the physics routines require diagonal ghost cells, for example for computing a curl. More... | |
logical | phys_energy =.false. |
Solve energy equation or not. More... | |
logical | phys_total_energy =.false. |
Solve total energy equation or not. More... | |
logical | phys_internal_e =.false. |
Solve internal energy instead of total energy. More... | |
logical | phys_partial_ionization =.false. |
Solve partially ionized one-fluid plasma. More... | |
logical | phys_equi_pe =.false. |
if equilibrium pressure is splitted More... | |
integer, dimension(:, :), allocatable | flux_type |
Array per direction per variable, which can be used to specify that certain fluxes have to be treated differently. More... | |
integer, parameter | flux_default = 0 |
Indicates a normal flux. More... | |
integer, parameter | flux_tvdlf = 1 |
Indicates the flux should be treated with tvdlf. More... | |
integer, parameter | flux_no_dissipation = 2 |
Indicates dissipation should be omitted. More... | |
integer, parameter | flux_special = 3 |
Indicates the flux should be specially treated. More... | |
integer, parameter | flux_hll = 4 |
Indicates the flux should be treated with hll. More... | |
procedure(sub_check_params), pointer | phys_check_params => null() |
procedure(sub_set_mg_bounds), pointer | phys_set_mg_bounds => null() |
procedure(sub_convert), pointer | phys_to_conserved => null() |
procedure(sub_convert), pointer | phys_to_primitive => null() |
procedure(sub_modify_wlr), pointer | phys_modify_wlr => null() |
procedure(sub_get_cmax), pointer | phys_get_cmax => null() |
procedure(sub_get_a2max), pointer | phys_get_a2max => null() |
procedure(sub_get_cs2max), pointer | phys_get_cs2max => null() |
procedure(sub_get_tcutoff), pointer | phys_get_tcutoff => null() |
procedure(sub_trac_after_setdt), pointer | phys_trac_after_setdt => null() |
procedure(sub_get_h_speed), pointer | phys_get_h_speed => null() |
procedure(sub_get_cbounds), pointer | phys_get_cbounds => null() |
procedure(sub_get_flux), pointer | phys_get_flux => null() |
procedure(sub_get_v), pointer | phys_get_v => null() |
procedure(sub_get_rho), pointer | phys_get_rho => null() |
procedure(sub_get_dt), pointer | phys_get_dt => null() |
procedure(sub_add_source_geom), pointer | phys_add_source_geom => null() |
procedure(sub_add_source), pointer | phys_add_source => null() |
procedure(sub_global_source), pointer | phys_global_source_after => null() |
procedure(sub_special_advance), pointer | phys_special_advance => null() |
procedure(sub_check_w), pointer | phys_check_w => null() |
procedure(sub_get_pthermal), pointer | phys_get_pthermal => null() |
procedure(sub_get_tgas), pointer | phys_get_tgas => null() |
procedure(sub_get_trad), pointer | phys_get_trad => null() |
procedure(sub_boundary_adjust), pointer | phys_boundary_adjust => null() |
procedure(sub_write_info), pointer | phys_write_info => null() |
procedure(sub_small_values), pointer | phys_handle_small_values => null() |
procedure(sub_get_ct_velocity), pointer | phys_get_ct_velocity => null() |
procedure(sub_update_faces), pointer | phys_update_faces => null() |
procedure(sub_face_to_center), pointer | phys_face_to_center => null() |
procedure(sub_implicit_update), pointer | phys_implicit_update => null() |
procedure(sub_evaluate_implicit), pointer | phys_evaluate_implicit => null() |
procedure(sub_clean_divb), pointer | phys_clean_divb => null() |
procedure(sub_set_equi_vars), pointer | phys_set_equi_vars => null() |
procedure(sub_check_params), pointer | phys_te_images => null() |
procedure(sub_update_temperature), pointer | phys_update_temperature => null() |
procedure(sub_get_auxiliary), pointer | phys_get_auxiliary => null() |
procedure(sub_get_auxiliary_prim), pointer | phys_get_auxiliary_prim => null() |
This module defines the procedures of a physics module. It contains function pointers for the various supported routines. An actual physics module has to set these pointers to its implementation of these routines.
subroutine mod_physics::dummy_add_source | ( | double precision, intent(in) | qdt, |
double precision, intent(in) | dtfactor, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, dimension(ixi^s, 1:nw), intent(in) | wCT, | ||
double precision, dimension(ixi^s,1:nw), intent(in) | wCTprim, | ||
double precision, dimension(ixi^s, 1:nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:ndim), intent(in) | x, | ||
logical, intent(in) | qsourcesplit, | ||
logical, intent(inout) | active | ||
) |
Definition at line 517 of file mod_physics.t.
subroutine mod_physics::dummy_add_source_geom | ( | double precision, intent(in) | qdt, |
double precision, intent(in) | dtfactor, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, dimension(ixi^s, 1:nw), intent(inout) | wCT, | ||
double precision, dimension(ixi^s, 1:nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:^nd), intent(in) | x | ||
) |
Definition at line 510 of file mod_physics.t.
subroutine mod_physics::dummy_boundary_adjust | ( | integer, intent(in) | igrid, |
type(state), dimension(max_blocks), target | psb | ||
) |
Definition at line 572 of file mod_physics.t.
subroutine mod_physics::dummy_check_params |
Definition at line 472 of file mod_physics.t.
subroutine mod_physics::dummy_check_w | ( | logical, intent(in) | primitive, |
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, dimension(ixi^s,1:nw), intent(in) | w, | ||
logical, dimension(ixi^s,1:nw), intent(inout) | w_flag | ||
) |
Definition at line 529 of file mod_physics.t.
subroutine mod_physics::dummy_evaluate_implicit | ( | double precision, intent(in) | qtC, |
type(state), dimension(max_blocks), target | psa | ||
) |
Definition at line 627 of file mod_physics.t.
subroutine mod_physics::dummy_face_to_center | ( | integer, intent(in) | ixO, |
integer, intent(in) | L, | ||
type(state) | s | ||
) |
Definition at line 621 of file mod_physics.t.
subroutine mod_physics::dummy_get_a2max | ( | double precision, dimension(ixi^s, nw), intent(in) | w, |
double precision, dimension(ixi^s, 1:^nd), intent(in) | x, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, dimension(ndim), intent(inout) | a2max | ||
) |
subroutine mod_physics::dummy_get_auxiliary | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, dimension(ixi^s, nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:ndim), intent(in) | x | ||
) |
subroutine mod_physics::dummy_get_auxiliary_prim | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, dimension(ixi^s, nw), intent(inout) | w | ||
) |
subroutine mod_physics::dummy_get_cs2max | ( | double precision, dimension(ixi^s, nw), intent(in) | w, |
double precision, dimension(ixi^s, 1:^nd), intent(in) | x, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, intent(inout) | cs2max | ||
) |
subroutine mod_physics::dummy_get_ct_velocity | ( | type(ct_velocity), intent(inout) | vcts, |
double precision, dimension(ixi^s, nw), intent(in) | wLp, | ||
double precision, dimension(ixi^s, nw), intent(in) | wRp, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
integer, intent(in) | idim, | ||
double precision, dimension(ixi^s), intent(in) | cmax, | ||
double precision, dimension(ixi^s), intent(in), optional | cmin | ||
) |
Definition at line 599 of file mod_physics.t.
subroutine mod_physics::dummy_get_h_speed | ( | double precision, dimension(ixi^s, nw), intent(in) | wprim, |
double precision, dimension(ixi^s,1:ndim), intent(in) | x, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
integer, intent(in) | idim, | ||
double precision, dimension(ixi^s,1:number_species), intent(out) | Hspeed | ||
) |
Definition at line 484 of file mod_physics.t.
subroutine mod_physics::dummy_get_pthermal | ( | double precision, dimension(ixi^s, nw), intent(in) | w, |
double precision, dimension(ixi^s, 1:ndim), intent(in) | x, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, dimension(ixi^s), intent(out) | pth | ||
) |
subroutine mod_physics::dummy_implicit_update | ( | double precision, intent(in) | dtfactor, |
double precision, intent(in) | qdt, | ||
double precision, intent(in) | qtC, | ||
type(state), dimension(max_blocks), target | psa, | ||
type(state), dimension(max_blocks), target | psb | ||
) |
Definition at line 643 of file mod_physics.t.
subroutine mod_physics::dummy_init_params |
Definition at line 469 of file mod_physics.t.
subroutine mod_physics::dummy_modify_wlr | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, intent(in) | qt, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wLC, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wRC, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wLp, | ||
double precision, dimension(ixi^s,1:nw), intent(inout) | wRp, | ||
type(state) | s, | ||
integer, intent(in) | idir | ||
) |
Definition at line 475 of file mod_physics.t.
subroutine mod_physics::dummy_small_values | ( | logical, intent(in) | primitive, |
double precision, dimension(ixi^s,1:nw), intent(inout) | w, | ||
double precision, dimension(ixi^s,1:ndim), intent(in) | x, | ||
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
character(len=*), intent(in) | subname | ||
) |
Definition at line 590 of file mod_physics.t.
subroutine mod_physics::dummy_update_faces | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
double precision, intent(in) | qt, | ||
double precision, intent(in) | qdt, | ||
double precision, dimension(ixi^s,1:nw), intent(in) | wprim, | ||
double precision, dimension(ixi^s,1:nwflux,1:ndim), intent(in) | fC, | ||
double precision, dimension(ixi^s,sdim:3), intent(inout) | fE, | ||
type(state) | sCT, | ||
type(state) | s, | ||
type(ct_velocity) | vcts | ||
) |
Definition at line 609 of file mod_physics.t.
subroutine mod_physics::dummy_write_info | ( | integer, intent(in) | fh | ) |
[in] | fh | File handle |
Definition at line 578 of file mod_physics.t.
subroutine mod_physics::phys_check |
integer, parameter mod_physics::flux_default = 0 |
Indicates a normal flux.
Definition at line 46 of file mod_physics.t.
integer, parameter mod_physics::flux_hll = 4 |
Indicates the flux should be treated with hll.
Definition at line 54 of file mod_physics.t.
integer, parameter mod_physics::flux_no_dissipation = 2 |
Indicates dissipation should be omitted.
Definition at line 50 of file mod_physics.t.
integer, parameter mod_physics::flux_special = 3 |
Indicates the flux should be specially treated.
Definition at line 52 of file mod_physics.t.
integer, parameter mod_physics::flux_tvdlf = 1 |
Indicates the flux should be treated with tvdlf.
Definition at line 48 of file mod_physics.t.
integer, dimension(:, :), allocatable mod_physics::flux_type |
Array per direction per variable, which can be used to specify that certain fluxes have to be treated differently.
Definition at line 43 of file mod_physics.t.
procedure(sub_add_source), pointer mod_physics::phys_add_source => null() |
Definition at line 73 of file mod_physics.t.
procedure(sub_add_source_geom), pointer mod_physics::phys_add_source_geom => null() |
Definition at line 72 of file mod_physics.t.
procedure(sub_boundary_adjust), pointer mod_physics::phys_boundary_adjust => null() |
Definition at line 80 of file mod_physics.t.
procedure(sub_check_params), pointer mod_physics::phys_check_params => null() |
Definition at line 56 of file mod_physics.t.
procedure(sub_check_w), pointer mod_physics::phys_check_w => null() |
Definition at line 76 of file mod_physics.t.
procedure(sub_clean_divb), pointer mod_physics::phys_clean_divb => null() |
Definition at line 88 of file mod_physics.t.
logical mod_physics::phys_energy =.false. |
Solve energy equation or not.
Definition at line 27 of file mod_physics.t.
logical mod_physics::phys_equi_pe =.false. |
if equilibrium pressure is splitted
Definition at line 39 of file mod_physics.t.
procedure(sub_evaluate_implicit), pointer mod_physics::phys_evaluate_implicit => null() |
Definition at line 87 of file mod_physics.t.
procedure(sub_face_to_center), pointer mod_physics::phys_face_to_center => null() |
Definition at line 85 of file mod_physics.t.
double precision mod_physics::phys_gamma =5.d0/3.d0 |
Definition at line 13 of file mod_physics.t.
procedure(sub_get_a2max), pointer mod_physics::phys_get_a2max => null() |
Definition at line 62 of file mod_physics.t.
procedure(sub_get_auxiliary), pointer mod_physics::phys_get_auxiliary => null() |
Definition at line 95 of file mod_physics.t.
procedure(sub_get_auxiliary_prim), pointer mod_physics::phys_get_auxiliary_prim => null() |
Definition at line 96 of file mod_physics.t.
procedure(sub_get_cbounds), pointer mod_physics::phys_get_cbounds => null() |
Definition at line 67 of file mod_physics.t.
procedure(sub_get_cmax), pointer mod_physics::phys_get_cmax => null() |
Definition at line 61 of file mod_physics.t.
procedure(sub_get_cs2max), pointer mod_physics::phys_get_cs2max => null() |
Definition at line 63 of file mod_physics.t.
procedure(sub_get_ct_velocity), pointer mod_physics::phys_get_ct_velocity => null() |
Definition at line 83 of file mod_physics.t.
procedure(sub_get_dt), pointer mod_physics::phys_get_dt => null() |
Definition at line 71 of file mod_physics.t.
procedure(sub_get_flux), pointer mod_physics::phys_get_flux => null() |
Definition at line 68 of file mod_physics.t.
procedure(sub_get_h_speed), pointer mod_physics::phys_get_h_speed => null() |
Definition at line 66 of file mod_physics.t.
procedure(sub_get_pthermal), pointer mod_physics::phys_get_pthermal => null() |
Definition at line 77 of file mod_physics.t.
procedure(sub_get_rho), pointer mod_physics::phys_get_rho => null() |
Definition at line 70 of file mod_physics.t.
procedure(sub_get_tcutoff), pointer mod_physics::phys_get_tcutoff => null() |
Definition at line 64 of file mod_physics.t.
procedure(sub_get_tgas), pointer mod_physics::phys_get_tgas => null() |
Definition at line 78 of file mod_physics.t.
procedure(sub_get_trad), pointer mod_physics::phys_get_trad => null() |
Definition at line 79 of file mod_physics.t.
procedure(sub_get_v), pointer mod_physics::phys_get_v => null() |
Definition at line 69 of file mod_physics.t.
procedure(sub_global_source), pointer mod_physics::phys_global_source_after => null() |
Definition at line 74 of file mod_physics.t.
procedure(sub_small_values), pointer mod_physics::phys_handle_small_values => null() |
Definition at line 82 of file mod_physics.t.
procedure(sub_implicit_update), pointer mod_physics::phys_implicit_update => null() |
Definition at line 86 of file mod_physics.t.
logical mod_physics::phys_internal_e =.false. |
Solve internal energy instead of total energy.
Definition at line 33 of file mod_physics.t.
procedure(sub_modify_wlr), pointer mod_physics::phys_modify_wlr => null() |
Definition at line 60 of file mod_physics.t.
logical mod_physics::phys_partial_ionization =.false. |
Solve partially ionized one-fluid plasma.
Definition at line 36 of file mod_physics.t.
logical mod_physics::phys_req_diagonal = .true. |
Whether the physics routines require diagonal ghost cells, for example for computing a curl.
Definition at line 24 of file mod_physics.t.
procedure(sub_set_equi_vars), pointer mod_physics::phys_set_equi_vars => null() |
Definition at line 90 of file mod_physics.t.
procedure(sub_set_mg_bounds), pointer mod_physics::phys_set_mg_bounds => null() |
Definition at line 57 of file mod_physics.t.
procedure(sub_special_advance), pointer mod_physics::phys_special_advance => null() |
Definition at line 75 of file mod_physics.t.
procedure(sub_check_params), pointer mod_physics::phys_te_images => null() |
Definition at line 92 of file mod_physics.t.
procedure(sub_convert), pointer mod_physics::phys_to_conserved => null() |
Definition at line 58 of file mod_physics.t.
procedure(sub_convert), pointer mod_physics::phys_to_primitive => null() |
Definition at line 59 of file mod_physics.t.
logical mod_physics::phys_total_energy =.false. |
Solve total energy equation or not.
Definition at line 30 of file mod_physics.t.
procedure(sub_trac_after_setdt), pointer mod_physics::phys_trac_after_setdt => null() |
Definition at line 65 of file mod_physics.t.
procedure(sub_update_faces), pointer mod_physics::phys_update_faces => null() |
Definition at line 84 of file mod_physics.t.
procedure(sub_update_temperature), pointer mod_physics::phys_update_temperature => null() |
Definition at line 94 of file mod_physics.t.
integer mod_physics::phys_wider_stencil = 0 |
To use wider stencils in flux calculations. A value of 1 will extend it by one cell in both directions, in any dimension.
Definition at line 20 of file mod_physics.t.
procedure(sub_write_info), pointer mod_physics::phys_write_info => null() |
Definition at line 81 of file mod_physics.t.
character(len=name_len) mod_physics::physics_type = "" |
String describing the physics type of the simulation.
Definition at line 16 of file mod_physics.t.