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.
List of all members
Kratos::GeometricalProjectionUtilities Class Reference

This is a class that provides auxiliar utilities for projections. More...

#include <geometrical_projection_utilities.h>

Collaboration diagram for Kratos::GeometricalProjectionUtilities:

Public Member Functions

Life Cycle
 GeometricalProjectionUtilities ()=delete
 

Static Public Member Functions

Operations
template<class TGeometryType >
static double FastProjectDirection (const TGeometryType &rGeom, const PointType &rPointToProject, PointType &rPointProjected, const array_1d< double, 3 > &rNormal, const array_1d< double, 3 > &rVector, const SizeType EchoLevel=0)
 Project a point over a line/plane following an arbitrary direction. More...
 
template<class TPointClass1 , class TPointClass2 = TPointClass1, class TPointClass3 = PointType>
static TPointClass3 FastProject (const TPointClass1 &rPointOrigin, const TPointClass2 &rPointToProject, const array_1d< double, 3 > &rNormal, double &rDistance)
 Project a point over a plane (avoiding some steps) More...
 
template<class TGeometryType >
static double FastProjectOnGeometry (const TGeometryType &rGeom, const Point &rPointToProject, PointType &rPointProjected, const SizeType EchoLevel=0)
 Project a point over a line/plane (simplified since using the normal in the center) More...
 
template<class TGeometryType >
static double FastProjectOnLine (const TGeometryType &rGeometry, const PointType &rPointToProject, PointType &rPointProjected)
 Project a point over a line (2D or 3D) More...
 
template<class TGeometryType >
static double FastMinimalDistanceOnLine (const TGeometryType &rGeometry, const PointType &rPoint, const double Tolerance=1.0e-9)
 Computes the minimal distance to a line. More...
 
static DistanceComputed FastMinimalDistanceOnLineWithRadius (double &rDistance, const Geometry< Node > &rSegment, const Point &rPoint, const double Radius, const double Tolerance=1.0e-9)
 Computes the minimal distance to a line with radius contribution. More...
 
template<class TGeometryType , class TPointClass1 , class TPointClass2 = TPointClass1>
static double FastProjectOnLine2D (const TGeometryType &rGeometry, const TPointClass1 &rPointToProject, TPointClass2 &rPointProjected)
 Project a point over a line (2D only) More...
 
template<class TGeometryType >
static bool ProjectIterativeLine2D (TGeometryType &rGeomOrigin, const array_1d< double, 3 > &rPointDestiny, array_1d< double, 3 > &rResultingPoint, const array_1d< double, 3 > &rNormal, const double Tolerance=1.0e-8, double DeltaXi=0.5)
 Projects iteratively to get the coordinate. More...
 

Type Definitions

enum class  DistanceComputed {
  NO_RADIUS , PROJECTION_ERROR , RADIUS_PROJECTED , RADIUS_NOT_PROJECTED_OUTSIDE ,
  RADIUS_NOT_PROJECTED_INSIDE
}
 How the distance is computed enum. More...
 
typedef Node NodeType
 
typedef Point PointType
 
typedef std::size_t IndexType
 Index type definition. More...
 
typedef std::size_t SizeType
 Size type definition. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (GeometricalProjectionUtilities)
 Pointer definition of GeometricalProjectionUtilities. More...
 

Detailed Description

This is a class that provides auxiliar utilities for projections.

This is a class that provides auxiliar utilities for the projections. Check the documentation for more details

Author
Vicente Mataix Ferrandiz

Member Typedef Documentation

◆ IndexType

Index type definition.

◆ NodeType

◆ PointType

◆ SizeType

Size type definition.

Member Enumeration Documentation

◆ DistanceComputed

How the distance is computed enum.

Enumerator
NO_RADIUS 
PROJECTION_ERROR 
RADIUS_PROJECTED 
RADIUS_NOT_PROJECTED_OUTSIDE 
RADIUS_NOT_PROJECTED_INSIDE 

Constructor & Destructor Documentation

◆ GeometricalProjectionUtilities()

Kratos::GeometricalProjectionUtilities::GeometricalProjectionUtilities ( )
delete

Member Function Documentation

◆ FastMinimalDistanceOnLine()

template<class TGeometryType >
static double Kratos::GeometricalProjectionUtilities::FastMinimalDistanceOnLine ( const TGeometryType &  rGeometry,
const PointType rPoint,
const double  Tolerance = 1.0e-9 
)
inlinestatic

Computes the minimal distance to a line.

Projects over a line and if the point projected is inside the line that distance is taken into consideration, otherwise the minimal between the two points in the line is considered

Template Parameters
TGeometryTypeThe type of the line
Parameters
rGeometryThe line where compute the distance
rPointThe point to compute the distance
ToleranceTolerance to check it falls inside the line
Returns
Distance The distance between point and line

◆ FastMinimalDistanceOnLineWithRadius()

