tem_shape_module Module

Geometrical shape definitions for pre-defined bodies

This module provides data types and definitions for pre-defined geometrical objects such as points, lines, planes, and cubes.

Shapes


Uses

Used by

  • module~~tem_shape_module~~UsedByGraph module~tem_shape_module tem_shape_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_shape_module module~hvs_ascii_module hvs_ascii_module module~hvs_output_module->module~hvs_ascii_module module~tem_subtree_module tem_subTree_module module~hvs_output_module->module~tem_subtree_module module~tem_varmap_module tem_varMap_module module~hvs_output_module->module~tem_varmap_module module~tem_restart_module tem_restart_module module~hvs_output_module->module~tem_restart_module module~tem_spacetime_fun_module tem_spacetime_fun_module module~tem_spacetime_fun_module->module~tem_shape_module module~tem_spacetime_fun_module->module~tem_subtree_module module~tem_spatial_module tem_spatial_module module~tem_spacetime_fun_module->module~tem_spatial_module module~hvs_ascii_module->module~tem_shape_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_shape_module module~tem_convergence_module->module~tem_subtree_module module~tem_convergence_module->module~tem_varmap_module module~tem_subtree_module->module~tem_shape_module module~tem_spatial_module->module~tem_shape_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_shape_module module~tem_tracking_module->module~hvs_output_module module~tem_tracking_module->module~tem_subtree_module module~tem_tracking_module->module~tem_varmap_module module~tem_simcontrol_module tem_simControl_module module~tem_tracking_module->module~tem_simcontrol_module module~tem_variable_module tem_variable_module module~tem_variable_module->module~tem_spacetime_fun_module module~tem_face_module tem_face_module module~tem_face_module->module~tem_spacetime_fun_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_spacetime_fun_module module~tem_bc_module->module~tem_varmap_module module~tem_surfacedata_module tem_surfaceData_module module~tem_surfacedata_module->module~tem_spacetime_fun_module module~tem_abortcriteria_module tem_abortCriteria_module module~tem_abortcriteria_module->module~tem_convergence_module module~tem_derived_module tem_derived_module module~tem_derived_module->module~tem_spacetime_fun_module module~tem_derived_module->module~tem_variable_module module~tem_spacetime_var_module tem_spacetime_var_module module~tem_derived_module->module~tem_spacetime_var_module module~tem_operation_var_module tem_operation_var_module module~tem_derived_module->module~tem_operation_var_module module~tem_varmap_module->module~tem_spacetime_fun_module module~tem_varmap_module->module~tem_spacetime_var_module module~tem_spacetime_var_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_spatial_module module~tem_spacetime_var_module->module~tem_variable_module module~tem_simcontrol_module->module~tem_convergence_module module~tem_simcontrol_module->module~tem_abortcriteria_module module~tem_ini_condition_module tem_ini_condition_module module~tem_ini_condition_module->module~tem_spatial_module module~tem_depend_module tem_depend_module module~tem_ini_condition_module->module~tem_depend_module module~tem_operation_var_module->module~tem_variable_module module~tem_operation_var_module->module~tem_varmap_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_abortcriteria_module module~tem_general_module->module~tem_simcontrol_module module~tem_general_module->module~tem_restart_module module~tem_depend_module->module~tem_varmap_module module~tem_restart_module->module~tem_varmap_module

Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: tem_global_shape = 0

Parameters for different tracking shapes Global mesh

integer, public, parameter :: tem_geometrical_shape = 1

treelm geometrical object like canoND, sphere, cylinder, eclipse, triangle STL (STLs are converted further into triangles)

integer, public, parameter :: tem_property_shape = 2

elements that has a certain property

integer, public, parameter :: tem_local_shape = 3

elements on the local partition

integer, public, parameter :: tem_boundary_shape = 4

elements of one or more boundaries

integer, public, parameter :: tem_level_shape = 5

elements of certain levels


Interfaces

public interface tem_shape_out

  • private subroutine tem_shape_out_scal(me, conf)

    Write a shape to lua file

    Arguments

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

    shape types to write out

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

    Aotus type handling the output to the file in lua format

  • private subroutine tem_shape_out_vec(me, conf)

    Write a array of shapes to lua file

    Arguments

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

    shape types to write out

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

    Aotus type handling the output to the file in lua format

