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.
Public Attributes | List of all members
Kratos::BinBasedFastPointLocator< TDim, TConfigureType > Class Template Reference

This class is designed to allow the fast location of MANY points on the top of a 3D mesh. More...

#include <binbased_fast_point_locator.h>

Collaboration diagram for Kratos::BinBasedFastPointLocator< TDim, TConfigureType >:

Public Member Functions

Life Cycle
 BinBasedFastPointLocator (ModelPart &rModelPart)
 This is the default constructor. More...
 
virtual ~BinBasedFastPointLocator ()=default
 Destructor. More...
 
 BinBasedFastPointLocator (BinBasedFastPointLocator const &rOther)
 Copy constructor. More...
 

Static Public Member Functions

Private Operations
static void GetContainer (ModelPart &rModelPart, PointerVectorSet< Element, IndexedObject >::ContainerType &rContainerArray)
 This operation is defined to the the corresponding container type. More...
 
static void GetContainer (ModelPart &rModelPart, PointerVectorSet< Condition, IndexedObject >::ContainerType &rContainerArray)
 This operation is defined to the the corresponding container type. More...
 

Public Attributes

array_1d< double, TDim+1 > EntityType::Pointer ResultIteratorType const SizeType const double Tolerance
 
BinsType::Pointer mpBinsObjectDynamic
 The model part containing the mesh for the search. More...
 

Type Definitions

typedef TConfigureType ConfigureType
 The configure type. More...
 
typedef ConfigureType::PointType PointType
 The definition of the different containers. More...
 
typedef ConfigureType::EntityType EntityType
 
typedef ConfigureType::ContainerType ContainerType
 
typedef ConfigureType::IteratorType IteratorType
 
typedef ConfigureType::ResultContainerType ResultContainerType
 
typedef ConfigureType::ResultIteratorType ResultIteratorType
 
typedef BinsObjectDynamic< ConfigureTypeBinsType
 
typedef BinsObjectDynamic< ConfigureType >::CoordinateType BinsCoordinateType
 
typedef BinsObjectDynamic< ConfigureType >::PointType BinsPointType
 
typedef Node NodeType
 The definition of the node. More...
 
typedef Geometry< NodeTypeGeometryType
 The definition of the geometry. More...
 
typedef std::size_t SizeType
 The size definition. More...
 
typedef std::size_t IndexType
 The index definition. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (BinBasedFastPointLocator)
 Pointer definition of BinBasedFastPointLocator. More...
 

Operations

rCoordinates
 
array_1d< double, TDim+1 > & rNShapeFunction
 
array_1d< double, TDim+1 > EntityType::Pointer & pEntity
 
array_1d< double, TDim+1 > EntityType::Pointer ResultIteratorType ItResultBegin
 
array_1d< double, TDim+1 > EntityType::Pointer ResultIteratorType const SizeType MaxNumberOfResults = 1000
 
void UpdateSearchDatabase ()
 Function to construct or update the search database. More...
 
