![]() |
OGS
|
#include "ComputeIntersections.h"
#include <spdlog/spdlog.h>
#include <vtkCellData.h>
#include <vtkCellLocator.h>
#include <vtkExtractEdges.h>
#include <vtkIdTypeArray.h>
#include <vtkLine.h>
#include "BaseLib/Logging.h"
Go to the source code of this file.
Functions | |
int | GetGridDimension (vtkUnstructuredGrid *grid) |
bool | isPointClose (const Eigen::Vector3d &a, const Eigen::Vector3d &b, double tol) |
bool | compareByT (const IntersectionResult &a, const IntersectionResult &b) |
std::vector< IntersectionResult > | findOrderedIntersections (vtkUnstructuredGrid *grid, Eigen::Vector3d const &p0, Eigen::Vector3d const &p1, const double free_fraction, double const tol) |
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. The line segment is defined by consecutive entries in realcoords. | |
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. |
bool compareByT | ( | const IntersectionResult & | a, |
const IntersectionResult & | b ) |
Definition at line 48 of file ComputeIntersections.cpp.
References IntersectionResult::t.
Referenced by findOrderedIntersections().
std::vector< IntersectionResult > findOrderedIntersections | ( | vtkUnstructuredGrid * | grid, |
Eigen::Vector3d const & | p0, | ||
Eigen::Vector3d const & | p1, | ||
const double | free_fraction, | ||
double const | tol ) |
Definition at line 53 of file ComputeIntersections.cpp.
References compareByT(), GetGridDimension(), INFO(), isPointClose(), IntersectionResult::point, and IntersectionResult::t.
Referenced by getOrderedAnchorCoords().
int GetGridDimension | ( | vtkUnstructuredGrid * | grid | ) |
Definition at line 21 of file ComputeIntersections.cpp.
Referenced by findOrderedIntersections().
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. The line segment is defined by consecutive entries in realcoords.
grid | The vtkUnstructuredGrid to intersect with. |
realcoords | original coordinates of the anchor start and end points. |
free_fraction | The fraction of the line segment to consider for intersections. |
tol | Tolerance for considering points as identical. |
Definition at line 136 of file ComputeIntersections.cpp.
References findOrderedIntersections().
Referenced by main().
bool isPointClose | ( | const Eigen::Vector3d & | a, |
const Eigen::Vector3d & | b, | ||
double | tol ) |
Definition at line 41 of file ComputeIntersections.cpp.
Referenced by findOrderedIntersections().
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.
anchor_coords | The intersection points of the anchors with the bulk mesh. |
original_anchor_data | The original anchor data read from the JSON file. |
Definition at line 155 of file ComputeIntersections.cpp.
References ApplicationUtils::ComputeNaturalCoordsResult::anchor_cross_sectional_area, ApplicationUtils::ComputeNaturalCoordsResult::anchor_stiffness, ApplicationUtils::ComputeNaturalCoordsResult::initial_anchor_stress, ApplicationUtils::ComputeNaturalCoordsResult::maximum_anchor_stress, ApplicationUtils::ComputeNaturalCoordsResult::real_coords, and ApplicationUtils::ComputeNaturalCoordsResult::residual_anchor_stress.
Referenced by main().