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 Types | Public Member Functions | List of all members
Kratos::BinBasedNodesInElementLocator< TDim > Class Template Reference

REMARK: the location function is threadsafe, and can be used in OpenMP loops. More...

#include <binbased_nodes_in_element_locator.h>

Collaboration diagram for Kratos::BinBasedNodesInElementLocator< TDim >:

Public Types

typedef Node PointType
 
typedef Node::Pointer PointTypePointer
 
typedef std::vector< PointType::Pointer > PointVector
 
typedef std::vector< PointType::Pointer >::iterator PointIterator
 
typedef std::vector< doubleDistanceVector
 
typedef std::vector< double >::iterator DistanceIterator
 
typedef Bins< TDim, PointType, PointVector, PointTypePointer, PointIterator, DistanceIteratorStaticBins
 

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (BinBasedNodesInElementLocator)
 
 BinBasedNodesInElementLocator (ModelPart &model_part)
 
 ~BinBasedNodesInElementLocator ()
 
void UpdateSearchDatabase ()
 Function to construct or update the search database. More...
 
void UpdateSearchDatabaseAssignedSize (double CellSize)
 
unsigned int FindNodesInElement (Element::Pointer &pelement, DenseVector< int > &positions, Matrix &Nmat, const unsigned int max_results, PointIterator work_results, DistanceIterator work_distances, Node &work_point)
 function to find all teh nodes of a fixed mesh contained in the elements of a moving mesh More...
 

Detailed Description

template<unsigned int TDim>
class Kratos::BinBasedNodesInElementLocator< TDim >

REMARK: the location function is threadsafe, and can be used in OpenMP loops.

This class is designed to allow the fast location of the nodes of a fixed mesh with respect to a moving mesh. The utility relies on the creation of a static Bin that allows finding quikly the nodes of a fixed mesh that are inside each of the elements of the moving one. After the creation of the "BinBasedNodesInElementLocator", the user should call the function "UpdateSearchDatabase" or"UpdateSearchDatabaseAssignedSize(hmin)" to mount the bin and subsequently locate the points as needed An application of this utility can be found in

Member Typedef Documentation

◆ DistanceIterator

template<unsigned int TDim>
typedef std::vector<double>::iterator Kratos::BinBasedNodesInElementLocator< TDim >::DistanceIterator

◆ DistanceVector

template<unsigned int TDim>
typedef std::vector<double> Kratos::BinBasedNodesInElementLocator< TDim >::DistanceVector

◆ PointIterator

template<unsigned int TDim>
typedef std::vector<PointType::Pointer >::iterator Kratos::BinBasedNodesInElementLocator< TDim >::PointIterator

◆ PointType

template<unsigned int TDim>
typedef Node Kratos::BinBasedNodesInElementLocator< TDim >::PointType

◆ PointTypePointer

template<unsigned int TDim>
typedef Node::Pointer Kratos::BinBasedNodesInElementLocator< TDim >::PointTypePointer

◆ PointVector

template<unsigned int TDim>
typedef std::vector<PointType::Pointer > Kratos::BinBasedNodesInElementLocator< TDim >::PointVector

◆ StaticBins

Constructor & Destructor Documentation

◆ BinBasedNodesInElementLocator()

template<unsigned int TDim>
Kratos::BinBasedNodesInElementLocator< TDim >::BinBasedNodesInElementLocator ( ModelPart model_part)
inline

◆ ~BinBasedNodesInElementLocator()

template<unsigned int TDim>
Kratos::BinBasedNodesInElementLocator< TDim >::~BinBasedNodesInElementLocator ( )
inline

Member Function Documentation

◆ FindNodesInElement()

template<unsigned int TDim>
unsigned int Kratos::BinBasedNodesInElementLocator< TDim >::FindNodesInElement ( Element::Pointer &  pelement,
DenseVector< int > &  positions,
Matrix Nmat,
const unsigned int  max_results,
PointIterator  work_results,
DistanceIterator  work_distances,
Node work_point 
)
inline

function to find all teh nodes of a fixed mesh contained in the elements of a moving mesh

It is called each time a projection from a moving to a fixed mesh is performed using the function of

See also
binbased_projection.h
Parameters
pelementThe pointer to the element to be studied
positionsThe indexes of the relative positions
NmatShape functions
max_resultsMaximum number of results to be searched
work_resultsThe point iterator with the points to be studied
work_distancesThe iterator containing the relative distances
work_pointThe node of study
Returns
counter: The number of iterations needed

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<unsigned int TDim>
Kratos::BinBasedNodesInElementLocator< TDim >::KRATOS_CLASS_POINTER_DEFINITION ( BinBasedNodesInElementLocator< TDim >  )

◆ UpdateSearchDatabase()

template<unsigned int TDim>
void Kratos::BinBasedNodesInElementLocator< TDim >::UpdateSearchDatabase ( )
inline

Function to construct or update the search database.

◆ UpdateSearchDatabaseAssignedSize()

template<unsigned int TDim>
void Kratos::BinBasedNodesInElementLocator< TDim >::UpdateSearchDatabaseAssignedSize ( double  CellSize)
inline

Function to construct or update the search database The cell size is requested as input parameter. This action reduces consideribly the searching procedure. One possibility is to give the dimension of the mesh.

Parameters
CellSizeThe bin cell size

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