deriveAuxMSGas_fromState Subroutine

public subroutine deriveAuxMSGas_fromState(derVarPos, state, iField, nElems, nSize, iLevel, stencil, varSys, auxField)

This routine computes auxField 'density and velocity' of given field from state array. velocity of original PDF is computed in this routine by solving LSE

This subroutine's interface must match the abstract interface definition derive_auxFromState in derived/mus_derVarPos_module.f90 in order to be callable via auxFieldFromState function pointer.

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

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 Size: nElems*nAuxScalars


Calls

proc~~deriveauxmsgas_fromstate~~CallsGraph proc~deriveauxmsgas_fromstate deriveAuxMSGas_fromState proc~invert_matrix invert_matrix proc~deriveauxmsgas_fromstate->proc~invert_matrix

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iElem
integer, private :: iDir
integer, private :: varPos
integer, private :: nFields
integer, private :: dens_pos
integer, private :: mom_pos(3)
integer, private :: elemOff
real(kind=rk), private :: massFraction(varSys%nStateVars)
real(kind=rk), private :: mass_dens(varSys%nStateVars)
real(kind=rk), private :: inv_rho
real(kind=rk), private :: press(varSys%nStateVars)
real(kind=rk), private :: lambda(varSys%nStateVars)
real(kind=rk), private :: pressMix
real(kind=rk), private :: densMix
real(kind=rk), private :: molWeightMix
real(kind=rk), private :: first_moments(3,varSys%nStateVars)
real(kind=rk), private :: momentum(3)
real(kind=rk), private, dimension(varSys%nStateVars):: molWeight
real(kind=rk), private, dimension(varSys%nStateVars):: phi
real(kind=rk), private :: resi_coeff(varSys%nStateVars,varSys%nStateVars)
real(kind=rk), private :: chi(varSys%nStateVars,varSys%nStateVars)
integer, private :: iFld
integer, private :: iFldDia
integer, private :: iFldNonDia
real(kind=rk), private :: matrixA(varSys%nStateVars,varSys%nStateVars)
real(kind=rk), private :: invA(varSys%nStateVars,varSys%nStateVars)
real(kind=rk), private :: pdf(stencil%QQ)
type(mus_scheme_type), private, pointer:: scheme
type(mus_varSys_data_type), private, pointer:: fPtr