mus_derVarPos_module Module

This module contains the type defintion which stores position of all derive variables in global varSys.

function to compute equilFromAux for single element


Uses

  • module~~mus_dervarpos_module~~UsesGraph module~mus_dervarpos_module mus_derVarPos_module module~tem_stencil_module tem_stencil_module module~mus_dervarpos_module->module~tem_stencil_module module~mus_scheme_layout_module mus_scheme_layout_module module~mus_dervarpos_module->module~mus_scheme_layout_module module~tem_varsys_module tem_varSys_module module~mus_dervarpos_module->module~tem_varsys_module module~env_module env_module module~mus_dervarpos_module->module~env_module module~tem_aux_module tem_aux_module module~mus_dervarpos_module->module~tem_aux_module module~mus_scheme_layout_module->module~tem_stencil_module module~mus_scheme_layout_module->module~env_module module~mus_scheme_layout_module->module~tem_aux_module module~tem_comm_env_module tem_comm_env_module module~mus_scheme_layout_module->module~tem_comm_env_module module~aot_table_module aot_table_module module~mus_scheme_layout_module->module~aot_table_module mpi mpi module~mus_scheme_layout_module->mpi module~aotus_module aotus_module module~mus_scheme_layout_module->module~aotus_module module~mus_moments_type_module mus_moments_type_module module~mus_scheme_layout_module->module~mus_moments_type_module module~tem_grow_array_module tem_grow_array_module module~mus_scheme_layout_module->module~tem_grow_array_module module~tem_tools_module tem_tools_module module~mus_scheme_layout_module->module~tem_tools_module module~tem_logging_module tem_logging_module module~mus_scheme_layout_module->module~tem_logging_module module~tem_dyn_array_module tem_dyn_array_module module~mus_scheme_layout_module->module~tem_dyn_array_module module~aot_out_module aot_out_module module~mus_scheme_layout_module->module~aot_out_module module~tem_param_module tem_param_module module~mus_scheme_layout_module->module~tem_param_module module~mus_moments_type_module->module~env_module module~tem_matrix_module tem_matrix_module module~mus_moments_type_module->module~tem_matrix_module

Used by


Contents


Abstract Interfaces

abstract interface

  • private pure function derive_equilFromAuxFunc(derVarPos, auxField, iField, varSys, layout) result(res)

    Derive equilibrium from auxField for single element

    Arguments

    TypeIntentOptionalAttributesName
    class(mus_derVarPos_type), intent(in) :: derVarPos

    Position of current field derive variable in variable system

    real(kind=rk), intent(in) :: auxField(:)

    Array of auxField of single element. Single species: dens_1, vel_1 multispecies: dens_1_sp1, vel_1_spc1, dens_1_sp2, vel_1_spc2, Access: (iElem-1)*nFields + iField

    integer, intent(in) :: iField

    Current field

    type(tem_varSys_type), intent(in) :: varSys

    variable system which is required to access fieldProp information via variable method data c_ptr

    type(mus_scheme_layout_type), intent(in) :: layout

    scheme layout contains stencil definition and lattice weights

    Return Value real(kind=rk)(layout%fStencil%QQ)

    Output of this routine Dimension: QQ of res

abstract interface

  • private pure function derive_auxFromStateFunc(derVarPos, state, iField, stencil, varSys) result(res)

    Derive auxField from state for single element

    Arguments

    TypeIntentOptionalAttributesName
    class(mus_derVarPos_type), intent(in) :: derVarPos

    Position of derive variable in variable system

    real(kind=rk), intent(in) :: state(:)

    Array of state layout%stencil(1)%QQ * nFields

    integer, intent(in) :: iField

    Current field

    type(tem_stencilHeader_type), intent(in) :: stencil

    stencil header contains discrete velocity vectors

    type(tem_varSys_type), intent(in) :: varSys

    variable system which is required to access fieldProp information via variable method data c_ptr

    Return Value real(kind=rk)(varSys%nAuxScalars)

    Output of this routine Size: nAuxScalars

abstract interface

  • private subroutine derive_FromMacro(density, velocity, iField, nElems, varSys, layout, res)

    interface to derive equilibrium from macro. Mainly used in initial condition and boundary condition routines to avoid dublication of routines between different scheme kinds. In this interface, solver definition can be access via varSys%method%val(1)%method_data c_ptr

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: density(:)

    Array of density. Single species: dens_1, dens_2 .. dens_n multispecies: dens_1_sp1, dens_1_sp2, dens_2_sp1, dens_2_sp2 ... dens_n_sp1, dens_n_sp2 Access: (iElem-1)*nFields + iField

    real(kind=rk), intent(in) :: velocity(:,:)

    Array of velocity. Size: (3, nnFields) Access: ( iComp, (iElem-1)nFields + iField )

    integer, intent(in) :: iField

    Current field

    integer, intent(in) :: nElems

    number of elements

    type(tem_varSys_type), intent(in) :: varSys

    variable system which is required to access fieldProp information via variable method data c_ptr

    type(mus_scheme_layout_type), intent(in) :: layout

    scheme layout contains stencil definition and lattice weights

    real(kind=rk), intent(out) :: res(:)

    Output of this routine Dimension: n*nComponents of res

abstract interface

  • private subroutine derive_FromState(state, iField, nElems, varSys, layout, res)

    Interface that takes state array as input calculate density, velocity or eq as output State should be AOS layout

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: state(:)

    Array of state n * layout%stencil(1)%QQ * nFields

    integer, intent(in) :: iField

    Current field

    integer, intent(in) :: nElems

    number of elements

    type(tem_varSys_type), intent(in) :: varSys

    variable system which is required to access fieldProp information via variable method data c_ptr

    type(mus_scheme_layout_type), intent(in) :: layout

    scheme layout contains stencil definition and lattice weights

    real(kind=rk), intent(out) :: res(:)

    Output of this routine Dimension: n * nComponents of res Access: (iElem-1)nComp + iComp To derive velocities of all species, dimension: nnFieldsnComp Access: (iElem-1)nFieldsnComp + (iField-1)nComp + iComp

abstract interface

  • private subroutine derive_FromPreColState(state, neigh, iField, nSize, nElems, varSys, layout, res)

    Interface that takes state array as input calculate density, velocity or eq as output from FETCH state i.e. precollision state State should be AOS layout

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: state(:)

    Array of state n * layout%stencil(1)%QQ * nFields

    integer, intent(in) :: neigh(:)

    connectivity array

    integer, intent(in) :: iField

    Current field

    integer, intent(in) :: nSize

    number of elements in state array

    integer, intent(in) :: nElems

    number of elements

    type(tem_varSys_type), intent(in) :: varSys

    variable system which is required to access fieldProp information via variable method data c_ptr

    type(mus_scheme_layout_type), intent(in) :: layout

    scheme layout contains stencil definition and lattice weights

    real(kind=rk), intent(out) :: res(:)

    Output of this routine Dimension: n * nComponents of res Access: (iElem-1)nComp + iComp To derive velocities of all species, dimension: nnFieldsnComp Access: (iElem-1)nFieldsnComp + (iField-1)nComp + iComp

abstract interface

  • private subroutine derive_equilFromAux(derVarPos, auxField, iField, nElems, varSys, layout, res)

    Derive equilibrium from auxField for given nelems

    Arguments

    TypeIntentOptionalAttributesName
    class(mus_derVarPos_type), intent(in) :: derVarPos

    Position of current field derive variable in variable system

    real(kind=rk), intent(in) :: auxField(:)

    Array of auxField. Single species: dens_1, vel_1, dens_2, vel_2, .. dens_n, vel_n multispecies: dens_1_sp1, vel_1_spc1, dens_1_sp2, vel_1_spc2, dens_2_sp1, vel_2_spc2, dens_2_sp2, vel_2_spc2 ... dens_n_sp1, vel_n_sp1, dens_n_sp2, vel_n_spc2 Access: (iElem-1)*nFields + iField

    integer, intent(in) :: iField

    Current field

    integer, intent(in) :: nElems

    number of elements

    type(tem_varSys_type), intent(in) :: varSys

    variable system which is required to access fieldProp information via variable method data c_ptr

    type(mus_scheme_layout_type), intent(in) :: layout

    scheme layout contains stencil definition and lattice weights

    real(kind=rk), intent(out) :: res(:)

    Output of this routine Dimension: n*QQ of res

