Module | Source File | Description |
---|---|---|
constants | constants.f90 | This module contains mathematical constants and strings that contain the various directories used by the program. Math constants: - PI - 2 PI - wp (working precision of the whole program). Default is double precision (64bit floats) Directories: - homedir. Root directory of this code - fileplace. data folder directory - resdir. holds the path to the directory that holds the parameter and other associated input files |
detector_mod | detector_base.f90 | Module contains photon detector abstract class and the derived types the inherit from it not fully implmented |
detectors | detectors.f90 | Module contains each detector type which inherits from the base detector class. detectors detect photon packets colliding with the detectors. |
geometry | geometryMod.f90 | Defines a set of functions for intersecting a ray and a surface. |
gridMod | grid.f90 | This module defines the cartesian grid type (cart_grid) and associated routines. |
historyStack | historyStack.f90 | Module contains the history stack type which stores the history of positions of a photon and th I/O routines not fully implmented |
iarray | iarray.f90 | The iarray module contains the variables that record the fluence. These are 3D arrays, with roughly the same dimensions as the cart_grid type. Jmean is the local fluence. JmeanGLOBAL is the global fluence grid. The global version is the one that is written to disk at the simulations end. |
inttau2 | inttau2.f90 | 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. |
kernels | kernelsMod.f90 | Contains the main program and scattering loop. Calls all other routine to setup, run and break down the simulation. |
mat_class | mat_class.f90 | Matrix class module. Defines a matrix type (4x4 matrix) and associated operations on matrices and other types. |
opticalProperties | opticalProperties.f90 | module implments the optical property abstract type and the types that inheirt from it abstract optical property type |
parse_detectorsMod | parse_detectors.f90 | routine to parse the detector table from the input Toml file. |
parse_HelpersMod | parse_helpers.f90 | Helper functions for parsing the toml input file |
parse_mod | parse.f90 | Module contains parses the input toml config files. See config for details of toml input file. |
parse_sourcesMod | parse_source.f90 | routine to parse the source table from the input Toml file. |
parse_SpectrumMod | parse_spectrum.f90 | routine to parse the spectrum entry in the source table from the input Toml file. |
photonMod | photon.f90 | This source file contains the photon type, all the photon launch routines for different light sources, and the scattering code. |
piecewiseMod | piecewise.f90 | This file contains the piecewise abstract type, for sampling from constants, 1D or 2D arrays. Inspired by PBRT piecewise class. Currently, the following public types are defined: |
random | random_mod.f90 | module provides an interface to call random_numbers and various other random distributions======= !!This module defines a set of functions that return random numbers in different distributions. !!- ran2. Returns a single float uniformly in the range [0, 1) !!- ranu. Return a single float uniformly in the range [a, b) !!- randint. Returns a single integer uniformly in the range [a, b) !!- rang. Returns a single float from a Gaussian distribution with mean avg and std sigma. !!- init_rng. Seeds the internal random number generator with a reproducible seed. |
sdf_baseMod | sdf_base.f90 | This module defines the signed distance function (SDF) abstract type, sdf_base type, and model type. The SDF abstract type contains the optical properties of an SDF (mus, mua, kappa, albedo, hgg, g2,and n), as well as a transform (4x4 matrix), and the layer ID code of the SDF. The SDF abstract type also provides an abstract interface (evaluate) which each inheriting function must implement. This evaluate function is the heart of the SDF implementation. Each individual evaluate is the direct implementation of that SDF, e.g. that function defines the mathematical SDF. For more information on SDFs, check out Inigo Quilez's website from which most of the below SDFs and transforms have been taken. API based upon here |
sdfHelpers | sdfHelpers.f90 | Collection of helper functions for SDFs: |
sdfModifiers | sdfModifiers.f90 | This module defines transforms that can be applied to each SDF: - Union - Intersection - Subtraction - Displacement - Bend - Twist - Elongate - Repeat - Extrude - Revolution - Onion |
sdfs | sdfs.f90 | This module defines the signed distance function (SDF) abstract type and all types that inherit from it. The SDF abstract type defines the optical properties of an SDF (mus, mua, kappa, albedo, hgg, g2,and n), as well as a transform (4x4 matrix), and the layer ID code of the SDF. The SDF abstract type also provides an abstract interface (evaluate) which each inheriting function must implement. This evaluate function is the heart of the SDF implementation. Each individual evaluate is the direct implementation of that SDF, e.g. that function defines the mathematical SDF. For more information on SDFs, check out Inigo Quilez's website from which most of the below SDFs and transforms have been taken. |
setupGeometry | setupGeometry.f90 | contains all the routines that setup premade experimental geometry |
setupMod | setup.f90 | This file sets up some simulations variables and assigns the geometry for the simulation. |
sim_state_mod | sim_state.f90 | This module defines the setting_t type which holds simulation metadata: |
surfaces | surfaces.f90 | Contains the routines that handle reflection, and refraction via the Fresnel equations. |
vec4_class | vec4_class.f90 | Vector4 class module. Defines a vector4 type (x, y, z, p) and associated operations on vectors and other types. |
vector_class | vector_class.f90 | Vector class module. Defines a vector type (x, y, z) and associated operations on vectors and other types. |
writer_mod | writer.f90 | This module defines all functions that write simulation data to the disk or pre-process data before writing. normalise_fluence. Normalises fluence by number of photons run and size of each voxel. !Does not normalise by power! write_fluence. Write out fluence in either raw or nrrd format. Default is nrrd. write_detected_photons. Write out photons detected by detectors. |