\brief Module to describe triangles. Contains triangle type with vertices of the triangle
initialize the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type), | intent(out) | :: | me | |||
integer, | intent(in), | optional | :: | length |
truncate the array, meaning cut off the trailing empty entries
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me |
empty the entries without changing arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me |
destroy the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type), | intent(inout) | :: | me |
insert an element at a given position
adds the value to a given position inside the growing array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val | |||
integer, | intent(in) | :: | pos | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
adds the values starting from a given position inside the growing array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val(:) | |||
integer, | intent(in) | :: | pos | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
append a value to the dynamic array and return its position.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
interface to write out triangles in lua format to a file
Write out a triangle shape in lua format
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(in) | :: | me | triangle types to write out |
||
type(aot_out_type), | intent(inout) | :: | conf | Aotus type handling the output to the file in lua format |
Write out an array of triangles in lua format Only if nTriangles <= 10
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(in) | :: | me(:) | triangle types to write out |
||
type(aot_out_type), | intent(inout) | :: | conf | Aotus type handling the output to the file in lua format |
increase the size of the container for the array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
integer, | intent(in), | optional | :: | pos | ||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
interface to load triangles
interface to load triangles
Load single triangle from config file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(out) | :: | me | single triangle |
||
type(tem_transformation_type), | intent(in) | :: | transform | transformation for spatial object |
||
type(flu_state) | :: | conf | lua state |
|||
integer, | intent(in) | :: | thandle |
This type contains three vertices of the triangle
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | private | :: | nodes(3,3) | 1st index contains x,y,z coordinates and 2nd index the vertex number. |
growing array type for type(tem_triangle_type)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | nvals | = | 0 | ||
integer, | private | :: | containersize | = | 0 | ||
type(tem_triangle_type), | private, | allocatable | :: | val(:) |
Compute, if the triangle intersects the cube.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(in) | :: | triangle | |||
type(tem_cube_type), | intent(in) | :: | cube |
This routine checks for triangle box overlap
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | boxCenter(3) | box center |
||
real(kind=rk), | intent(in) | :: | boxHalfwidth(3) | halfwidth of the box |
||
real(kind=rk), | intent(in) | :: | triNodes(3,3) | nodes of the triangle 1st index denote x,y,z coordinates and 2nd index denote nodes |
This function check whether there is separating axis between triangle and box. This function can be optimized by explicitly providing cross_product result see example: http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/code/tribox3.txt
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | dirVec(3) | |||
real(kind=rk), | intent(in) | :: | edge(3) | |||
real(kind=rk), | intent(in) | :: | nodes(3,3) | |||
real(kind=rk), | intent(in) | :: | boxhalfwidth(3) |
This routine checks for plane box overlap this routine is conversion of c-code tribox3.c planeBoxOverlap function
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | normal(3) | normal direction of the plane |
||
real(kind=rk), | intent(in) | :: | origin(3) | origin of the plane |
||
real(kind=rk), | intent(in) | :: | boxhalfwidth(3) | halfwidth of the box |
Load triangle information from config file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(out), | allocatable | :: | me(:) | array of triangles |
|
type(tem_transformation_type), | intent(in) | :: | transform | transformation for spatial object |
||
type(flu_state) | :: | conf | lua state |
|||
integer, | intent(in) | :: | thandle |
Load single triangle from config file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(out) | :: | me | single triangle |
||
type(tem_transformation_type), | intent(in) | :: | transform | transformation for spatial object |
||
type(flu_state) | :: | conf | lua state |
|||
integer, | intent(in) | :: | thandle |
Write out an array of triangles in lua format Only if nTriangles <= 10
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(in) | :: | me(:) | triangle types to write out |
||
type(aot_out_type), | intent(inout) | :: | conf | Aotus type handling the output to the file in lua format |
Write out a triangle shape in lua format
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(in) | :: | me | triangle types to write out |
||
type(aot_out_type), | intent(inout) | :: | conf | Aotus type handling the output to the file in lua format |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type), | intent(out) | :: | me | |||
integer, | intent(in), | optional | :: | length |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type), | intent(inout) | :: | me |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me |
adds the value to a given position inside the growing array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val | |||
integer, | intent(in) | :: | pos | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
adds the values starting from a given position inside the growing array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val(:) | |||
integer, | intent(in) | :: | pos | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
type(tem_triangle_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length | optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_trianglearray_type) | :: | me | ||||
integer, | intent(in), | optional | :: | pos | ||
integer, | intent(in), | optional | :: | length | optional length to expand the array |