mus_bc_general_module Module

This module contains general boundary routines

like initializing boundary, setting boundary at every time step for each field and other general boundary routines


Uses

Used by

  • module~~mus_bc_general_module~~UsedByGraph module~mus_bc_general_module mus_bc_general_module module~mus_control_module mus_control_module module~mus_control_module->module~mus_bc_general_module module~mus_debug_module mus_debug_module module~mus_control_module->module~mus_debug_module module~mus_debug_module->module~mus_bc_general_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_bc_general_module module~mus_construction_module mus_construction_module module~mus_dynloadbal_module->module~mus_construction_module module~mus_program_module mus_program_module module~mus_program_module->module~mus_bc_general_module module~mus_program_module->module~mus_control_module module~mus_program_module->module~mus_dynloadbal_module module~mus_program_module->module~mus_construction_module module~mus_construction_module->module~mus_debug_module program~musubi musubi program~musubi->module~mus_control_module program~musubi->module~mus_program_module program~mus_harvesting mus_harvesting program~mus_harvesting->module~mus_construction_module module~mus_hvs_construction_module mus_hvs_construction_module program~mus_harvesting->module~mus_hvs_construction_module module~mus_hvs_construction_module->module~mus_construction_module

Contents


Subroutines

public subroutine set_boundary(field, pdf, levelDesc, tree, iLevel, nBCs, params, layout, varSys, derVarPos, globBC, mixture, physics, state)

Call the functions associated with each boundary condition

Read more…

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: field(:)

fluid parameters and properties

type(pdf_data_type), intent(inout) :: pdf

contains global state vector

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

global type contains iLevel descriptor

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: iLevel

the iLevel on which this boundary was invoked

integer, intent(in) :: nBCs

number of BC

type(mus_param_type), intent(in) :: params

global parameters

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

stencil layout information

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

scheme variable system

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

position of derived quantities in varsys

type(glob_boundary_type), intent(in) :: globBC(:)

scheme global boundary type

type(mus_mixture_type), intent(in) :: mixture

mixture info

type(mus_physics_type), intent(in) :: physics

scheme global boundary type

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

state arrays fo all iLevels

public subroutine mus_init_boundary(field, pdf, tree, levelDesc, layout, schemeHeader, varSys, derVarPos, globBC, bc_prop, state)

Check prerequisite for multi-species boundary conditions

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: field(:)

fluid parameters and properties

type(pdf_data_type), intent(inout) :: pdf(tree%global%minLevel:tree%global%maxLevel)

contains global state vector

type(treelmesh_type), intent(in) :: tree

global treelm mesh

type(tem_levelDesc_type), intent(in) :: levelDesc(tree%global%minLevel:tree%global%maxLevel)

Level Descriptor

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

scheme layout type

type(mus_scheme_header_type), intent(in) :: schemeHeader

scheme header info

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

scheme variable system

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

position of derived quantities in varsys

type(glob_boundary_type), intent(inout) :: globBC(:)

scheme global boundary type

type(tem_BC_prop_type) :: bc_prop

boundary property type

type(array2D_type), intent(inout) :: state(tree%global%minLevel:tree%global%maxLevel)

state array

public subroutine mus_get_points_fromBC(bc, globBC, tree, stencil, total, iLevel, nPoints, points, offset_bit)

Get Surface points on boundary elements. For boundary state variable which are evaluated linkwise, extract surface points for each link and for non-link based variables project barycenter on the boundary surface. Return real coordinates on boundary surface and offset bit which encodes direction.

Arguments

TypeIntentOptionalAttributesName
type(boundary_type), intent(in) :: bc

Field boundary type

type(glob_boundary_type), intent(in) :: globBC

for number of elements in boundary and position in buffer

type(treelmesh_type), intent(in) :: tree

global treelm mesh

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

for directions

integer(kind=long_k), intent(in) :: total(:)

global pdf type

integer, intent(in) :: iLevel

Current level

integer, intent(out) :: nPoints

Number of points

real(kind=rk), intent(out), allocatable:: points(:,:)

3-d real coordinates on which boundary variables are evaluated

character, intent(out), allocatable:: offset_bit(:)

Offset bit encodes direction of boundary. used by apesmate to translate space coordinate in the offset direction to determine the treeID in remote domain

private subroutine init_boundary_single(bc, pdf, tree, levelDesc, layout, schemeHeader, varPos, varSys, derVarPos, globBC, bc_prop, state)

This subroutine sets the right boundary conditions for the different boundaries.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(boundary_type) :: bc(:)

global array boundary type

type(pdf_data_type), intent(in) :: pdf(tree%global%minLevel:tree%global%maxLevel)

contains global state vector

type(treelmesh_type), intent(in) :: tree

