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.
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 |
Write a shape to lua file
Type | Intent | Optional | 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 |
Write a array of shapes to lua file
Type | Intent | Optional | 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 |
Read in an arbitrary shapes from a lua file defined as multiple tables
Type | Intent | Optional | 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 |
Read in an arbitrary shape from a lua file defined in a single table
Type | Intent | Optional | 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 |
Complete shape definitions
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=labelLen), | private | :: | kind | a kind of the shape defined. |
|||
integer, | private | :: | shapeID | = | 0 | a identification for the shape |
|
type(tem_canonicalND_type), | private, | allocatable | :: | canoND(:) | canonical definition |
||
type(tem_triangle_type), | private, | allocatable | :: | triangle(:) | triangle definition |
||
type(tem_stlData_type), | private | :: | stl_data | STL definition |
|||
type(tem_sphere_type), | private, | allocatable | :: | sphere(:) | spheres definition |
||
type(tem_ellipsoid_type), | private, | allocatable | :: | ellipsoid(:) | ellipsoid definition |
||
type(tem_cylinder_type), | private, | allocatable | :: | cylinder(:) | cylinder definition |
||
integer(kind=long_k), | private | :: | propBits | = | 0_long_k | property bits |
|
character(len=labelLen), | private, | allocatable | :: | bcLabels(:) | boundary labels, used to identify elements belong to these boundaries It is allocated and set in routine: tem_shape_load_bcLabels |
||
integer, | private | :: | minLevel | = | 1 | level range for level shape type |
|
integer, | private | :: | maxLevel | = | globalMaxLevels | ||
logical, | private | :: | inverted | = | .false. | If true then subTree is created for inverted shape i.e nonintersected |
This routine creates subTree from geometry intersection
Type | Intent | Optional | 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 |
Read in an arbitrary shapes from a lua file defined as multiple tables
Type | Intent | Optional | 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 |
Read in an arbitrary shape from a lua file defined in a single table
Type | Intent | Optional | 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 |
Write a array of shapes to lua file
Type | Intent | Optional | 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 |
Write a shape to lua file
Type | Intent | Optional | 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 |
Loading property labels from the config file, set the property bits accordingly
Type | Intent | Optional | 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 |
Loading bc labels from the config file, save those labels for further use.
Type | Intent | Optional | 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 |
Type | Intent | Optional | 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 |
Write out a shape level in lua format
Type | Intent | Optional | 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 |
Write out a shape property label in lua format
Type | Intent | Optional | 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 |
Write out a shape boundary label in lua format
Type | Intent | Optional | 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 |