5#include "computational_domain.h"
6#include "probability_dist.h"
8#include "interpolators.h"
9#include "photon_interactions.h"
10#include "volume_tally.h"
12#include "surface_tally.h"
16namespace PhysicsEngineHelpers {
17 bool areCollinearAndSameDirection(
const Eigen::Vector3d& vec1,
const Eigen::Vector3d& vec2);
51 std::vector<TempVolumeTallyData>& temp_volume_tally_data_per_photon,
52 std::vector<TempVoxelData>& temp_voxel_data_per_photon);
118 std::vector<std::vector<std::unique_ptr<VolumeTally>>> thread_local_volume_tallies_;
119 std::vector<std::vector<std::unique_ptr<SurfaceTally>>> thread_local_surface_tallies_;
120 std::vector<std::vector<TempVoxelData>> thread_local_voxel_data_;
121 std::shared_ptr<PhotoelectricEffect> photoelectric_effect_;
122 std::shared_ptr<IncoherentScattering> incoherent_scattering_;
123 std::shared_ptr<CoherentScattering> coherent_scattering_;
153 std::vector<TempVolumeTallyData>& temp_volume_tally_data_per_photon,
163 void processTallies(std::vector<TempSurfaceTallyData>& temp_surface_tally_data_per_photon,
164 std::vector<TempVolumeTallyData>& temp_volume_tally_data_per_photon,
165 std::vector<TempVoxelData>& temp_voxel_data_per_photon);
Class which represents the computational domain.
Class which provides access to various simulation significant data.
Class which represents a material.
Class which represents a photon. Inherits from Particle.
void transportPhotonOneStep(Photon &photon, std::vector< TempSurfaceTallyData > &temp_surface_tally_data_per_photon, std::vector< TempVolumeTallyData > &temp_volume_tally_data_per_photon, std::vector< TempVoxelData > &temp_voxel_data_per_photon)
Transports photon one step. Either performs a real or delta interaction.
void setInteractionType(Photon &photon, Material &material, double total_cross_section)
Sets the interaction type of the photon.
void addVolumeTallies(std::vector< std::unique_ptr< VolumeTally > > &&volume_tallies)
Sets the volume tallies of the simulation.
void initializeVoxelData()
Initializes the voxel data for a thread. Exists since omp_max_num_threads() is influenced by previous...
void transportPhoton(Photon &photon)
Transports a photon until an photoelectric interaction occurs or leaves the voxel grid (i....
PhysicsEngine(ComputationalDomain &comp_domain, InteractionData &interaction_data)
Constructor for the PhysicsEngine class.
void addVoxelDataToComputationalDomain()
Takes thread local voxel data and adds it to the computational domain. Should be called after all pho...
double getFreePath(double max_cross_section)
Returns the free path length of the photon.
static void processPhotonOutsideVoxelGrid(Photon &photon)
Processes the domain boundary crossing of a photon by terminating the photon.
bool isDeltaScatter(double cross_section, double max_cross_section)
Checks if the photon undergoes delta scattering or interacts.
std::vector< SurfaceQuantityContainer > getSurfaceQuantityContainers()
Returns the SurfaceQuantityContainers of the simulation.
void addSurfaceTallies(std::vector< std::unique_ptr< SurfaceTally > > &&surface_tallies)
Sets the surface tallies of the simulation.
void updateTempTallyPerPhoton(std::vector< TempSurfaceTallyData > &temp_surface_tally_data_per_photon, std::vector< TempVolumeTallyData > &temp_volume_tally_data_per_photon, TempSurfaceTallyData &temp_surface_tally_data, TempVolumeTallyData &temp_volume_tally_data)
Updates the temporary tallies for the photon.
void processTallies(std::vector< TempSurfaceTallyData > &temp_surface_tally_data_per_photon, std::vector< TempVolumeTallyData > &temp_volume_tally_data_per_photon, std::vector< TempVoxelData > &temp_voxel_data_per_photon)
Processes the tallies for the photon.
std::vector< VolumeQuantityContainer > getVolumeQuantityContainers()
Returns the VolumeQuantityContainers of the simulation.
Struct which represents the temporary data for a surface tally.
Struct which represents the temporary data for a volume tally.