|
GSI_Toolbox 1.0.0
A toolbox for Gas-Surface Interaction simulations
|
A class that simulates ray tracing through a surface and gas environment. More...
#include <Raytracer.h>
Public Member Functions | |
| Raytracer () | |
| Default constructor. | |
| Raytracer (Surface< T > surface, Gas< T > gas, void(*local_kernel)(T *, T *, T *, T *, T *), Matrix< T > incident_velocity, unsigned long num_particles, std::string sim_name) | |
| Parameterized constructor for the Raytracer class. | |
| ~Raytracer () | |
| Destructor for the Raytracer class. | |
| std::vector< trajectory< T > > | simulate () |
| Simulates ray tracing and generates ray trajectories. | |
| std::vector< trajectory< T > > | import_data (std::string filename) |
| Imports trajectory data from a file. | |
| void | save (std::vector< trajectory< T > > trajectories, std::string filename) |
| Saves the simulated trajectories to a file. | |
| void | combine_files (std::string filename, int num_procs) |
| Combines output files from multiple processes into a single file. | |
| void | set_num_particles (unsigned long num_particles) |
| Sets the number of particles to simulate. | |
| std::string & | get_sim_name () |
| Retrieves the name of the simulation. | |
| unsigned long | get_num_particles () |
| Retrieves the number of particles in the simulation. | |
A class that simulates ray tracing through a surface and gas environment.
The Raytracer class is responsible for simulating the propagation of particles (rays) through a surface and gas medium, tracking their interactions, and saving the resulting trajectories.
| T | Type parameter for numerical data (typically float or double). |
|
inline |
Default constructor.
Initializes the Raytracer class with default values.
| Raytracer< T >::Raytracer | ( | Surface< T > | surface, |
| Gas< T > | gas, | ||
| void(* | local_kernel )(T *, T *, T *, T *, T *), | ||
| Matrix< T > | incident_velocity, | ||
| unsigned long | num_particles, | ||
| std::string | sim_name ) |
Parameterized constructor for the Raytracer class.
Initializes the raytracer class with a surface, gas type, local kernel, incident particle velocity, number of particles, and a simulation name.
| surface | The surface object used by the simulation. |
| gas | The gas object used by the simulation. |
| local_kernel | The kernel describing the local dynamics of the gas-surface interaction. |
| incident_velocity | The incident velocity vector. |
| num_particles | The total number of rays to be simulated. |
| sim_name | Name of the simulation. |
| void Raytracer< T >::combine_files | ( | std::string | filename, |
| int | num_procs ) |
Combines output files from multiple processes into a single file.
This method is used in parallel simulations to combine partial results from multiple processes into one final output file.
| filename | The base name of the files to combine. |
| num_procs | The number of processes (files) to combine. |
|
inline |
Retrieves the number of particles in the simulation.
|
inline |
Retrieves the name of the simulation.
| std::vector< trajectory< T > > Raytracer< T >::import_data | ( | std::string | filename | ) |
Imports trajectory data from a file.
Reads simulation data from the specified file and returns the corresponding particle trajectories.
| filename | The name of the file containing trajectory data. |
| void Raytracer< T >::save | ( | std::vector< trajectory< T > > | trajectories, |
| std::string | filename ) |
Saves the simulated trajectories to a file.
This method saves the positions and velocities of each particle to the specified file.
| trajectories | The vector of particle trajectories to be saved. |
| filename | The name of the file to save the data. |
|
inline |
Sets the number of particles to simulate.
| num_particles | The number of particles for the simulation. |
| std::vector< trajectory< T > > Raytracer< T >::simulate | ( | ) |
Simulates ray tracing and generates ray trajectories.
This method propagates the rays through the surface and gas medium, tracks their positions and velocities, and returns the trajectories for each particle.