MIDSX 0.1
A x-ray transport code system for dosimetry
|
Contains the runSimulation function. More...
#include "source.h"
#include "physics_engine.h"
Go to the source code of this file.
Functions | |
void | runSimulation (PhotonSource &source, PhysicsEngine &physics_engine, std::function< std::vector< std::unique_ptr< SurfaceTally > >()> surface_tally_init, std::function< std::vector< std::unique_ptr< VolumeTally > >()> volume_tally_init, int N_photons, double &run_time= *(new double)) |
Helper function which runs the particle transport simulation. | |
Contains the runSimulation function.
Definition in file run_simulation.h.
void runSimulation | ( | PhotonSource & | source, |
PhysicsEngine & | physics_engine, | ||
std::function< std::vector< std::unique_ptr< SurfaceTally > >()> | surface_tally_init, | ||
std::function< std::vector< std::unique_ptr< VolumeTally > >()> | volume_tally_init, | ||
int | N_photons, | ||
double & | run_time = *(new double) ) |
Helper function which runs the particle transport simulation.
Uses OpenMP to parallelize the simulation. Splits the number of photons among the threads.
source | The photon source. |
physics_engine | The physics engine. |
surface_tally_init | A function which returns a vector of unique pointers to surface tallies. |
volume_tally_init | A function which returns a vector of unique pointers to volume tallies. |
N_photons | The number of photons to simulate. |
run_time | A reference to a double which stores the run time of the simulation in seconds. |