routines related to them
initialize the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_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_boxarray_type) | :: | me |
empty the entries without changing arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me |
destroy the dynamic array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type), | intent(inout) | :: | me |
insert an element at a given position
adds the value to a given position inside the growing array.
if the requested position is outside the current array bounds, the array will be resized accordingly. if it is inside the current array bounds, the element at the requested position will be replaced.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me | ||||
type(tem_box_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.
if the requested position is outside the current array bounds, the array
will be resized accordingly. if it is inside the current array bounds, the
elements starting from the requested position will be replaced up to
the element at position pos + size(val) - 1
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me | ||||
type(tem_box_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_boxarray_type) | :: | me | ||||
type(tem_box_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length |
optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me | ||||
type(tem_box_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length |
optional length to expand the array |
increase the size of the container for the array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me | ||||
integer, | intent(in), | optional | :: | pos | ||
integer, | intent(in), | optional | :: | length |
optional length to expand the array |
This type contains origin and vec of box in each direction
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public | :: | center(3) |
center of the box |
|||
real(kind=rk), | public | :: | halfvec(3,3) |
vector which defines length of the box in x,y,z direction 1st dimension contains x,y,z coord and 2nd dimension defines three direction of vector. This vector is need to do transformation of box |
|||
real(kind=rk), | public | :: | halfwidth(3) |
halfwidth of the box from center in each direction. It is computed from halfvec during initialization since it is needed for boxboxoverlap |
|||
real(kind=rk), | public | :: | normal(3,3) |
unit normal vectors which defines the box orientation. It is computed from halfvec during initialization |
|||
logical, | public | :: | only_surface |
To choose what to do with intersection of box if only_surface = true than the only the surface of the object is intersected if only_surface = false then the whole object is intersected default is set to false |
|||
type(tem_plane_type), | public | :: | plane(6) |
For only_surface, box is converted into 6 planes and each plane is converted further into triangles |
growing array type for type(tem_box_type)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | nvals | = | 0 | ||
integer, | public | :: | containersize | = | 0 | ||
type(tem_box_type), | public, | allocatable | :: | val(:) |
This function checks for intersection of box and cube
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_box_type), | intent(in) | :: | box | |||
type(tem_cube_type), | intent(in) | :: | cube |
This function checks for intersection of a axis aligned box and a parallelepiped.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | center_a(3) | |||
real(kind=rk), | intent(in) | :: | dim_a(3) | |||
real(kind=rk), | intent(in) | :: | center_b(3) | |||
real(kind=rk), | intent(in) | :: | dim_b(3) |
Halflength of the parallelepiped in each direction. |
||
real(kind=rk), | intent(in) | :: | norm_b(3,3) |
This routine creates box from canoND definition i.en origin and three vectors. If only_surface is defined then box is converted further to plane and then to triangles. \verbatim vecB_vecC /\ - | | - | | - | | - | |- | |------------>| origin vecA \endverbatim
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_box_type), | intent(out) | :: | me | |||
real(kind=rk), | intent(in) | :: | origin(3) | |||
real(kind=rk), | intent(in) | :: | vecA(3) | |||
real(kind=rk), | intent(in) | :: | vecB(3) | |||
real(kind=rk), | intent(in) | :: | vecC(3) | |||
logical, | intent(in) | :: | only_surface |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type), | intent(out) | :: | me | |||
integer, | intent(in), | optional | :: | length |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type), | intent(inout) | :: | me |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me |
adds the value to a given position inside the growing array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me | ||||
type(tem_box_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_boxarray_type) | :: | me | ||||
type(tem_box_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_boxarray_type) | :: | me | ||||
type(tem_box_type), | intent(in) | :: | val | |||
integer, | intent(in), | optional | :: | length |
optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me | ||||
type(tem_box_type), | intent(in) | :: | val(:) | |||
integer, | intent(in), | optional | :: | length |
optional length to expand the array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grw_boxarray_type) | :: | me | ||||
integer, | intent(in), | optional | :: | pos | ||
integer, | intent(in), | optional | :: | length |
optional length to expand the array |