inttau2 is the heart of the MCRT simulation. It moves the photons though the simulated media. tauint2 is the only public function here and is the main function that moves the photon. Changes should only be made here if bugs are discovered or new methods of tracking photons (i.e phase tracking) or moving photons (i.e new geometry method) is needed.
searches for bracketing indices for a value value in an array a
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | val |
value to find in array |
||
real(kind=wp), | intent(in) | :: | a(:) |
array to find val in |
funtion that returns distant to nearest wall and which wall that is (x, y, or z)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cart_grid), | intent(in) | :: | grid | |||
integer, | intent(inout) | :: | celli | |||
integer, | intent(inout) | :: | cellj | |||
integer, | intent(inout) | :: | cellk | |||
type(vector), | intent(in) | :: | pos | |||
type(vector), | intent(in) | :: | dir | |||
logical, | intent(inout) | :: | ldir(:) |
record fluence using path length estimators. Uses voxel grid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cart_grid), | intent(in) | :: | grid |
grid stores voxel grid information (voxel walls and etc) |
||
type(vector), | intent(inout) | :: | pos |
pos is current position with origin in centre of medium (0,0,0) |
||
type(vector), | intent(in) | :: | dir |
dir is the current direction (0,0,1) is up |
||
real(kind=wp), | intent(in) | :: | d_sdf |
d_sdf is the distance to travel in voxel grid |
||
type(photon), | intent(inout) | :: | packet |
packet stores the photon related variables |
||
real(kind=wp), | intent(in), | optional | :: | mua |
absoprtion coefficent |
routine that updates positions of photon and calls Fresnel routines if photon leaves current voxel
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cart_grid), | intent(in) | :: | grid | |||
type(vector), | intent(inout) | :: | pos | |||
integer, | intent(inout) | :: | celli | |||
integer, | intent(inout) | :: | cellj | |||
integer, | intent(inout) | :: | cellk | |||
real(kind=wp), | intent(in) | :: | dcell | |||
logical, | intent(in) | :: | wall_flag | |||
type(vector), | intent(in) | :: | dir | |||
logical, | intent(in) | :: | ldir(:) | |||
real(kind=wp), | intent(in) | :: | delta |
updates the current voxel based upon position
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cart_grid), | intent(in) | :: | grid |
grid |
||
type(vector), | intent(in) | :: | pos |
current photon packet position |
||
integer, | intent(inout) | :: | celli |
position of photon packet in grid |
||
integer, | intent(inout) | :: | cellj |
position of photon packet in grid |
||
integer, | intent(inout) | :: | cellk |
position of photon packet in grid |