GeometricalProjectionUtilities::DistanceComputed Kratos::GeometricalProjectionUtilities::FastMinimalDistanceOnLineWithRadius ( double rDistance,
const Geometry< Node > &  rSegment,
const Point rPoint,
const double  Radius,
const double  Tolerance = 1.0e-9 
)
static

Computes the minimal distance to a line with radius contribution.

Projects over a line and if the point projected is inside the line that distance is taken into consideration, otherwise the minimal between the two points in the line is considered

Parameters
rDistanceThe distance
rSegmentThe line segment
rPointThe point to compute distance
RadiusThe radius
ToleranceTolerance to check it falls inside the line
Returns
The Distance computation type

◆ FastProject()

template<class TPointClass1 , class TPointClass2 = TPointClass1, class TPointClass3 = PointType>
static TPointClass3 Kratos::GeometricalProjectionUtilities::FastProject ( const TPointClass1 &  rPointOrigin,
const TPointClass2 &  rPointToProject,
const array_1d< double, 3 > &  rNormal,
double rDistance 
)
inlinestatic

Project a point over a plane (avoiding some steps)

Template Parameters
TPointClass1The type of point (I)
TPointClass2The type of point (II)
TPointClass2The type of point (III)
Parameters
rPointOriginA point in the plane
rPointToProjectThe point to be projected
rNormalThe normal of the plane
rDistanceThe distance to the projection
Returns
PointProjected The point pojected over the plane

◆ FastProjectDirection()

template<class TGeometryType >
static double Kratos::GeometricalProjectionUtilities::FastProjectDirection ( const TGeometryType &  rGeom,
const PointType rPointToProject,
PointType rPointProjected,
const array_1d< double, 3 > &  rNormal,
const array_1d< double, 3 > &  rVector,
const SizeType  EchoLevel = 0 
)
inlinestatic

Project a point over a line/plane following an arbitrary direction.

Template Parameters
TGeometryTypeThe type of the geometry
Parameters
rGeomThe geometry where to be projected
rPointToProjectThe point to be projected
rPointProjectedThe point pojected over the plane
rNormalThe normal of the geometry
rVectorThe direction to project
EchoLevelIf we want debugging info we should consider greater than 0
Returns
Distance The distance between surfaces

◆ FastProjectOnGeometry()

template<class TGeometryType >
static double Kratos::GeometricalProjectionUtilities::FastProjectOnGeometry ( const TGeometryType &  rGeom,
const Point rPointToProject,
PointType rPointProjected,
const SizeType  EchoLevel = 0 
)
inlinestatic

Project a point over a line/plane (simplified since using the normal in the center)

Template Parameters
TGeometryTypeThe type of the geometry
Parameters
rGeomThe geometry where to be projected
rPointToProjectThe point to be projected
rPointProjectedThe point pojected over the line/plane
EchoLevelIf we want debugging info we should consider greater than 0
Returns
Distance The distance between surfaces

◆ FastProjectOnLine()

template<class TGeometryType >
static double Kratos::GeometricalProjectionUtilities::FastProjectOnLine ( const TGeometryType &  rGeometry,
const PointType rPointToProject,
PointType rPointProjected 
)
inlinestatic

Project a point over a line (2D or 3D)

Template Parameters
TGeometryTypeThe type of the line
Parameters
rGeometryThe line where to be projected
rPointToProjectThe point to be projected
rPointProjectedThe point pojected over the line
Returns
Distance The distance between point and line "Method 3 Using Dot Product"

◆ FastProjectOnLine2D()

template<class TGeometryType , class TPointClass1 , class TPointClass2 = TPointClass1>
static double Kratos::GeometricalProjectionUtilities::FastProjectOnLine2D ( const TGeometryType &  rGeometry,
const TPointClass1 &  rPointToProject,
TPointClass2 &  rPointProjected 
)
inlinestatic

Project a point over a line (2D only)

Template Parameters
TGeometryTypeThe type of the line
TPointClass1The type of point (I)
TPointClass2The type of point (II)
Parameters
rGeometryThe line where to be projected
rPointToProjectThe point to be projected
rPointProjectedThe point pojected over the line
Returns
Distance The distance between point and line

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::GeometricalProjectionUtilities::KRATOS_CLASS_POINTER_DEFINITION ( GeometricalProjectionUtilities  )

Pointer definition of GeometricalProjectionUtilities.

◆ ProjectIterativeLine2D()

template<class TGeometryType >
static bool Kratos::GeometricalProjectionUtilities::ProjectIterativeLine2D ( TGeometryType &  rGeomOrigin,
const array_1d< double, 3 > &  rPointDestiny,
array_1d< double, 3 > &  rResultingPoint,
const array_1d< double, 3 > &  rNormal,
const double  Tolerance = 1.0e-8,
double  DeltaXi = 0.5 
)
inlinestatic

Projects iteratively to get the coordinate.

Template Parameters
TGeometryTypeThe type of the geometry
Parameters
rGeomOriginThe origin geometry
rPointDestinyThe destination point
rResultingPointThe distance between the point and the plane
Returns
Inside True is inside, false not

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