\doxysection{Raytracer\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{class_raytracer}{}\label{class_raytracer}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}


A class that simulates ray tracing through a surface and gas environment.  




{\ttfamily \#include $<$Raytracer.\+h$>$}

\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_raytracer_a61a672333819291367de3774d6d7146a}{Raytracer}} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_raytracer_a185e9f9feba55b058d3482d214b72b75}{Raytracer}} (\mbox{\hyperlink{class_surface}{Surface}}$<$ T $>$ surface, \mbox{\hyperlink{class_gas}{Gas}}$<$ T $>$ gas, void(\texorpdfstring{$\ast$}{*}local\+\_\+kernel)(T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}), \mbox{\hyperlink{class_matrix}{Matrix}}$<$ T $>$ incident\+\_\+velocity, unsigned long num\+\_\+particles, std\+::string sim\+\_\+name)
\begin{DoxyCompactList}\small\item\em Parameterized constructor for the \doxylink{class_raytracer}{Raytracer} class. \end{DoxyCompactList}\item 
\Hypertarget{class_raytracer_af96b71478f69c8e418e54e6b00c899c1}\label{class_raytracer_af96b71478f69c8e418e54e6b00c899c1} 
{\bfseries \texorpdfstring{$\sim$}{\string~}\+Raytracer} ()
\begin{DoxyCompactList}\small\item\em Destructor for the \doxylink{class_raytracer}{Raytracer} class. \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{structtrajectory}{trajectory}}$<$ T $>$ $>$ \mbox{\hyperlink{class_raytracer_a7abf90f0fa44bd936dc370b264de137a}{simulate}} ()
\begin{DoxyCompactList}\small\item\em Simulates ray tracing and generates ray trajectories. \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{structtrajectory}{trajectory}}$<$ T $>$ $>$ \mbox{\hyperlink{class_raytracer_acccb8cdfb07917d0b7fd0b37045ee847}{import\+\_\+data}} (std\+::string filename)
\begin{DoxyCompactList}\small\item\em Imports trajectory data from a file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_raytracer_a3ea58c978b74c06cc9c5a51b67e74e0b}{save}} (std\+::vector$<$ \mbox{\hyperlink{structtrajectory}{trajectory}}$<$ T $>$ $>$ trajectories, std\+::string filename)
\begin{DoxyCompactList}\small\item\em Saves the simulated trajectories to a file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_raytracer_a1d9e2848566aa6be8afc97fcbbbde7e5}{combine\+\_\+files}} (std\+::string filename, int num\+\_\+procs)
\begin{DoxyCompactList}\small\item\em Combines output files from multiple processes into a single file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_raytracer_a903705d5c8472a4c6ac6dce9cea69eb7}{set\+\_\+num\+\_\+particles}} (unsigned long num\+\_\+particles)
\begin{DoxyCompactList}\small\item\em Sets the number of particles to simulate. \end{DoxyCompactList}\item 
std\+::string \& \mbox{\hyperlink{class_raytracer_ab892a900767cdded428146d0f18e9829}{get\+\_\+sim\+\_\+name}} ()
\begin{DoxyCompactList}\small\item\em Retrieves the name of the simulation. \end{DoxyCompactList}\item 
unsigned long \mbox{\hyperlink{class_raytracer_a6ab154fab889b7e57a9faeaf304089ff}{get\+\_\+num\+\_\+particles}} ()
\begin{DoxyCompactList}\small\item\em Retrieves the number of particles in the simulation. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename T$>$\newline
class Raytracer$<$ T $>$}
A class that simulates ray tracing through a surface and gas environment. 