public interface tem_load_shape

  • private subroutine tem_load_shapes(me, conf, parent, key, iError, reqSegments)

    Read in an arbitrary shapes from a lua file defined as multiple tables

    read a shape like for example inside a tracking table

     tracking = {
                 {variable = { 'velocity' },
                  shape = { kind = 'canoND',
                            object = { origin = { 1.0, 1.0, 1.0 },
                                       vec = { 2.0, 2.0, 2.0 },
                                       segments = { 10, 20, 30 } }
                          }}
                } -- tracking table
    

    elements that has a certain property can also be tracked. This feature enables us to track boundary elements.

     tracking = {
                  { variable = { 'velocity' },
                    shape = { kind = 'property',
                              property = {'boundary'} },
                          }
                  }
                } -- tracking table
    

    Arguments

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

    array of shape type defined in a lua file

    type(flu_State) :: conf

    lua config file to load shape from

    integer, intent(in), optional :: parent

    optional parent handle

    character(len=*), intent(in), optional :: key

    optional key to load from

    integer, intent(out), optional :: iError

    error flag

    logical, intent(in), optional :: reqSegments

    Is true if use_get_point is true in output table

  • private subroutine tem_load_shape_single(me, conf, key, parent, sub_table, iError, reqSegments)

    Read in an arbitrary shape from a lua file defined in a single table

    read a shape like for example inside a tracking table

     tracking = { variable = { 'velocity' },
                  shape = { kind = 'canoND',
                            object = { origin = { 1.0, 1.0, 1.0 },
                                       vec = { 2.0, 2.0, 2.0 },
                                       segments = { 10, 20, 30 } }
                          }
                } -- tracking table
    

    Arguments

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

    shape type defined in a lua file

    type(flu_State) :: conf

    lua state

    character(len=*), intent(in), optional :: key

    optional key to load from

    integer, intent(in), optional :: parent

    optional parent handle

    integer, intent(in), optional :: sub_table

    shape table handle

    integer, intent(out), optional :: iError

    error flag

    logical, intent(in), optional :: reqSegments

    Is true if use_get_point is true in output table


Derived Types

type, public ::  tem_shape_type

Complete shape definitions

Components

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

a kind of the shape defined.

integer, public :: shapeID = 0

a identification for the shape

type(tem_canonicalND_type), public, allocatable :: canoND(:)

canonical definition

type(tem_triangle_type), public, allocatable :: triangle(:)

triangle definition

type(tem_stlData_type), public :: stl_data

STL definition

type(tem_sphere_type), public, allocatable :: sphere(:)

spheres definition

type(tem_ellipsoid_type), public, allocatable :: ellipsoid(:)

ellipsoid definition

type(tem_cylinder_type), public, allocatable :: cylinder(:)

cylinder definition

integer(kind=long_k), public :: propBits = 0_long_k

property bits

character(len=labelLen), public, allocatable :: bcLabels(:)

boundary labels, used to identify elements belong to these boundaries It is allocated and set in routine: tem_shape_load_bcLabels

real(kind=rk), public :: cutOffQVal

boundary elements below this threshold are omitted

integer, public :: minLevel = 1

level range for level shape type

integer, public :: maxLevel = globalMaxLevels
logical, public :: inverted = .false.

If true then subTree is created for inverted shape i.e nonintersected


Subroutines

public subroutine tem_shape2subTree(me, iShape, inTree, storePnts, map2global, grwPnts, countElems, countPnts, bcIDs, bc_prop, stencil)

Identify elements matching a given shape to build a subTree.

Arguments

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

The shape to identify elements for

integer, intent(in) :: iShape

Numbering of the shape (only for logging)

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

The tree to look in for elements that match the shape definition

logical, intent(in) :: storePnts

Whether to store point values

type(dyn_intarray_type), intent(inout) :: map2global

Mapping to global elements in the tree

type(tem_grwPoints_type), intent(inout) :: grwPnts

Growing list of Points to be observed

integer, intent(out) :: countElems(globalMaxLevels)

Number of elements on each level matching the shape

integer, intent(out) :: countPnts

Number of points to be observed

integer, intent(out), allocatable :: bcIDs(:)

Field of boundary ids that are to be tracked

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

Boundary condition property to identify boundary elements

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

Stencil associated with the boundary to find respective neighbors

private subroutine tem_load_shapes(me, conf, parent, key, iError, reqSegments)

Read in an arbitrary shapes from a lua file defined as multiple tables

Read more…

Arguments

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

array of shape type defined in a lua file

type(flu_State) :: conf

lua config file to load shape from

integer, intent(in), optional :: parent

optional parent handle

character(len=*), intent(in), optional :: key

optional key to load from

integer, intent(out), optional :: iError

error flag

logical, intent(in), optional :: reqSegments

Is true if use_get_point is true in output table

private subroutine tem_load_shape_single(me, conf, key, parent, sub_table, iError, reqSegments)

Read in an arbitrary shape from a lua file defined in a single table

Read more…

Arguments

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

shape type defined in a lua file

type(flu_State) :: conf

lua state

character(len=*), intent(in), optional :: key

optional key to load from

integer, intent(in), optional :: parent

optional parent handle

integer, intent(in), optional :: sub_table

shape table handle

integer, intent(out), optional :: iError

error flag

logical, intent(in), optional :: reqSegments

Is true if use_get_point is true in output table

private subroutine tem_shape_subTreeFromGeomInters(me, inTree, countElems, countPoints, grwPnts, storePnts, map2global)

This routine creates subTree from geometry intersection

Arguments

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

shape objects on which to work

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

Global tree

integer, intent(inout) :: countElems(globalMaxLevels)

How many elements there will be for each level in the track

integer, intent(inout) :: countPoints

How many points there will be

type(tem_grwPoints_type), intent(inout) :: grwPnts

growing array to store tracking points

logical, intent(in) :: storePnts

to Store points in grwPnts

type(dyn_intarray_type), intent(inout) :: map2global

growing array for the map2global

private subroutine tem_shape_out_vec(me, conf)

Write a array of shapes to lua file

Arguments

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

shape types to write out

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

Aotus type handling the output to the file in lua format

private subroutine tem_shape_out_scal(me, conf)

Write a shape to lua file

Arguments

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

shape types to write out

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

Aotus type handling the output to the file in lua format

private subroutine tem_shape_load_propLabel(propBits, conf, thandle)

Loading property labels from the config file, set the property bits accordingly

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k) :: propBits

propBits

type(flu_State) :: conf

lua config handle

integer, intent(in) :: thandle

table handle from which to read

private subroutine tem_shape_load_bcLabels(bcLabels, conf, thandle)

Loading bc labels from the config file, save those labels for further use.

Arguments

Type IntentOptional Attributes Name
character(len=labelLen), allocatable :: bcLabels(:)

bc labels

type(flu_State) :: conf

lua config handle

integer, intent(in) :: thandle

table handle from which to read

private subroutine tem_shape_load_level(minLevel, maxLevel, conf, thandle)

Arguments

Type IntentOptional Attributes Name
integer :: minLevel

level range

integer :: maxLevel

level range

type(flu_State) :: conf

lua config handle

integer, intent(in) :: thandle

table handle from which to read

private subroutine tem_shape_level_out(minLevel, maxLevel, conf)

Write out a shape level in lua format

Arguments

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

Minlevel and maxlevel

integer, intent(in) :: maxLevel

Minlevel and maxlevel

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

Aotus type handling the output to the file in lua format

private subroutine tem_shape_propLabel_out(propBits, conf)

Write out a shape property label in lua format

Arguments

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

property bits

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

Aotus type handling the output to the file in lua format

private subroutine tem_shape_bcLabel_out(bcLabels, conf)

Write out a shape boundary label in lua format

Arguments

Type IntentOptional Attributes Name
character(len=labelLen), intent(in) :: bcLabels(:)

Boundary labels

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

Aotus type handling the output to the file in lua format

private subroutine tem_shape_findElemByBCLabels(bcLabels, cutOffQVal, bc_prop, foundAny, map2global, inTree, countPoints, grwPnts, storePnts, bcIDs, stencil)

This routine identifies elements that belong to certain bounaries. Labels of required boundaries are given by bcLabels. bc_prop contains boudnary_ID of all local elements. Firstly, bcLabels are converted into bcIDs. Then all elements in bc_prop are looped over to check if it matches one of the required bcID. If match, its position is save in map2global. Number of elements found on each level is saved in countElems.

Arguments

Type IntentOptional Attributes Name
character(len=labelLen), intent(in) :: bcLabels(:)

bcLabels

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

Cut off qValue

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

bc property

logical, intent(out) :: foundAny

if any element be identified

type(dyn_intarray_type), intent(inout) :: map2global

dynamic array. Elements positions in bc_prop%property%elemID

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

Global tree

integer, intent(inout) :: countPoints

How many points there will be

type(tem_grwPoints_type), intent(inout) :: grwPnts

growing array to store tracking points

logical, intent(in) :: storePnts

to Store points in grwPnts

integer, intent(out), allocatable :: bcIDs(:)

id of boundary condition to be tracked

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

stencil required to get useful links

private subroutine tem_shape_initByLevels(inTree, minLevel, maxLevel, countElems, map2global)

Arguments

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

Global mesh from which the elements are identified and then stored to

integer, intent(in) :: minLevel

level range of target elements

integer, intent(in) :: maxLevel

level range of target elements

integer, intent(out) :: countElems(globalMaxLevels)

How many elements there will be for each level in the track

type(dyn_intarray_type), intent(inout) :: map2global

growing array. Elements positions in inTree%treeID

private subroutine tem_shape_initPropElements(propBits, inTree, countElems, map2global)

This routine identify all the elements in inTree that has a certain property bit, save their positions in inTree into array: map2global, save the number of these elements into level wise array: countElems (e.g. for shape kind='property').

Arguments

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

shape objects on which to work

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

Global mesh from which the elements are identified and then stored to

integer, intent(out) :: countElems(globalMaxLevels)

How many elements there will be for each level in the track

type(dyn_intarray_type), intent(inout) :: map2global

growing array. Elements positions in inTree%treeID