tem_surfaceData_module Module

This module provides the functionality to read surface information from file (stl, ...) and stores them in a surfaceData datatype.


Uses


Contents


Derived Types

type, public :: tem_surfData_type

Datatype to store the surface information in. The surface data consists of an array of unique points (XYZ coordinates) and their connectivity list (triangles).

Components

TypeVisibilityAttributesNameInitial
type(tem_surfaceData_stlHead_type), private, allocatable:: stlHead(:)

data (filename) for the surface data header

character(len=PathLen), private :: outprefix

output prefix

logical, private :: dumpForce

dump min and max force to a seperate file (debug output)

type(tem_timeControl_type), private :: timeControl

time control type for controlling the dumping of the stl file

integer, private :: nUniquePoints_total

number of unique point coordinates

real(kind=rk), private, allocatable:: pointCoords(:)

linearized array of point coordinates (X,Y,Z) the coordinates are stored one after another --------------------------- | X1,Y1,Z1, ... , Xn,Yn,Zn| --------------------------- size: 3*nUniquePoints_total

real(kind=rk), private, allocatable:: surfArea(:)

array of surface areas attached to this point

type(tem_parentIDs_type), private, allocatable:: parentIDs(:)

array of levelwise pointers to the parent eulerian elements of the lagrangian points in the levelDesc (size: nLevels)

integer, private, allocatable:: trias(:,:)

connectivity array of the points size: 3, nTrias

integer, private :: nTrias

total number of triangles stored

real(kind=rk), private, allocatable:: backPointCoords(:)

backup for linearized array of point coordinates (X,Y,Z) needed for defining offsets based on the initial position the coordinates are stored one after another --------------------------- | X1,Y1,Z1, ... , Xn,Yn,Zn| --------------------------- size: 3*nUniquePoints_total

Components

TypeVisibilityAttributesNameInitial
character(len=PathLen), private :: filename

filename of the data to be read from

type, private :: tem_parentIDs_type

Components

TypeVisibilityAttributesNameInitial
integer, private, allocatable:: ptrs(:)

levelwise pointers to the parent eulerian elements in the levelDesc size: pointCoords%nVals


Subroutines

public subroutine tem_load_surfData(me, conf, sd_handle)

Read more…

Arguments

TypeIntentOptionalAttributesName
type(tem_surfData_type), intent(inout) :: me

datatype to store the surface information

type(flu_state) :: conf

handle of the lua config file

integer :: sd_handle

handle for the surfaceData table

public subroutine tem_readAndUnify_surfData(me, useInitPos)

This routine reads the surface data from a set of stl files and stores it in the surfaceData_type.

Arguments

TypeIntentOptionalAttributesName
type(tem_surfData_type), intent(inout) :: me

datatype to store the surface information

logical, intent(in), optional :: useInitPos

shall the initial points be stored and used for updating the points later on ???

public subroutine tem_init_surfData(me, levelDesc, globTree, iLevel)

This subroutine identifies the parent treelm elements of the surface data points.

Arguments

TypeIntentOptionalAttributesName
type(tem_surfData_type), intent(inout) :: me

datatype to store the surface information

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

the level descriptor incl. ghost and halo elements as well as the communicator information on the level iLevel

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

global Tree information

integer, intent(in) :: iLevel

the current level

public subroutine tem_update_surfPos(me, levelDesc, globTree, movement, time, iLevel, IBMUnit, useInitPos, movPredef)

This subroutine updates the surface points and the parentIDs array as well as sets the correct property bits.

Arguments

TypeIntentOptionalAttributesName
type(tem_surfData_type), intent(inout) :: me

datatype to store the surface information

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

the level descriptor incl. ghost and halo elements as well as the communicator information on the level iLevel

type(treelmesh_type), intent(inout) :: globTree

global Tree information

type(tem_spacetime_fun_type) :: movement

spacetime function to define the motion of the surface points

type(tem_time_type) :: time

timing information

integer, intent(inout) :: iLevel

the current level

integer, intent(in), optional :: IBMUnit(0:tem_last_lu)

optional output log unit other than the global logUnit

logical, intent(in), optional :: useInitPos

shall the initial points be stored and used for updating the points later on ???

logical, intent(in) :: movPredef

logical to define wether the motion is predefined or not if not: initialize the values differently

public subroutine tem_calcTriaAreas(me)

This subroutine calculates the surface area attached to each point

Arguments

TypeIntentOptionalAttributesName
type(tem_surfData_type), intent(inout) :: me

datatype to store the surface information

public subroutine tem_freeSurfData(me, minLevel, maxLevel)

This subroutine deallocates all arrays in the tem_surfaceData_type. This is used when unloading and reloading the stl surface mesh during dynamic load balancing. General information like outputprefix, timeControl and backPointCoords are NOT touched!!!

Arguments

TypeIntentOptionalAttributesName
type(tem_surfData_type), intent(inout) :: me

datatype to store the surface information

integer, intent(in) :: minLevel

Level range

integer, intent(in) :: maxLevel

Level range

private subroutine tem_unify_surfaceData(me, all_pointCoords)

This subroutine makes the temporary of pointCoordinates unique, updates the triangle connectivity and sets the actual pointCoordinates to be the barycenters of the elements on the highest refinement level possible.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(tem_surfData_type), intent(inout) :: me

datatype to store the surface information

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

tmp point coordinates to be unified and stored in me