The \doxylink{class_raytracer}{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.


\begin{DoxyTemplParams}{Template Parameters}
{\em T} & Type parameter for numerical data (typically float or double). \\
\hline
\end{DoxyTemplParams}


\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{class_raytracer_a61a672333819291367de3774d6d7146a}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!Raytracer@{Raytracer}}
\index{Raytracer@{Raytracer}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{Raytracer()}{Raytracer()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{class_raytracer_a61a672333819291367de3774d6d7146a} 
template$<$typename T $>$ \\
\mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\mbox{\hyperlink{class_raytracer}{\+::\+Raytracer}} (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor. 

Initializes the \doxylink{class_raytracer}{Raytracer} class with default values. \Hypertarget{class_raytracer_a185e9f9feba55b058d3482d214b72b75}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!Raytracer@{Raytracer}}
\index{Raytracer@{Raytracer}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{Raytracer()}{Raytracer()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{class_raytracer_a185e9f9feba55b058d3482d214b72b75} 
template$<$typename T $>$ \\
\mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\mbox{\hyperlink{class_raytracer}{\+::\+Raytracer}} (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_surface}{Surface}}$<$ T $>$}]{surface}{, }\item[{\mbox{\hyperlink{class_gas}{Gas}}$<$ T $>$}]{gas}{, }\item[{void(\texorpdfstring{$\ast$}{*}}]{local\+\_\+kernel~}{)(T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}, T \texorpdfstring{$\ast$}{*}), }\item[{\mbox{\hyperlink{class_matrix}{Matrix}}$<$ T $>$}]{incident\+\_\+velocity}{, }\item[{unsigned long}]{num\+\_\+particles}{, }\item[{std\+::string}]{sim\+\_\+name}{}\end{DoxyParamCaption})}



Parameterized constructor for the \doxylink{class_raytracer}{Raytracer} class. 

Initializes the raytracer class with a surface, gas type, local kernel, incident particle velocity, number of particles, and a simulation name.


\begin{DoxyParams}{Parameters}
{\em surface} & The surface object used by the simulation. \\
\hline
{\em gas} & The gas object used by the simulation. \\
\hline
{\em local\+\_\+kernel} & The kernel describing the local dynamics of the gas-\/surface interaction. \\
\hline
{\em incident\+\_\+velocity} & The incident velocity vector. \\
\hline
{\em num\+\_\+particles} & The total number of rays to be simulated. \\
\hline
{\em sim\+\_\+name} & Name of the simulation. \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\Hypertarget{class_raytracer_a1d9e2848566aa6be8afc97fcbbbde7e5}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!combine\_files@{combine\_files}}
\index{combine\_files@{combine\_files}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{combine\_files()}{combine\_files()}}
{\footnotesize\ttfamily \label{class_raytracer_a1d9e2848566aa6be8afc97fcbbbde7e5} 
template$<$typename T $>$ \\
void \mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\+::combine\+\_\+files (\begin{DoxyParamCaption}\item[{std\+::string}]{filename}{, }\item[{int}]{num\+\_\+procs}{}\end{DoxyParamCaption})}



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.


