11 bool& intersection_found,
12 bool& backward_tolerance_hit,
15 const auto& grid =
Grid();
18 const double fabs_mu = std::fabs(omega_i.
Dot(cell.
faces_[0].normal_));
24 std::vector<RayTracerOutputInformation> face_intersections;
26 size_t num_faces = cell.
faces_.size();
27 face_intersections.reserve(num_faces);
28 for (
int f=0; f<num_faces; f++)
30 if (cell.
faces_[f].normal_.Dot(omega_i) < 0.0)
continue;
34 uint64_t fpi = cell.
faces_[f].vertex_ids_[0];
35 uint64_t fpf = cell.
faces_[f].vertex_ids_[1];
40 face_point_i, face_point_f, cell.
faces_[f].normal_,
41 pos_i, pos_f_line, ip);
43 double D = (ip - pos_i).Norm();
52 intersection_found =
true;
53 face_intersections.emplace_back(std::move(face_oi));
57 backward_tolerance_hit =
true;
62 oi = face_intersections.back();
65 auto closest_intersection = &face_intersections.back();
66 for (
auto& intersection : face_intersections)
67 if (intersection.distance_to_surface <
68 closest_intersection->distance_to_surface)
69 closest_intersection = &intersection;
71 oi = *closest_intersection;
std::vector< CellFace > faces_
bool perform_concavity_checks_
double extension_distance_
double backward_tolerance_
void TracePolygon(const Cell &cell, Vector3 &pos_i, Vector3 &omega_i, bool &intersection_found, bool &backward_tolerance_hit, RayTracerOutputInformation &oi)
const chi_mesh::MeshContinuum & Grid() const
bool CheckLineIntersectStrip(const chi_mesh::Vector3 &strip_point0, const chi_mesh::Vector3 &strip_point1, const chi_mesh::Vector3 &strip_normal, const chi_mesh::Vector3 &line_point0, const chi_mesh::Vector3 &line_point1, chi_mesh::Vector3 &intersection_point, double *distance_to_intersection=nullptr)
Vector3 Dot(const chi_mesh::TensorRank2Dim3 &that) const