tem_bc_prop_module Module

A module to provide informations on boundary condition tem_bc_module property for elements.



Derived Types

type, public ::  tem_BC_prop_type

Components

Type Visibility Attributes Name Initial
type(tem_prophead_type), public, pointer :: header => null()

Pointer to treelmesh_type%global%property

integer, public :: nSides

Number of sides in the elements, each side might be assigned a boundary condition ID The first 6 are dedicated to "direct" neighbors, and shall always be present. The next 12 are dedicated to neighbors where two of the indices in the 3 dimensional address have to be changed (neighbors at the edges of the cube) After these 18 entries, additional 8 entries might be used for neighbors at the corners.

Read more…
integer, public :: nBCtypes

Number of different Boundary conditions used in the complete domain e.g. wall, inflow, outflow

character(len=LabelLen), public, allocatable :: BC_label(:)

Array of labels identifying each of the boundary conditions. This array has a length of nBCtypes

logical, public, allocatable :: hasQVal(:)

Logical array indicating whether each boundary is high order wall This array has a length of nBCtypes

logical, public, allocatable :: hasNormal(:)

Logical array indicating whether each boundary provides normal wall information.

real(kind=rk), public, allocatable :: qVal(:,:)

Actual q-value array for high order wall boundary conditions The fist dimension has a length of nSides The second dimension has a length of the number of elements with the boundary condition property. tem_property_type%nElems

real(kind=rk), public, allocatable :: normal(:,:)

Actual normals array for boundary conditions providing the wall normals The fist dimension has length 3 The second dimension has a length of the number of elements with the hasNormal property. tem_property_type%nElems

integer(kind=long_k), public, allocatable :: boundary_ID(:,:)

Actual boundary condition identification for all sides of elements with this property. The first dimension has a length of nSides The second dimension has a length of the number of elements with the boundary condition property. tem_property_type%nElems An ID of 0 for a side indicates, that there is no boundary in that direction. A negative ID indicates a periodic boundary and that the given absolute of the given value is to be taken as neighboring ID in that direction.

type(tem_property_type), public, pointer :: property => null()

Pointer to treelmesh_type%property


Functions

public pure function tem_bc_prop_pos(tree) result(bcpos)

Get the boundary property position in the list of all properties in tree.

Read more…

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree

Tree to find the boundary condition property for.

Return Value integer

Position of the boundary condition property in the list of all properties.


Subroutines

public subroutine init_tem_bc_prop(tree, mypart, comm, bc)

Initialize boundary conditions of a given tree.

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree
integer, intent(in) :: mypart
integer, intent(in) :: comm

Communicator to use

type(tem_BC_prop_type), intent(out) :: bc

public subroutine load_tem_BC_prop(me, offset, nElems, basename, myPart, comm)

load bc property header from lua file, boundaryID from bnd.lsb

Arguments

Type IntentOptional Attributes Name
type(tem_BC_prop_type), intent(inout) :: me

Boundary condition construct to load the data into

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

Offset of the local set of elements in the global list

integer, intent(in) :: nElems

Local number of elements with this property

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".ascii" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: myPart

Partition to load

integer, intent(in) :: comm

Communicator to use

public subroutine tem_empty_BC_prop(me)

Initialize an empty boundary condition

Arguments

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

Boundary condition construct to load the data into

public subroutine tem_bc_prop_sublist(tree, bc, header, property, sublist, sub_bc)

Create the boundary property for a restricted set of elements given by sublist (position of elements in tree, usually from a subtree).

Read more…

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree

The original tree from which the subset is to be selected.

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

The boundary condition property in the original mesh (tree).

type(tem_prophead_type), intent(in), target :: header

Header description of the boundary condition property in the sublist.

Read more…
type(tem_property_type), intent(in), target :: property

Property description of the boundary condition property in the sublist.

Read more…
integer, intent(in) :: sublist(:)

List of elements to get the boundary information for.

type(tem_BC_prop_type), intent(out) :: sub_bc

New boundary property description for just the elements provided in sublist.

Read more…

public subroutine dump_tem_BC_propHeader(me, headerfile)

dump bc properties header information to lua file

Arguments

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

Boundary condition construct to load the data into

character(len=*), intent(in) :: headerfile

name of the bc header lua file

public subroutine dump_tem_BC_prop(me, offset, nElems, basename, myPart, comm)

dump bc properties

Read more…

Arguments

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

Boundary condition construct to load the data into

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

Offset of the local set of elements in the global list

integer, intent(in) :: nElems

Local number of elements with this property

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: myPart

Partition to dump

integer, intent(in) :: comm

Communicator to use

public subroutine dump_tem_BC_qVal(me, offset, nElems, basename, myPart, comm)

dump bc properties

Arguments

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

Boundary condition construct to load the data into

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

Offset of the local set of elements in the global list

integer, intent(in) :: nElems

Local number of elements with this property

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: myPart

Partition to dump

