This module defines the cartesian grid type (cart_grid) and associated routines.
The cart_grid type contains information related to the grid used to record the fluence. This includes the number of voxels in each cardinal direction (nxg, nyg, nzg), the half size of the grid in each direction (xmax, ymax, zmax), and the locations of the voxels walls in each direction (xface, yface, zface). The type-bound function get_voxel takes a position (vector) and returns the voxel the position falls in.
Init_grid initialises a cart_grid instance.
Grid class
setup grid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nxg |
number of voxels in each cardinal direction for fluence grid |
||
integer, | intent(in) | :: | nyg |
number of voxels in each cardinal direction for fluence grid |
||
integer, | intent(in) | :: | nzg |
number of voxels in each cardinal direction for fluence grid |
||
real(kind=wp), | intent(in) | :: | xmax |
half size of each dimension in fluence grid. |
||
real(kind=wp), | intent(in) | :: | ymax |
half size of each dimension in fluence grid. |
||
real(kind=wp), | intent(in) | :: | zmax |
half size of each dimension in fluence grid. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public | :: | delta |
Delta is the round off for near voxel cell walls |
|||
integer, | public | :: | nxg |
number of voxels in each cardinal direction for fluence grid |
|||
integer, | public | :: | nyg |
number of voxels in each cardinal direction for fluence grid |
|||
integer, | public | :: | nzg |
number of voxels in each cardinal direction for fluence grid |
|||
real(kind=wp), | public, | allocatable | :: | xface(:) |
position of each cell wall in fluence grid |
||
real(kind=wp), | public | :: | xmax |
half size of each dimension in fluence grid. |
|||
real(kind=wp), | public, | allocatable | :: | yface(:) |
position of each cell wall in fluence grid |
||
real(kind=wp), | public | :: | ymax |
half size of each dimension in fluence grid. |
|||
real(kind=wp), | public, | allocatable | :: | zface(:) |
position of each cell wall in fluence grid |
||
real(kind=wp), | public | :: | zmax |
half size of each dimension in fluence grid. |
public function init_grid (nxg, nyg, nzg, xmax, ymax, zmax) | setup grid |
procedure, public :: get_voxel |
setup grid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nxg |
number of voxels in each cardinal direction for fluence grid |
||
integer, | intent(in) | :: | nyg |
number of voxels in each cardinal direction for fluence grid |
||
integer, | intent(in) | :: | nzg |
number of voxels in each cardinal direction for fluence grid |
||
real(kind=wp), | intent(in) | :: | xmax |
half size of each dimension in fluence grid. |
||
real(kind=wp), | intent(in) | :: | ymax |
half size of each dimension in fluence grid. |
||
real(kind=wp), | intent(in) | :: | zmax |
half size of each dimension in fluence grid. |