abstract interface

  • private subroutine derive_auxFromState(derVarPos, state, iField, nElems, nSize, iLevel, stencil, varSys, auxField)

    Derive auxField from local state. \todo KM: pass external force to add to auxField

    Arguments

    TypeIntentOptionalAttributesName
    class(mus_derVarPos_type), intent(in) :: derVarPos

    Position of current field derive variable in variable system

    real(kind=rk), intent(in) :: state(:)

    Array of state nSize * layout%stencil(1)%QQ * nFields use IDX macro to access this state

    integer, intent(in) :: iField

    Current field

    integer, intent(in) :: nElems

    number of elements to compute

    integer, intent(in) :: nSize

    number of elements in state array

    integer, intent(in) :: iLevel

    current level

    type(tem_stencilHeader_type), intent(in) :: stencil

    stencil header contains discrete velocity vectors

    type(tem_varSys_type), intent(in) :: varSys

    variable system which is required to access fieldProp information via variable method data c_ptr

    real(kind=rk), intent(inout) :: auxField(:)

    Output of this routine auxField is inout to allow storing auxField for each species seperately Size: nElems*nAuxScalars


Derived Types

type, public :: mus_derVarPos_type

This type stores the position of each variable in the global sys

Components

TypeVisibilityAttributesNameInitial
integer, private :: pdf =-1
integer, private :: fetch_pdf =-1
integer, private :: omega =-1
integer, private :: density =-1
integer, private :: moleDensity =-1
integer, private :: pressure =-1
integer, private :: kinePress =-1
integer, private :: velocity =-1
integer, private :: spc_velocities =-1
integer, private :: velMag =-1
integer, private :: momentum =-1
integer, private :: spc_momenta =-1
integer, private :: shearStress =-1
integer, private :: wss =-1
integer, private :: shearMag =-1
integer, private :: strainRate =-1
integer, private :: shearRate =-1
integer, private :: kineticEnergy =-1
integer, private :: temperature =-1
integer, private :: moleFrac =-1
integer, private :: massFrac =-1
integer, private :: moleflux =-1
integer, private :: equilibrium =-1
integer, private :: nonEquilibrium =-1
integer, private :: equilibriumVel =-1
integer, private :: potential =-1
procedure(derive_FromMacro), private, pointer, nopass:: equilFromMacro=> null()
procedure(derive_FromState), private, pointer, nopass:: velFromState=> null()
procedure(derive_FromState), private, pointer, nopass:: equilFromState=> null()
procedure(derive_FromState), private, pointer, nopass:: momFromState=> null()
procedure(derive_FromState), private, pointer, nopass:: velocitiesFromState=> null()
procedure(derive_FromState), private, pointer, nopass:: momentaFromState=> null()
procedure(derive_FromPreColState), private, pointer, nopass:: velFromPreColState=> null()
procedure(derive_auxFromState), private, pointer:: auxFieldFromState=> null()

return auxField from local pdf state

procedure(derive_equilFromAux), private, pointer, nopass:: equilFromAux=> null()

return equilibrium from auxilary variable for given nElems


Subroutines

public subroutine mus_derive_FromMacro_dummy(density, velocity, iField, nElems, varSys, layout, res)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: density(:)

Array of density. Single species: dens_1, dens_2 .. dens_n multispecies: dens_1_sp1, dens_1_sp2, dens_2_sp1, dens_2_sp2 ... dens_n_sp1, dens_n_sp2 Access: (iElem-1)*nFields + iField

real(kind=rk), intent(in) :: velocity(:,:)

Array of velocity. Size: (3, nnFields) Access: ( iComp, (iElem-1)nFields + iField )