integer, intent(in) :: comm

Communicator to use

public subroutine load_tem_BC_qVal(me, offset, nElems, basename, myPart, comm)

load bc qVal header from lua file, qVal from qVal.lsb

Arguments

Type IntentOptional Attributes Name
type(tem_BC_prop_type), intent(inout) :: me

Boundary condition construct to load the data into

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

Offset of the local set of elements in the global list

integer, intent(in) :: nElems

Local number of elements that have qVal

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: myPart

Partition to load

integer, intent(in) :: comm

Communicator to use

public subroutine dump_tem_BC_normal(me, offset, nElems, basename, myPart, comm)

dump normal information

Arguments

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

Boundary condition construct to load the data into

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

Offset of the local set of elements in the global list

integer, intent(in) :: nElems

Local number of elements with this property

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: myPart

Partition to dump

integer, intent(in) :: comm

Communicator to use

public subroutine load_tem_BC_normal(me, offset, nElems, basename, myPart, comm)

load bc qVal header from lua file, qVal from qVal.lsb

Arguments

Type IntentOptional Attributes Name
type(tem_BC_prop_type), intent(inout) :: me

Boundary condition construct to load the data into

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

Offset of the local set of elements in the global list

integer, intent(in) :: nElems

Local number of elements that have qVal

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: myPart

Partition to load

integer, intent(in) :: comm

Communicator to use

public subroutine tem_debug_bc_prop(me)

Arguments

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

Boundary condition construct to load the data into

public subroutine tem_unload_BC_prop(me)

Arguments

Type IntentOptional Attributes Name
type(tem_BC_prop_type), intent(inout) :: me

Boundary property type

private subroutine load_BC_intern_1D(tree, me, xbounds, nSides)

Load internal BC property for 1D Line.

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree
type(tem_BC_prop_type), intent(inout) :: me

Boundary condition construct to load the data into

logical, intent(in) :: xbounds

Set boundaries east and west in X direction?

integer, intent(in), optional :: nSides

Required sides to set, defaults to 26.

private subroutine load_BC_intern_0D(tree, me, nSides)

Load internal BC property for a single fully periodic element.

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree
type(tem_BC_prop_type), intent(inout) :: me

Boundary condition construct to load the data into

integer, intent(in), optional :: nSides

Required sides to set, defaults to 26.

private subroutine load_BC_intern_2D(tree, me, nSides)

Load internal BC property for 2D Slice.

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree
type(tem_BC_prop_type), intent(inout) :: me

Boundary condition construct to load the data into

integer, intent(in), optional :: nSides

Required sides to set, defaults to 26.

private subroutine dump_tem_BC_logicalHeader(headerfile, propname, nBCtypes, flag_per_BC)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: headerfile
character(len=*), intent(in) :: propname
integer, intent(in) :: nBCtypes
logical, intent(in) :: flag_per_BC(nBCtypes)

private subroutine dump_tem_BC_realArray(offset, arraylen, nElems, propdat, basename, comm)

dump bc properties

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: offset

Offset of the local set of elements in the global list

integer, intent(in) :: arraylen

Length of real array for each element

integer, intent(in) :: nElems

Local number of elements with this property

real(kind=rk), intent(in) :: propdat(arraylen,nElems)

Real-valued property data for each element to write out

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: comm

Communicator to use

private subroutine load_tem_BC_logicalHeader(nBCtypes, propname, basename, flag_per_BC, myPart, comm)

load bc realarray data from disk

Arguments

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

Number of boundary condition types

character(len=*), intent(in) :: propname

Name of the property to load

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

logical, intent(out) :: flag_per_BC(nBCtypes)

The flags to set for each boundary condition type

integer, intent(in) :: myPart

Partition to load

integer, intent(in) :: comm

Communicator to use

private subroutine load_tem_BC_realArray(offset, propname, arraylen, nElems, propdat, basename, myPart, comm)

load bc realarray data from disk

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: offset

Offset of the local set of elements in the global list

character(len=*), intent(in) :: propname

Name of the property to load

integer, intent(in) :: arraylen

Length of the real data array to read per element

integer, intent(in) :: nElems

Local number of elements with this property

real(kind=rk), intent(out) :: propdat(arraylen,nElems)

real array data to fill

character(len=*), intent(in) :: basename

Name of the file, the data is stored in, will be appended with ".lua" for the header information and ".lsb" or ".msb" for the binary data.

integer, intent(in) :: myPart

Partition to load

integer, intent(in) :: comm

Communicator to use

private subroutine dump_tem_BC_qValHeader(me, headerfile)

dump qval header information to lua file

Arguments

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

Boundary condition construct to load the data into

character(len=*), intent(in) :: headerfile

name of the bc header lua file

private subroutine dump_tem_BC_NormalHeader(me, headerfile)

dump normal header information to lua file

Arguments

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

Boundary condition construct to load the data into

character(len=*), intent(in) :: headerfile

name of the bc header lua file