mus_interpolate_header_module Module

Interpolation header to load confiugration and type definition


Uses

Used by

  • module~~mus_interpolate_header_module~~UsedByGraph module~mus_interpolate_header_module mus_interpolate_header_module module~mus_auxfield_module mus_auxField_module module~mus_auxfield_module->module~mus_interpolate_header_module module~mus_scheme_module mus_scheme_module module~mus_scheme_module->module~mus_interpolate_header_module module~mus_scheme_type_module mus_scheme_type_module module~mus_scheme_module->module~mus_scheme_type_module module~mus_scheme_type_module->module~mus_interpolate_header_module module~mus_scheme_type_module->module~mus_auxfield_module module~mus_aux_module mus_aux_module module~mus_aux_module->module~mus_scheme_type_module module~mus_restart_module mus_restart_module module~mus_aux_module->module~mus_restart_module module~mus_tools_module mus_tools_module module~mus_aux_module->module~mus_tools_module module~mus_tracking_module mus_tracking_module module~mus_aux_module->module~mus_tracking_module module~mus_config_module mus_config_module module~mus_config_module->module~mus_scheme_module module~mus_config_module->module~mus_scheme_type_module module~mus_config_module->module~mus_tools_module module~mus_control_module mus_control_module module~mus_control_module->module~mus_auxfield_module module~mus_control_module->module~mus_scheme_type_module module~mus_control_module->module~mus_aux_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_auxfield_module module~mus_dynloadbal_module->module~mus_scheme_module module~mus_dynloadbal_module->module~mus_scheme_type_module module~mus_dynloadbal_module->module~mus_tools_module module~mus_dynloadbal_module->module~mus_tracking_module module~mus_hvs_aux_module mus_hvs_aux_module module~mus_hvs_aux_module->module~mus_scheme_type_module module~mus_hvs_aux_module->module~mus_tools_module module~mus_hvs_aux_module->module~mus_tracking_module module~mus_hvs_config_module mus_hvs_config_module module~mus_hvs_config_module->module~mus_scheme_module module~mus_hvs_config_module->module~mus_scheme_type_module module~mus_hvs_config_module->module~mus_config_module module~mus_hvs_construction_module mus_hvs_construction_module module~mus_hvs_construction_module->module~mus_scheme_type_module module~mus_initfluid_module mus_initFluid_module module~mus_initfluid_module->module~mus_scheme_type_module module~mus_initfluidincomp_module mus_initFluidIncomp_module module~mus_initfluidincomp_module->module~mus_scheme_type_module module~mus_initisothermaceq_module mus_initIsothermAcEq_module module~mus_initisothermaceq_module->module~mus_scheme_type_module module~mus_initlbmps_module mus_initLBMPS_module module~mus_initlbmps_module->module~mus_scheme_type_module module~mus_initmultispecies_module mus_initMultispecies_module module~mus_initmultispecies_module->module~mus_scheme_type_module module~mus_initnernstplanck_module mus_initNernstPlanck_module module~mus_initnernstplanck_module->module~mus_scheme_type_module module~mus_initpoisson_module mus_initPoisson_module module~mus_initpoisson_module->module~mus_scheme_type_module module~mus_mesh_adaptation_module mus_mesh_adaptation_module module~mus_mesh_adaptation_module->module~mus_scheme_type_module module~mus_restart_module->module~mus_scheme_type_module module~mus_tools_module->module~mus_scheme_module module~mus_tools_module->module~mus_scheme_type_module module~mus_tracking_module->module~mus_scheme_type_module module~mus_tracking_module->module~mus_tools_module program~mus_harvesting mus_harvesting program~mus_harvesting->module~mus_scheme_module program~mus_harvesting->module~mus_scheme_type_module program~mus_harvesting->module~mus_hvs_aux_module program~mus_harvesting->module~mus_hvs_config_module program~mus_harvesting->module~mus_hvs_construction_module program~mus_harvesting->module~mus_restart_module program~musubi musubi program~musubi->module~mus_scheme_type_module program~musubi->module~mus_aux_module program~musubi->module~mus_config_module program~musubi->module~mus_control_module

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: no_intp = -1

Interpolation parameter to choose fillFinerFromMe

integer, public, parameter :: weighted_average = 0
integer, public, parameter :: linear = 1
integer, public, parameter :: quadratic = 2
integer, private, parameter :: q00 = 9

Abstract Interfaces

abstract interface

  • private subroutine intpRoutine(method, fieldProp, tLevelDesc, level, sState, sNeigh, snSize, sAuxField, tState, tNeigh, tnSize, layout, nTargets, targetList, physics, time, varSys, derVarPos)

    This is the interface for all interpolation methods that

    Arguments

    Type IntentOptional Attributes Name
    class(mus_interpolation_method_type), intent(inout) :: method
    type(mus_field_prop_type), intent(in), target :: fieldProp(:)

    Array of field properties (fluid or species)

    type(tem_levelDesc_type), intent(in) :: tLevelDesc

    level descriptor on target level

    integer, intent(in) :: level

    my refinement level

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

    State vector of SOURCE elements

    integer, intent(in) :: sNeigh(:)
    integer, intent(in) :: snSize
    real(kind=rk), intent(inout) :: sAuxField(:)

    AuxField variable to read rho and vel from source elements

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

    State vector of TARGET GHOST elements

    integer, intent(in) :: tNeigh(:)
    integer, intent(in) :: tnSize
    type(mus_scheme_layout_type), intent(in) :: layout

    the layout used

    integer, intent(in) :: nTargets

    List of target elements ( their position in depSource list )

    integer, intent(in) :: targetList(nTargets)
    type(mus_physics_type), intent(in) :: physics

    physics type to convert lattice to physics SI unit and vice versa

    type(tem_time_type), intent(in) :: time

    time required to compute analytical solution for TGV case

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

    scheme variable system

    type(mus_derVarPos_type), intent(in) :: derVarPos(:)

    position of all derive variable in varSys

abstract interface

  • private subroutine intpRoutine_arbitraryVal(method, tLevelDesc, level, stencil, sVal, tVal, nTargets, targetList, nScalars)

    This is the interface for all interpolation methods that

    Arguments

    Type IntentOptional Attributes Name
    class(mus_interpolation_method_type), intent(inout) :: method
    type(tem_levelDesc_type), intent(in) :: tLevelDesc

    level descriptor on target level

    integer, intent(in) :: level

    my refinement level

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

    stencil header

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

    array of SOURCE elements

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

    array of TARGET GHOST elements

    integer, intent(in) :: nTargets

    List of target elements ( their position in depSource list )

    integer, intent(in) :: targetList(nTargets)

    position in total list - offset

    integer, intent(in) :: nScalars

    Number of scalars to interpolate


Derived Types

type, public ::  mus_interpolation_method_type

This data types contains intpRoutine function pointer for FillFiner and FillCoarser. For fillFiner, it build least square fit matrix for linear quadratic interpolations For fillCoarser: currently we do simple average

Read more…

Components

Type Visibility Attributes Name Initial
procedure(intpRoutine), public, pointer :: do_intp => null()

Routine to interpolate coarse to fine for ghostFromCoarser elements and interpolate fine to coarse for ghostFromFiner elements. Sets pdf for ghost elements by f_eq + f_neq The moments required to compute equilibrium function are obtained from auxField array and the auxField of ghost elements are interpolate seperately using do_intpArbitraryField

procedure(intpRoutine_arbitraryVal), public, pointer :: do_intpArbiVal => null()

Routine to interpolate coarse to fine and fine to coarse for arbitrary variables

type(tem_intpMatrixLSF_type), public :: intpMat_forLSF

Matrix entries for linear/Quadratic interpolation least square fit ((A^T)A)^-1*(A^T) Size: (6,9) for D2Q9 stencil Size: (10,QQ) for D3Q19 and D3Q27

integer, public :: nMinSources

how many source elements are required by this interpolation order

integer, public :: nMaxSources

Max number of sources amoung target ghosts Computed in mus_contruction::mus_intp_complete_coarseDep

type, public ::  mus_interpolation_stencil_type

Contains stencil for interpolation

Components

Type Visibility Attributes Name Initial
logical, public :: isActive = .false.

Is active only for specific layouts like d2q9, d3q19, d3q27

integer, public, allocatable :: neighDir(:,:)

cxDir for interpolation stencil for depFromCoarser

type, public ::  mus_interpolation_config_type

Contains information loaded from config file

Components

Type Visibility Attributes Name Initial
character(len=labelLen), public :: method

name of the order of the interpolation method for fillFinerFromMe

integer, public :: order

Order of the interpolation for fillFinerFromMe

character(len=labelLen), public :: weights_method = 'linear_distance'

name of used weighting method

integer, public :: IDW_powerfac = 6

Power factor for inverse distance weighting

logical, public :: useComputeStencil = .false.

Stencil for linear interpolation. By default use stencil from weighted average

logical, public :: testInterpolation = .false.

Interpolation test by comparing against the initial condition

logical, public :: testEachElement = .false.
logical, public :: testFluids = .false.
logical, public :: noIntpFromFiner = .false.
logical, public :: noIntpFromCoarser = .false.

type, public ::  mus_interpolation_type

definition of the used interpolation method

Components

Type Visibility Attributes Name Initial
type(mus_interpolation_config_type), public :: config

Information loaded from config file

type(mus_interpolation_method_type), public, allocatable :: fillFinerFromME(:)

Interpolation routines to fillFiner Size: interpolation order

type(mus_interpolation_method_type), public :: fillMineFromFiner

Interpolation routines to fillCoarser

type(mus_interpolation_stencil_type), public :: weightedAvgStencil

stencil for weighted average interpolation


Functions

private function init_cxDirWeightedAvg(QQ, nSources) result(me)

Initialize stencil for weighted average interpolation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: QQ
integer, intent(in) :: nSources

Return Value integer, (nSources,8)


Subroutines

public subroutine mus_load_interpolate(me, conf, parent)

Read in the type of interpolation scheme

Read more…

Arguments

Type IntentOptional Attributes Name
type(mus_interpolation_config_type), intent(out) :: me

interpolation type to load info to

type(flu_State) :: conf

lua state to load from

integer, intent(in), optional :: parent

optional parent table to load from

public subroutine mus_set_nSources(me, nDims, QQ, layout)

Arguments

Type IntentOptional Attributes Name
type(mus_interpolation_type), intent(inout) :: me
integer, intent(in) :: nDims
integer, intent(in) :: QQ
character(len=*), intent(in) :: layout

public subroutine mus_interpolate_out(me, conf)

Dump interpolation method to lua

Arguments

Type IntentOptional Attributes Name
type(mus_interpolation_type), intent(in) :: me

interpolation type to dump info to

type(aot_out_type), intent(inout), optional :: conf

aotus type handling the output to the file in lua format

private subroutine interpolate_dump(me, outUnit)

Dump interpolation method to logUnit

Arguments

Type IntentOptional Attributes Name
type(mus_interpolation_config_type), intent(in) :: me

interpolation type to dump info to

integer, intent(in) :: outUnit

File unit to write to