global treelm mesh

type(tem_levelDesc_type), intent(in) :: levelDesc(tree%global%minLevel:tree%global%maxLevel)

global pdf type

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

scheme layout type

type(mus_scheme_header_type), intent(in) :: schemeHeader

scheme header info

integer, intent(in) :: varPos(:)

varPos of current field variable

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

scheme variable system

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

position of derived quantities in varsys

type(glob_boundary_type), intent(inout) :: globBC(:)

scheme global boundary type

type(tem_BC_prop_type), intent(in) :: bc_prop

boundary property type

type(array2D_type), intent(in) :: state(tree%global%minLevel:tree%global%maxLevel)

contains global state vector

private subroutine check_BCs_preRequisite_MS(field, nBCs)

Check prerequisite for some boundary conditions

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: field(:)

fluid parameters and properties

integer, intent(in) :: nBCs

Number of boundary types

private subroutine init_momentsBC(bc, levelDesc, layout, globBC, minLevel, maxLevel)

Initialize the values required for the moments BC

Arguments

TypeIntentOptionalAttributesName
type(boundary_type), intent(inout) :: bc

global array boundary type

type(tem_levelDesc_type), intent(in) :: levelDesc(minLevel:maxLevel)

Level descriptor

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

Layout

type(glob_boundary_type), intent(inout) :: globBC

scheme global boundary type

integer, intent(in) :: minLevel

Level range

integer, intent(in) :: maxLevel

Level range

private subroutine init_qVals(refQVal, layout, globBC, minLevel, maxLevel)

assign qVal to corresponding BC and level-wise if qVal not provided by seeder. qVal from seeder are assigned in assignBCList in mus_construction_module, So set qVal from config only when it is not provided by seeder.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: refQVal
type(mus_scheme_layout_type), intent(in) :: layout
type(glob_boundary_type), intent(inout) :: globBC
integer, intent(in) :: minLevel
integer, intent(in) :: maxLevel

private subroutine init_nrbc(bc, state, nSize, neigh, layout, level, nScalars, varSys, derVarPos, elemPos, nElems)

Initialize the values required for the characteristic boundary conditions

Read more…

Arguments

TypeIntentOptionalAttributesName
type(boundary_type) :: bc

global array boundary type

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

State array

integer, intent(in) :: nSize

nSize

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

neighbor array

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

fluid parameters

integer, intent(in) :: level

level

integer, intent(in) :: nScalars

number of scalars in global system

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

scheme variable system

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

position of derived quantities in varsys

integer, intent(in) :: elemPos(:)

BC elements positions in total list

integer, intent(in) :: nElems

number of BC elements

private subroutine fill_neighBuffer(currstate, neigh, globBC, nBCs, field, varSys, QQ, nSize, iLevel)

Transfer pre- and post-collision PDF of neighbors of boundary elements into neighBufferPre and neighBufferPost. Access to state array

Read more…

Arguments

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

Current state vector of iLevel

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

connectivity array corresponding to state vector

type(glob_boundary_type), intent(in) :: globBC(:)

scheme global boundary type

integer, intent(in) :: nBCs

number of total BC

type(mus_field_type), intent(inout) :: field(:)

fluid parameters and properties

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

scheme variable system

integer, intent(in) :: QQ

number of total links

integer, intent(in) :: nSize

number of elements in state vector

integer, intent(in) :: iLevel

the iLevel on which this boundary was invoked

private subroutine fill_bcBuffer(bcBuffer, currState, nSize, nElems_bc, posInTotal, nScalars)

Transfer pdf of boundary elements into bcBuffer which is used by all boundary routines.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(out) :: bcBuffer(:)

state values of all boundary elements

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

Current state vector

integer, intent(in) :: nSize

nSize

integer, intent(in) :: nElems_bc

number of boundary elements

integer, intent(in) :: posInTotal(nElems_bc)

positions in total list of boundary elements

integer, intent(in) :: nScalars

number of state variables

private subroutine mus_setupIndices_forBC(bc, globBC, tree, stencil, levelDesc, varSys, minLevel, maxLevel)

This routine setup indices for boundary variables in bc_State_type pntIndex for the points on which boundaries are treated.

Arguments

TypeIntentOptionalAttributesName
type(boundary_type), intent(inout), target:: bc

Field boundary type

type(glob_boundary_type), intent(in) :: globBC

for number of elements in boundary and position in buffer

type(treelmesh_type), intent(in) :: tree

global treelm mesh

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

for directions

type(tem_levelDesc_type), intent(in) :: levelDesc(minLevel:maxLevel)

global pdf type

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

Global variable system

integer, intent(in) :: minLevel

Min and Max level in mesh

integer, intent(in) :: maxLevel

Min and Max level in mesh