OGS
ComputeIntersections.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <vtkType.h>
7#include <vtkUnstructuredGrid.h>
8
9#include <Eigen/Core>
10#include <range/v3/view/enumerate.hpp>
11#include <vector>
12
14
15namespace AU = ApplicationUtils;
16
19{
20 Eigen::Vector3d point;
21 double t; // parameter along the line from p0 to p1, i.e. p = p0 + t*(p1 -
22 // p0) used for sorting
23};
24
36std::vector<std::vector<IntersectionResult>> getOrderedAnchorCoords(
37 vtkUnstructuredGrid* grid,
38 Eigen::MatrixX3d const& realcoords,
39 Eigen::VectorXd const& free_fraction,
40 double const tol);
41
51 std::vector<std::vector<IntersectionResult>> const& anchor_coords,
52 AU::ComputeNaturalCoordsResult const& original_anchor_data);
std::vector< std::vector< IntersectionResult > > getOrderedAnchorCoords(vtkUnstructuredGrid *grid, Eigen::MatrixX3d const &realcoords, Eigen::VectorXd const &free_fraction, double const tol)
Finds intersection points of a line segment with the cells of a vtkUnstructuredGrid....
AU::ComputeNaturalCoordsResult setPhysicalPropertiesForIntersectionPoints(std::vector< std::vector< IntersectionResult > > const &anchor_coords, AU::ComputeNaturalCoordsResult const &original_anchor_data)
fills the physical properties of the intersection points based on the original anchor data.
Result of an intersection of a line with a cell.