integer, intent(in) :: iField

Current field

integer, intent(in) :: nElems

number of elements

type(tem_varSys_type), intent(in) :: varSys

variable system which is required to access fieldProp information via variable method data c_ptr

type(mus_scheme_layout_type), intent(in) :: layout

scheme layout contains stencil definition and lattice weights

real(kind=rk), intent(out) :: res(:)

Output of this routine Dimension: n*nComponents of res

public subroutine mus_derive_FromState_dummy(state, iField, nElems, varSys, layout, res)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: state(:)

Array of state n * layout%stencil(1)%QQ * nFields

integer, intent(in) :: iField

Current field

integer, intent(in) :: nElems

number of elements

type(tem_varSys_type), intent(in) :: varSys

variable system which is required to access fieldProp information via variable method data c_ptr

type(mus_scheme_layout_type), intent(in) :: layout

scheme layout contains stencil definition and lattice weights

real(kind=rk), intent(out) :: res(:)

Output of this routine Dimension: n * nComponents of res Access: (iElem-1)nComp + iComp To derive velocities of all species, dimension: nnFieldsnComp Access: (iElem-1)nFieldsnComp + (iField-1)nComp + iComp

public subroutine mus_derive_FromPreColState_dummy(state, neigh, iField, nSize, nElems, varSys, layout, res)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: state(:)

Array of state n * layout%stencil(1)%QQ * nFields

integer, intent(in) :: neigh(:)

connectivity array

integer, intent(in) :: iField

Current field

integer, intent(in) :: nSize

number of elements in state array

integer, intent(in) :: nElems

number of elements

type(tem_varSys_type), intent(in) :: varSys

variable system which is required to access fieldProp information via variable method data c_ptr

type(mus_scheme_layout_type), intent(in) :: layout

scheme layout contains stencil definition and lattice weights

real(kind=rk), intent(out) :: res(:)

Output of this routine Dimension: n * nComponents of res Access: (iElem-1)nComp + iComp To derive velocities of all species, dimension: nnFieldsnComp Access: (iElem-1)nFieldsnComp + (iField-1)nComp + iComp

public subroutine derive_equilFromAux_dummy(derVarPos, auxField, iField, nElems, varSys, layout, res)

Arguments

TypeIntentOptionalAttributesName
class(mus_derVarPos_type), intent(in) :: derVarPos

Position of derive variable in variable system

real(kind=rk), intent(in) :: auxField(:)

Array of auxField. Single species: dens_1, vel_1, dens_2, vel_2, .. dens_n, vel_n multispecies: dens_1_sp1, vel_1_spc1, dens_1_sp2, vel_1_spc2, dens_2_sp1, vel_2_spc2, dens_2_sp2, vel_2_spc2 ... dens_n_sp1, vel_n_sp1, dens_n_sp2, vel_n_spc2 Access: (iElem-1)*nFields + iField

integer, intent(in) :: iField

Current field

integer, intent(in) :: nElems

number of elements

type(tem_varSys_type), intent(in) :: varSys

variable system which is required to access fieldProp information via variable method data c_ptr

type(mus_scheme_layout_type), intent(in) :: layout

scheme layout contains stencil definition and lattice weights

real(kind=rk), intent(out) :: res(:)

Output of this routine Dimension: n*QQ of res

public subroutine derive_auxFromState_dummy(derVarPos, state, iField, nElems, varSys, res)

Dummy routine for auxFromState

Arguments

TypeIntentOptionalAttributesName
class(mus_derVarPos_type), intent(in) :: derVarPos

Position of derive variable in variable system

real(kind=rk), intent(in) :: state(:)

Array of state n * layout%stencil(1)%QQ * nFields

integer, intent(in) :: iField

Current field

integer, intent(in) :: nElems

number of elements

type(tem_varSys_type), intent(in) :: varSys

variable system which is required to access fieldProp information via variable method data c_ptr

real(kind=rk), intent(out) :: res(:)

Output of this routine Size: nElems*nAuxScalars