\begin{DoxyParams}{Parameters}
{\em filename} & The base name of the files to combine. \\
\hline
{\em num\+\_\+procs} & The number of processes (files) to combine. \\
\hline
\end{DoxyParams}
\Hypertarget{class_raytracer_a6ab154fab889b7e57a9faeaf304089ff}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!get\_num\_particles@{get\_num\_particles}}
\index{get\_num\_particles@{get\_num\_particles}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{get\_num\_particles()}{get\_num\_particles()}}
{\footnotesize\ttfamily \label{class_raytracer_a6ab154fab889b7e57a9faeaf304089ff} 
template$<$typename T $>$ \\
unsigned long \mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\+::get\+\_\+num\+\_\+particles (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Retrieves the number of particles in the simulation. 

\begin{DoxyReturn}{Returns}
The number of particles to be simulated. 
\end{DoxyReturn}
\Hypertarget{class_raytracer_ab892a900767cdded428146d0f18e9829}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!get\_sim\_name@{get\_sim\_name}}
\index{get\_sim\_name@{get\_sim\_name}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{get\_sim\_name()}{get\_sim\_name()}}
{\footnotesize\ttfamily \label{class_raytracer_ab892a900767cdded428146d0f18e9829} 
template$<$typename T $>$ \\
std\+::string \& \mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\+::get\+\_\+sim\+\_\+name (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Retrieves the name of the simulation. 

\begin{DoxyReturn}{Returns}
A reference to the simulation name. 
\end{DoxyReturn}
\Hypertarget{class_raytracer_acccb8cdfb07917d0b7fd0b37045ee847}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!import\_data@{import\_data}}
\index{import\_data@{import\_data}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{import\_data()}{import\_data()}}
{\footnotesize\ttfamily \label{class_raytracer_acccb8cdfb07917d0b7fd0b37045ee847} 
template$<$typename T $>$ \\
std\+::vector$<$ \mbox{\hyperlink{structtrajectory}{trajectory}}$<$ T $>$ $>$ \mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\+::import\+\_\+data (\begin{DoxyParamCaption}\item[{std\+::string}]{filename}{}\end{DoxyParamCaption})}



Imports trajectory data from a file. 

Reads simulation data from the specified file and returns the corresponding particle trajectories.


\begin{DoxyParams}{Parameters}
{\em filename} & The name of the file containing trajectory data. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A vector of imported trajectories. 
\end{DoxyReturn}
\Hypertarget{class_raytracer_a3ea58c978b74c06cc9c5a51b67e74e0b}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!save@{save}}
\index{save@{save}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{save()}{save()}}
{\footnotesize\ttfamily \label{class_raytracer_a3ea58c978b74c06cc9c5a51b67e74e0b} 
template$<$typename T $>$ \\
void \mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\+::save (\begin{DoxyParamCaption}\item[{std\+::vector$<$ \mbox{\hyperlink{structtrajectory}{trajectory}}$<$ T $>$ $>$}]{trajectories}{, }\item[{std\+::string}]{filename}{}\end{DoxyParamCaption})}



Saves the simulated trajectories to a file. 

This method saves the positions and velocities of each particle to the specified file.


\begin{DoxyParams}{Parameters}
{\em trajectories} & The vector of particle trajectories to be saved. \\
\hline
{\em filename} & The name of the file to save the data. \\
\hline
\end{DoxyParams}
\Hypertarget{class_raytracer_a903705d5c8472a4c6ac6dce9cea69eb7}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!set\_num\_particles@{set\_num\_particles}}
\index{set\_num\_particles@{set\_num\_particles}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{set\_num\_particles()}{set\_num\_particles()}}
{\footnotesize\ttfamily \label{class_raytracer_a903705d5c8472a4c6ac6dce9cea69eb7} 
template$<$typename T $>$ \\
void \mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\+::set\+\_\+num\+\_\+particles (\begin{DoxyParamCaption}\item[{unsigned long}]{num\+\_\+particles}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the number of particles to simulate. 


\begin{DoxyParams}{Parameters}
{\em num\+\_\+particles} & The number of particles for the simulation. \\
\hline
\end{DoxyParams}
\Hypertarget{class_raytracer_a7abf90f0fa44bd936dc370b264de137a}\index{Raytracer$<$ T $>$@{Raytracer$<$ T $>$}!simulate@{simulate}}
\index{simulate@{simulate}!Raytracer$<$ T $>$@{Raytracer$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{simulate()}{simulate()}}
{\footnotesize\ttfamily \label{class_raytracer_a7abf90f0fa44bd936dc370b264de137a} 
template$<$typename T $>$ \\
std\+::vector$<$ \mbox{\hyperlink{structtrajectory}{trajectory}}$<$ T $>$ $>$ \mbox{\hyperlink{class_raytracer}{Raytracer}}$<$ T $>$\+::simulate (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})}



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.

\begin{DoxyReturn}{Returns}
A vector of trajectories, each containing the positions and velocities of the particles. 
\end{DoxyReturn}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/Raytracer.\+h\end{DoxyCompactItemize}