void UpdateSearchDatabaseAssignedSize (const BinsCoordinateType CellSize)
 Function to construct or update the search database. More...
 
 KRATOS_DEPRECATED_MESSAGE ("This is legacy version (using array instead of vector for shape function)") bool FindPointOnMesh(const array_1d< double
 This function should find the element into which a given node is located and return a pointer to the element and the vector containing the shape functions that define the postion within the element. More...
 

Detailed Description

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
class Kratos::BinBasedFastPointLocator< TDim, TConfigureType >

This class is designed to allow the fast location of MANY points on the top of a 3D mesh.

The utility relies on the creation of a Bin of objects that allows finding quikly a reduced number of element candidates for the location of a point. The basic idea is to allow finding the element in which a given spatial position sits The user should call the function "UpdateSearchDatabase" to mount the bin and subsequently locate the points as needed

Author
Riccardo Rossi rross.nosp@m.i@ci.nosp@m.mne.u.nosp@m.pc.e.nosp@m.du
Note
The location function is threadsafe, and can be used in OpenMP loops
Template Parameters
TDimIf we work in a 2D or 3D space
TConfigureTypeThe spatial container

Member Typedef Documentation

◆ BinsCoordinateType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef BinsObjectDynamic<ConfigureType>::CoordinateType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::BinsCoordinateType

◆ BinsPointType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef BinsObjectDynamic<ConfigureType>::PointType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::BinsPointType

◆ BinsType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef BinsObjectDynamic<ConfigureType> Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::BinsType

◆ ConfigureType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef TConfigureType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::ConfigureType

The configure type.

◆ ContainerType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef ConfigureType::ContainerType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::ContainerType

◆ EntityType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef ConfigureType::EntityType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::EntityType

◆ GeometryType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef Geometry<NodeType> Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::GeometryType

The definition of the geometry.

◆ IndexType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef std::size_t Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::IndexType

The index definition.

◆ IteratorType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef ConfigureType::IteratorType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::IteratorType

◆ NodeType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef Node Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::NodeType

The definition of the node.

◆ PointType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef ConfigureType::PointType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::PointType

The definition of the different containers.

◆ ResultContainerType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef ConfigureType::ResultContainerType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::ResultContainerType

◆ ResultIteratorType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef ConfigureType::ResultIteratorType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::ResultIteratorType

◆ SizeType

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
typedef std::size_t Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::SizeType

The size definition.

Constructor & Destructor Documentation

◆ BinBasedFastPointLocator() [1/2]

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::BinBasedFastPointLocator ( ModelPart rModelPart)
inlineexplicit

This is the default constructor.

Parameters
rModelPartThe model part of the mesh used in the search

◆ ~BinBasedFastPointLocator()

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
virtual Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::~BinBasedFastPointLocator ( )
virtualdefault

Destructor.

◆ BinBasedFastPointLocator() [2/2]

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::BinBasedFastPointLocator ( BinBasedFastPointLocator< TDim, TConfigureType > const &  rOther)
inline

Copy constructor.

Member Function Documentation

◆ GetContainer() [1/2]

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
static void Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::GetContainer ( ModelPart rModelPart,
PointerVectorSet< Condition, IndexedObject >::ContainerType rContainerArray 
)
inlinestatic

This operation is defined to the the corresponding container type.

Parameters
rModelPartThe model part to get the condition container
Thecorresponding condition array

◆ GetContainer() [2/2]

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
static void Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::GetContainer ( ModelPart rModelPart,
PointerVectorSet< Element, IndexedObject >::ContainerType rContainerArray 
)
inlinestatic

This operation is defined to the the corresponding container type.

Parameters
rModelPartThe model part to get the element container
Thecorresponding element array

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::KRATOS_CLASS_POINTER_DEFINITION ( BinBasedFastPointLocator< TDim, TConfigureType >  )

Pointer definition of BinBasedFastPointLocator.

◆ KRATOS_DEPRECATED_MESSAGE()

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::KRATOS_DEPRECATED_MESSAGE ( "This is legacy version (using array instead of vector for shape function)"  ) const

This function should find the element into which a given node is located and return a pointer to the element and the vector containing the shape functions that define the postion within the element.

Parameters
rCoordinatesThe vector containign the coordinates of the point to be searched
rNShapeFunctionThe vector containing the shape function of the located point
pEntityThe pointer to the element containing the located point
ItResultBeginThe iterator of the search
MaxNumberOfResultsThe max number of results to be considered
ToleranceThe tolerance considered on the search
Returns
If "false" is devolved the element is not found
Note
this function is threadsafe and can be used within OpenMP loops
Warning
This is legacy version (using array instead of vector for shape function)

◆ UpdateSearchDatabase()

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
void Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::UpdateSearchDatabase ( )
inline

Function to construct or update the search database.

◆ UpdateSearchDatabaseAssignedSize()

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
void Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::UpdateSearchDatabaseAssignedSize ( const BinsCoordinateType  CellSize)
inline

Function to construct or update the search database.

Parameters
CellSizeThe current size of the cell used for search

Member Data Documentation

◆ ItResultBegin

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
array_1d<double, TDim + 1 > EntityType::Pointer ResultIteratorType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::ItResultBegin

◆ MaxNumberOfResults

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
array_1d<double, TDim + 1 > EntityType::Pointer ResultIteratorType const SizeType Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::MaxNumberOfResults = 1000

◆ mpBinsObjectDynamic

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
BinsType::Pointer Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::mpBinsObjectDynamic

The model part containing the mesh for the search.

◆ pEntity

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
array_1d<double, TDim + 1 > EntityType::Pointer& Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::pEntity

◆ rCoordinates

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
& Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::rCoordinates

◆ rNShapeFunction

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
array_1d<double, TDim + 1 >& Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::rNShapeFunction

◆ Tolerance

template<SizeType TDim, class TConfigureType = SpatialContainersConfigure<TDim>>
array_1d<double, TDim + 1 > EntityType::Pointer ResultIteratorType const SizeType const double Kratos::BinBasedFastPointLocator< TDim, TConfigureType >::Tolerance

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