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.
|
A generic tree data structure for spatial partitioning. More...
#include <tree.h>
Classes | |
struct | GetObjectType |
struct | GetObjectType< T, std::void_t< typename T::ObjectType > > |
class | Partitions |
Class to represent partitions for the tree. More... | |
Public Member Functions | |
Life Cycle | |
Tree (IteratorType itPointsBegin, IteratorType itPointsEnd, SizeType BucketSize=1) | |
Construct a new Tree object. More... | |
Tree (IteratorType itPointsBegin, IteratorType itPointsEnd, Partitions Parts) | |
Construct a new Tree object. More... | |
virtual | ~Tree () |
Destructor. More... | |
Operations | |
PointerType | ExistPoint (PointerType const &ThisPoint, CoordinateType const Tolerance=static_cast< CoordinateType >(10.0 *DBL_EPSILON)) |
Check if a point exists in the tree within a given tolerance. More... | |
PointerType | SearchNearestPoint (PointType const &ThisPoint, CoordinateType &rResultDistance) |
Search for the nearest point to a given point. More... | |
PointerType | SearchNearestPoint (PointType const &ThisPoint) |
Search for points within a given radius of a point. More... | |
SizeType | SearchInRadius (PointType const &ThisPoint, CoordinateType Radius, IteratorType Results, DistanceIteratorType ResultsDistances, SizeType MaxNumberOfResults) |
Search for points within a given radius of a point. More... | |
SizeType | SearchInRadius (PointType const &ThisPoint, CoordinateType Radius, IteratorType Results, SizeType MaxNumberOfResults) |
Search for points within a given radius of a point. More... | |
SizeType | SearchInBox (PointType const &MinPointBox, PointType const &MaxPointBox, IteratorType Results, SizeType MaxNumberOfResults) |
Search for points within a given axis-aligned box. More... | |
Access | |
PointType & | BoundingBoxLowPoint () |
Get a reference to the low point of the bounding box. More... | |
PointType & | BoundingBoxHighPoint () |
Get a reference to the high point of the bounding box. More... | |
BoundingBox< PointType > & | GetBoundingBox () |
Get the bounding box. More... | |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream, std::string const &Perfix=std::string()) const |
Print object's data. More... | |
Type Definitions | |
using | PartitionType = TPartitionType |
The partition type definition. More... | |
using | LeafType = typename PartitionType::LeafType |
The leaf type definition. More... | |
using | PointType = typename PartitionType::PointType |
The point type definition. More... | |
using | IteratorType = typename PartitionType::IteratorType |
The iterator type definition. More... | |
using | ObjectType = typename GetObjectType< PointType >::type |
The object type. More... | |
using | DistanceIteratorType = typename PartitionType::DistanceIteratorType |
The distance iterator type definition. More... | |
using | PointerType = typename PartitionType::PointerType |
The pointer type definition. More... | |
using | DistanceFunction = typename PartitionType::DistanceFunction |
The distance function type definition. More... | |
using | NodeType = TreeNode< Dimension, PointType, PointerType, IteratorType, DistanceIteratorType > |
The node type definition. More... | |
using | CoordinateType = typename NodeType::CoordinateType |
The coordinate type definition. More... | |
using | SizeType = typename NodeType::SizeType |
The size type definition. More... | |
using | IndexType = typename NodeType::IndexType |
The index type definition. More... | |
using | SearchStructureType = typename PartitionType::SearchStructureType |
The search structure type definition. More... | |
static constexpr std::size_t | Dimension = PartitionType::Dimension |
Dimension definition. More... | |
KRATOS_CLASS_POINTER_DEFINITION (Tree) | |
Pointer definition of Tree. More... | |
A generic tree data structure for spatial partitioning.
This class implements a generic tree data structure for spatial partitioning.
TPartitionType | The partitioning strategy type. |
using Kratos::Tree< TPartitionType >::CoordinateType = typename NodeType::CoordinateType |
The coordinate type definition.
using Kratos::Tree< TPartitionType >::DistanceFunction = typename PartitionType::DistanceFunction |
The distance function type definition.
using Kratos::Tree< TPartitionType >::DistanceIteratorType = typename PartitionType::DistanceIteratorType |
The distance iterator type definition.
using Kratos::Tree< TPartitionType >::IndexType = typename NodeType::IndexType |
The index type definition.
using Kratos::Tree< TPartitionType >::IteratorType = typename PartitionType::IteratorType |
The iterator type definition.
using Kratos::Tree< TPartitionType >::LeafType = typename PartitionType::LeafType |
The leaf type definition.
using Kratos::Tree< TPartitionType >::NodeType = TreeNode<Dimension,PointType,PointerType,IteratorType,DistanceIteratorType> |
The node type definition.
using Kratos::Tree< TPartitionType >::ObjectType = typename GetObjectType<PointType>::type |
The object type.
using Kratos::Tree< TPartitionType >::PartitionType = TPartitionType |
The partition type definition.
using Kratos::Tree< TPartitionType >::PointerType = typename PartitionType::PointerType |
The pointer type definition.
using Kratos::Tree< TPartitionType >::PointType = typename PartitionType::PointType |
The point type definition.
using Kratos::Tree< TPartitionType >::SearchStructureType = typename PartitionType::SearchStructureType |
The search structure type definition.
using Kratos::Tree< TPartitionType >::SizeType = typename NodeType::SizeType |
The size type definition.
|
inline |
Construct a new Tree object.
itPointsBegin | Iterator to the first point |
itPointsEnd | Iterator to the last point |
BucketSize | Size of the bucket |
|
inline |
Construct a new Tree object.
itPointsBegin | Iterator to the first point |
itPointsEnd | Iterator to the last point |
Parts | The partitions definition |
|
inlinevirtual |
Destructor.
|
inline |
Get a reference to the high point of the bounding box.
|
inline |
Get a reference to the low point of the bounding box.
|
inline |
Check if a point exists in the tree within a given tolerance.
ThisPoint | The point to check. |
Tolerance | The tolerance for proximity check. |
|
inline |
Get the bounding box.
This function creates a bounding box using the low and high points and returns it.
|
inlinevirtual |
Turn back information as a string.
Kratos::Tree< TPartitionType >::KRATOS_CLASS_POINTER_DEFINITION | ( | Tree< TPartitionType > | ) |
Pointer definition of Tree.
|
inlinevirtual |
Print object's data.
|
inlinevirtual |
Print information about this object.
|
inline |
Search for points within a given axis-aligned box.
MinPointBox | The minimum point of the bounding box. |
MaxPointBox | The maximum point of the bounding box. |
Results | Iterator to store the found points. |
MaxNumberOfResults | Maximum number of results to return. |
|
inline |
Search for points within a given radius of a point.
ThisPoint | The center point. |
Radius | The search radius. |
Results | Iterator to store the found points. |
ResultsDistances | Iterator to store the distances to found points. |
MaxNumberOfResults | Maximum number of results to return. |
|
inline |
Search for points within a given radius of a point.
ThisPoint | The center point. |
Radius | The search radius. |
Results | Iterator to store the found points. |
MaxNumberOfResults | Maximum number of results to return. |
|
inline |
Search for points within a given radius of a point.
ThisPoint | The center point. |
Radius | The search radius. |
Results | Iterator to store the found points. |
ResultsDistances | Iterator to store the distances to found points. |
MaxNumberOfResults | Maximum number of results to return. |
|
inline |
Search for the nearest point to a given point.
ThisPoint | The point for which to find the nearest point. |
|
staticconstexpr |
Dimension definition.