KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Tools to calculate the nearest point in different geometries. More...
#include <nearest_point_utilities.h>
Public Member Functions | |
Type Definitions | |
KRATOS_CLASS_POINTER_DEFINITION (NearestPointUtilities) | |
Pointer definition of NearestPointUtilities. More... | |
Life Cycle | |
NearestPointUtilities ()=delete | |
Default constructor. More... | |
NearestPointUtilities (NearestPointUtilities const &rOther)=delete | |
Copy constructor. More... | |
Operators | |
NearestPointUtilities & | operator= (NearestPointUtilities const &rOther)=delete |
Assignment operator. More... | |
Static Public Member Functions | |
Operations | |
template<class TPointType , class TGeometryType > | |
static Point | LineNearestPoint (const TPointType &rPoint, const TGeometryType &rLine) |
Finds the nearest point to the given point on a line segment. More... | |
template<class TPointType , class TGeometryType > | |
static Point | TriangleNearestPoint (const TPointType &rPoint, const TGeometryType &rTriangle) |
Finds the nearest point to the given point on a trianlge. More... | |
Tools to calculate the nearest point in different geometries.
These tools are generic enough to be used in different contexts while used in the geometries
|
delete |
Default constructor.
|
delete |
Copy constructor.
Kratos::NearestPointUtilities::KRATOS_CLASS_POINTER_DEFINITION | ( | NearestPointUtilities | ) |
Pointer definition of NearestPointUtilities.
|
inlinestatic |
Finds the nearest point to the given point on a line segment.
It first projects the point into the line. If the porjceted point is inside the segment boundary it returns the projected point. If not it returns the nearest end point of the line.
Type | of the Point |
TGeometryType | The type of the line. Assumes to have [] access and IsInside method |
rPoint | The query point which we want to get nearest point to it on the line |
rLine | The line in which we want to find the nearest point to rPoint |
|
delete |
Assignment operator.
|
inlinestatic |
Finds the nearest point to the given point on a trianlge.
It first projects the point into the triangle surface. If the porjceted point is inside the triangle it returns the projected point. If not it returns the nearest point on the edges of the triangle. Dividing the plane of the triangle in 7 zones and find the nearest reflecting those zones
\ / \ 6 / \ / \ / /\ / \ 2 / \ 3 / 1 \ / \
_______ /_______________________ / \ 5 / 4 \ 7 / \ / \
Type | of the Point |
TGeometryType | The type of the triangle. Assumes to have [] access and IsInside method |
rPoint | The query point which we want to get nearest point to it on the line |
rTriangle | The triangle in which we want to find the nearest point to rPoint |