mod_physics_hd Module

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.


Uses

  • module~~mod_physics_hd~~UsesGraph module~mod_physics_hd mod_physics_hd mod_physics_vars mod_physics_vars module~mod_physics_hd->mod_physics_vars module~mod_comm_lib mod_comm_lib module~mod_physics_hd->module~mod_comm_lib module~mod_variables mod_variables module~mod_physics_hd->module~mod_variables module~mod_basic_types mod_basic_types module~mod_variables->module~mod_basic_types

Variables

Type Visibility Attributes Name Initial
procedure(sub_boundary_adjust), public, pointer :: phys_boundary_adjust => null()
procedure(sub_check_params), public, pointer :: phys_check_params => null()
procedure(sub_clean_divb), public, pointer :: phys_clean_divb => null()
procedure(sub_evaluate_implicit), public, pointer :: phys_evaluate_implicit => null()
procedure(sub_face_to_center), public, pointer :: phys_face_to_center => null()
procedure(sub_global_source), public, pointer :: phys_global_source_after => null()
procedure(sub_implicit_update), public, pointer :: phys_implicit_update => null()
procedure(sub_set_equi_vars), public, pointer :: phys_set_equi_vars => null()
procedure(sub_special_advance), public, pointer :: phys_special_advance => null()
procedure(sub_check_params), public, pointer :: phys_te_images => null()
procedure(sub_write_info), public, pointer :: phys_write_info => null()

Interfaces

interface

  • public subroutine sub_boundary_adjust(igrid, psb)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: igrid
    type(state), target :: psb(max_blocks)

interface

  • public subroutine sub_check_params()

    Arguments

    None

interface

  • public subroutine sub_clean_divb(qdt, qt, active)

    clean initial divb

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in) :: qdt

    Current time step

    double precision, intent(in) :: qt

    Current time

    logical, intent(inout) :: active

    Output if the source is active

interface

  • public subroutine sub_evaluate_implicit(qtC, psa)

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in) :: qtC
    type(state), target :: psa(max_blocks)

interface

  • public subroutine sub_face_to_center(ixOmin1, ixOmin2, ixOmin3, ixOmax1, ixOmax2, ixOmax3, s)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: ixOmin1
    integer, intent(in) :: ixOmin2
    integer, intent(in) :: ixOmin3
    integer, intent(in) :: ixOmax1
    integer, intent(in) :: ixOmax2
    integer, intent(in) :: ixOmax3
    type(state) :: s

interface

  • public subroutine sub_global_source(qdt, qt, active)

    Add global source terms on complete domain (potentially implicit)

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in) :: qdt

    Current time step

    double precision, intent(in) :: qt

    Current time

    logical, intent(inout) :: active

    Output if the source is active

interface

  • public subroutine sub_implicit_update(dtfactor, qdt, qtC, psa, psb)

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in) :: dtfactor
    double precision, intent(in) :: qdt
    double precision, intent(in) :: qtC
    type(state), target :: psa(max_blocks)
    type(state), target :: psb(max_blocks)

interface

  • public subroutine sub_set_equi_vars(igrid)

    set equilibrium variables other than b0 (e.g. p0 and rho0)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: igrid

interface

  • public subroutine sub_special_advance(qt, psa)

    Add special advance in each advect step

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in) :: qt

    Current time

    type(state), target :: psa(max_blocks)

    Compute based on this state

interface

  • public subroutine sub_write_info(file_handle)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: file_handle

Subroutines

public subroutine dummy_boundary_adjust(igrid, psb)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: igrid
type(state), target :: psb(max_blocks)

public subroutine dummy_check_params()

Arguments

None

public subroutine dummy_evaluate_implicit(qtC, psa)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: qtC
type(state), target :: psa(max_blocks)

public subroutine dummy_face_to_center(ixOmin1, ixOmin2, ixOmin3, ixOmax1, ixOmax2, ixOmax3, s)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ixOmin1
integer, intent(in) :: ixOmin2
integer, intent(in) :: ixOmin3
integer, intent(in) :: ixOmax1
integer, intent(in) :: ixOmax2
integer, intent(in) :: ixOmax3
type(state) :: s

public subroutine dummy_implicit_update(dtfactor, qdt, qtC, psa, psb)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: dtfactor
double precision, intent(in) :: qdt
double precision, intent(in) :: qtC
type(state), target :: psa(max_blocks)
type(state), target :: psb(max_blocks)

public subroutine dummy_write_info(fh)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: fh

File handle

public subroutine phys_activate()

Arguments

None

public subroutine phys_check()

Arguments

None

public subroutine phys_init()

Initialize the module

Arguments

None

public subroutine phys_to_conserved(ixImin1, ixImin2, ixImin3, ixImax1, ixImax2, ixImax3, ixOmin1, ixOmin2, ixOmin3, ixOmax1, ixOmax2, ixOmax3, w, x)

Transform primitive variables into conservative ones

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ixImin1
integer, intent(in) :: ixImin2
integer, intent(in) :: ixImin3
integer, intent(in) :: ixImax1
integer, intent(in) :: ixImax2
integer, intent(in) :: ixImax3
integer, intent(in) :: ixOmin1
integer, intent(in) :: ixOmin2
integer, intent(in) :: ixOmin3
integer, intent(in) :: ixOmax1
integer, intent(in) :: ixOmax2
integer, intent(in) :: ixOmax3
double precision, intent(inout) :: w(ixImin1:ixImax1,ixImin2:ixImax2,ixImin3:ixImax3,nw_phys)
double precision, intent(in) :: x(ixImin1:ixImax1,ixImin2:ixImax2,ixImin3:ixImax3,1:ndim)

public subroutine phys_to_primitive(ixImin1, ixImin2, ixImin3, ixImax1, ixImax2, ixImax3, ixOmin1, ixOmin2, ixOmin3, ixOmax1, ixOmax2, ixOmax3, w, x)

Transform conservative variables into primitive ones

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ixImin1
integer, intent(in) :: ixImin2
integer, intent(in) :: ixImin3
integer, intent(in) :: ixImax1
integer, intent(in) :: ixImax2
integer, intent(in) :: ixImax3
integer, intent(in) :: ixOmin1
integer, intent(in) :: ixOmin2
integer, intent(in) :: ixOmin3
integer, intent(in) :: ixOmax1
integer, intent(in) :: ixOmax2
integer, intent(in) :: ixOmax3
double precision, intent(inout) :: w(ixImin1:ixImax1,ixImin2:ixImax2,ixImin3:ixImax3,nw_phys)
double precision, intent(in) :: x(ixImin1:ixImax1,ixImin2:ixImax2,ixImin3:ixImax3,1:ndim)

public subroutine phys_units()

here no SI_UNIT used by default, to be implemented eq_state_units by default, to be implemented

Arguments

None

public subroutine read_params(files)

Read this module's parameters from a file

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: files(:)

public pure subroutine to_conservative(u)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: u(nw_phys)

public pure subroutine to_primitive(u)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: u(nw_phys)