Chi-Tech
chi_mesh::RayTracer Class Reference

#include <raytracing.h>

Public Member Functions

 RayTracer (const chi_mesh::MeshContinuum &grid, std::vector< double > in_cell_sizes, bool in_perform_concavity_checks=true)
 
RayTracerOutputInformation TraceRay (const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, int function_depth=0)
 
RayTracerOutputInformation TraceIncidentRay (const Cell &cell, const Vector3 &pos_i, const Vector3 &omega_i)
 

Private Member Functions

const chi_mesh::MeshContinuumGrid () const
 
void SetTolerancesFromCellSize (double cell_size)
 
void TraceSlab (const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, bool &intersection_found, bool &backward_tolerance_hit, RayTracerOutputInformation &oi)
 
void TracePolygon (const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, bool &intersection_found, bool &backward_tolerance_hit, RayTracerOutputInformation &oi)
 
void TracePolyhedron (const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, bool &intersection_found, bool &backward_tolerance_hit, RayTracerOutputInformation &oi)
 

Private Attributes

const chi_mesh::MeshContinuumreference_grid_
 
std::vector< double > cell_sizes_
 
double epsilon_nudge_ = 1.0e-8
 
double backward_tolerance_ = 1.0e-10
 
double extension_distance_ = 1.0e5
 
bool perform_concavity_checks_ = true
 

Detailed Description

Raytracer object.

Definition at line 21 of file raytracing.h.

Constructor & Destructor Documentation

◆ RayTracer()

chi_mesh::RayTracer::RayTracer ( const chi_mesh::MeshContinuum grid,
std::vector< double >  in_cell_sizes,
bool  in_perform_concavity_checks = true 
)
inlineexplicit

Definition at line 33 of file raytracing.h.

Member Function Documentation

◆ Grid()

const chi_mesh::MeshContinuum & chi_mesh::RayTracer::Grid ( ) const
private

Definition at line 7 of file raytracer.cc.

◆ SetTolerancesFromCellSize()

void chi_mesh::RayTracer::SetTolerancesFromCellSize ( double  cell_size)
inlineprivate

Definition at line 44 of file raytracing.h.

◆ TraceIncidentRay()

chi_mesh::RayTracerOutputInformation chi_mesh::RayTracer::TraceIncidentRay ( const Cell cell,
const Vector3 pos_i,
const Vector3 omega_i 
)

Traces a ray with an initial position, presumed to be outside the cell, to an incident face.

Definition at line 134 of file raytracer.cc.

◆ TracePolygon()

void chi_mesh::RayTracer::TracePolygon ( const Cell cell,
Vector3 pos_i,
Vector3 omega_i,
bool &  intersection_found,
bool &  backward_tolerance_hit,
RayTracerOutputInformation oi 
)
private

Performs raytracing within a 2D Polygon.

Definition at line 8 of file raytracer_2D_polygon.cc.

◆ TracePolyhedron()

void chi_mesh::RayTracer::TracePolyhedron ( const Cell cell,
Vector3 pos_i,
Vector3 omega_i,
bool &  intersection_found,
bool &  backward_tolerance_hit,
RayTracerOutputInformation oi 
)
private

Performs raytracing within a 3D Polyhedron.

Definition at line 8 of file raytracer_3D_polyhedron.cc.

◆ TraceRay()

chi_mesh::RayTracerOutputInformation chi_mesh::RayTracer::TraceRay ( const Cell cell,
Vector3 pos_i,
Vector3 omega_i,
int  function_depth = 0 
)

Traces a ray with an initial position either within the cell or on the cell surface, and with a direction vector pointing inward toward the cell. If the ray-trace fails the particle will be marked as lost.

Definition at line 13 of file raytracer.cc.

◆ TraceSlab()

void chi_mesh::RayTracer::TraceSlab ( const Cell cell,
Vector3 pos_i,
Vector3 omega_i,
bool &  intersection_found,
bool &  backward_tolerance_hit,
RayTracerOutputInformation oi 
)
private

Performs raytracing within a 1D-slab.

Definition at line 8 of file raytracer_1D_slab.cc.

Field Documentation

◆ backward_tolerance_

double chi_mesh::RayTracer::backward_tolerance_ = 1.0e-10
private

Definition at line 27 of file raytracing.h.

◆ cell_sizes_

std::vector<double> chi_mesh::RayTracer::cell_sizes_
private

Definition at line 25 of file raytracing.h.

◆ epsilon_nudge_

double chi_mesh::RayTracer::epsilon_nudge_ = 1.0e-8
private

Definition at line 26 of file raytracing.h.

◆ extension_distance_

double chi_mesh::RayTracer::extension_distance_ = 1.0e5
private

Definition at line 28 of file raytracing.h.

◆ perform_concavity_checks_

bool chi_mesh::RayTracer::perform_concavity_checks_ = true
private

Definition at line 29 of file raytracing.h.

◆ reference_grid_

const chi_mesh::MeshContinuum& chi_mesh::RayTracer::reference_grid_
private

Definition at line 24 of file raytracing.h.


The documentation for this class was generated from the following files: