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::OctreeBinary< TCellType > Class Template Reference

Short class definition. More...

#include <octree_binary.h>

Collaboration diagram for Kratos::OctreeBinary< TCellType >:

Public Member Functions

Life Cycle
 OctreeBinary ()
 Default constructor. More...
 
 OctreeBinary (const double *NewScaleFactor, const double *NewOffset)
 
virtual ~OctreeBinary ()
 Destructor. More...
 
Operations
void SetBoundingBox (const coordinate_type *Low, const coordinate_type *High)
 
double CalcSizeNormalized (const cell_type *cell) const
 
double CalcMinCellNormalizedSize () const
 
void NormalizeCoordinates (coordinate_type *Coordinates) const
 
void NormalizeCoordinates (const coordinate_type *Coordinates, coordinate_type *NormalizedCoordinates) const
 
void CalculateCoordinateNormalized (const key_type key, coordinate_type &NormalizedCoordinate) const
 
void CalculateCoordinatesNormalized (const key_type *keys, coordinate_type *NormalizedCoordinates) const
 
void CalculateCoordinates (key_type *keys, coordinate_type *ResultCoordinates) const
 
void ScaleBackToOriginalCoordinate (coordinate_type *ThisCoordinates) const
 
void ScaleBackToOriginalCoordinate (const coordinate_type *ThisCoordinates, coordinate_type *ResultCoordinates) const
 
key_type CalcKeyNormalized (coordinate_type coordinate) const
 
void InsertNormalized (coordinate_type *point)
 
void Insert (coordinate_type *point)
 
bool CheckConstrain2To1 () const
 
void Constrain2To1 ()
 
void Constrain2To1New ()
 
void GetLeavesInBoundingBoxNormalized (const double *coord1, const double *coord2, std::vector< cell_type * > &leaves) const
 
bool Collides (const double *Low1, const double *High1, const double *Low2, const double *High2)
 
int GetAllLeavesVector (std::vector< cell_type * > &all_leaves) const
 
cell_typepGetCellNormalized (const coordinate_type *point) const
 
cell_typepGetCell (key_type *keys) const
 
cell_typepGetCell (key_type *keys, std::size_t level) const
 
cell_typepGetLeftCell (const cell_type *p_cell)
 
cell_typepGetLeftCell (cell_type *p_cell, std::size_t level)
 
cell_typepGetRightCell (const cell_type *p_cell)
 
cell_typepGetRightCell (cell_type *p_cell, std::size_t level)
 
cell_typepGetBackCell (const cell_type *p_cell)
 
cell_typepGetBackCell (cell_type *p_cell, std::size_t level)
 
cell_typepGetFrontCell (const cell_type *p_cell)
 
cell_typepGetFrontCell (cell_type *p_cell, std::size_t level)
 
cell_typepGetTopCell (const cell_type *p_cell)
 
cell_typepGetTopCell (cell_type *p_cell, std::size_t level)
 
cell_typepGetBottomCell (const cell_type *p_cell)
 
cell_typepGetBottomCell (cell_type *p_cell, std::size_t level)
 
cell_typepGetNeighbourCell (const cell_type *p_cell, std::size_t direction)
 
cell_typepGetNeighbourCell (cell_type *p_cell, std::size_t position, std::size_t direction)
 
int SubdivideCell (cell_type *p_cell)
 
int SubvidiveUntilSizeNormalized (double *coord, const double desired_size)
 
int RefineWithUniformSizeNormalized (const double uniform_size)
 
void InsertNormalized (typename cell_type::pointer_type object)
 
void Insert (typename cell_type::pointer_type object)
 
void GetIntersectedLeaves (typename cell_type::pointer_type pObject, std::vector< cell_type * > &rLeaves, const double ToleranceCoefficient=0.001)
 This method fills the intersected leaves. More...
 
bool IsIntersected (typename cell_type::pointer_type rObject, double Tolerance, const double *rLowPoint, const double *rHighPoint)
 
virtual bool HasIntersection (GeometryType &rGeometry, const Point &rLowPoint, const Point &rHighPoint)
 Detect if triangle and box are intersected. More...
 
cell_typepGetCellContainRegion (key_type min_x_key, key_type min_y_key, key_type min_z_key, key_type max_x_key, key_type max_y_key, key_type max_z_key)
 
Access
cell_typepGetRoot ()
 
Input and output
void PrintGiDMesh (std::ostream &rOStream) const
 
double GetCoordinateNormalized (key_type key) const
 
void PrintGiDMeshNew (std::ostream &rOStream) const
 
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) const
 Print object's data. More...
 

Type Definitions

typedef TCellType cell_type
 
typedef cell_type::key_type key_type
 
typedef cell_type::configuration_type configuration_type
 
typedef double coordinate_type
 
typedef Node NodeType
 
typedef Geometry< NodeTypeGeometryType
 
static constexpr std::size_t CHILDREN_NUMBER = cell_type::CHILDREN_NUMBER
 
static constexpr std::size_t DIMENSION = cell_type::DIMENSION
 
static constexpr std::size_t MAX_LEVEL = cell_type::MAX_LEVEL
 
static constexpr std::size_t ROOT_LEVEL = cell_type::ROOT_LEVEL
 
static constexpr std::size_t MIN_LEVEL = cell_type::MIN_LEVEL
 
 KRATOS_CLASS_POINTER_DEFINITION (OctreeBinary)
 Pointer definition of Octree. More...
 

Detailed Description

template<class TCellType>
class Kratos::OctreeBinary< TCellType >

Short class definition.

Detail class definition.

Member Typedef Documentation

◆ cell_type

template<class TCellType >
typedef TCellType Kratos::OctreeBinary< TCellType >::cell_type

◆ configuration_type

template<class TCellType >
typedef cell_type::configuration_type Kratos::OctreeBinary< TCellType >::configuration_type

◆ coordinate_type

template<class TCellType >
typedef double Kratos::OctreeBinary< TCellType >::coordinate_type

◆ GeometryType

template<class TCellType >
typedef Geometry<NodeType> Kratos::OctreeBinary< TCellType >::GeometryType

◆ key_type

template<class TCellType >
typedef cell_type::key_type Kratos::OctreeBinary< TCellType >::key_type

◆ NodeType

template<class TCellType >
typedef Node Kratos::OctreeBinary< TCellType >::NodeType

Constructor & Destructor Documentation

◆ OctreeBinary() [1/2]

template<class TCellType >
Kratos::OctreeBinary< TCellType >::OctreeBinary ( )
inline

Default constructor.

◆ OctreeBinary() [2/2]

template<class TCellType >
Kratos::OctreeBinary< TCellType >::OctreeBinary ( const double NewScaleFactor,
const double NewOffset 
)
inline

◆ ~OctreeBinary()

template<class TCellType >
virtual Kratos::OctreeBinary< TCellType >::~OctreeBinary ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ CalcKeyNormalized()

template<class TCellType >
key_type Kratos::OctreeBinary< TCellType >::CalcKeyNormalized ( coordinate_type  coordinate) const
inline

◆ CalcMinCellNormalizedSize()

template<class TCellType >
double Kratos::OctreeBinary< TCellType >::CalcMinCellNormalizedSize ( ) const
inline

◆ CalcSizeNormalized()

template<class TCellType >
double Kratos::OctreeBinary< TCellType >::CalcSizeNormalized ( const cell_type cell) const
inline

◆ CalculateCoordinateNormalized()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::CalculateCoordinateNormalized ( const key_type  key,
coordinate_type NormalizedCoordinate 
) const
inline

◆ CalculateCoordinates()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::CalculateCoordinates ( key_type keys,
coordinate_type ResultCoordinates 
) const
inline

◆ CalculateCoordinatesNormalized()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::CalculateCoordinatesNormalized ( const key_type keys,
coordinate_type NormalizedCoordinates 
) const
inline

◆ CheckConstrain2To1()

template<class TCellType >
bool Kratos::OctreeBinary< TCellType >::CheckConstrain2To1 ( ) const
inline

◆ Collides()

template<class TCellType >
bool Kratos::OctreeBinary< TCellType >::Collides ( const double Low1,
const double High1,
const double Low2,
const double High2 
)
inline

◆ Constrain2To1()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::Constrain2To1 ( )
inline

◆ Constrain2To1New()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::Constrain2To1New ( )
inline

◆ GetAllLeavesVector()

template<class TCellType >
int Kratos::OctreeBinary< TCellType >::GetAllLeavesVector ( std::vector< cell_type * > &  all_leaves) const
inline

◆ GetCoordinateNormalized()

template<class TCellType >
double Kratos::OctreeBinary< TCellType >::GetCoordinateNormalized ( key_type  key) const
inline

◆ GetIntersectedLeaves()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::GetIntersectedLeaves ( typename cell_type::pointer_type  pObject,
std::vector< cell_type * > &  rLeaves,
const double  ToleranceCoefficient = 0.001 
)
inline

This method fills the intersected leaves.

Parameters
pObjectPointer to the object of interest containing the geometry to check the intersection
rLeavesLeaves to be filled for search
ToleranceCoefficientThe proportion of the minimal size to compute the tolerance (0.1% of the min size by default)

◆ GetLeavesInBoundingBoxNormalized()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::GetLeavesInBoundingBoxNormalized ( const double coord1,
const double coord2,
std::vector< cell_type * > &  leaves 
) const
inline

◆ HasIntersection()

template<class TCellType >
virtual bool Kratos::OctreeBinary< TCellType >::HasIntersection ( GeometryType rGeometry,
const Point rLowPoint,
const Point rHighPoint 
)
inlinevirtual

Detect if triangle and box are intersected.

◆ Info()

template<class TCellType >
virtual std::string Kratos::OctreeBinary< TCellType >::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ Insert() [1/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::Insert ( coordinate_type point)
inline

◆ Insert() [2/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::Insert ( typename cell_type::pointer_type  object)
inline

◆ InsertNormalized() [1/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::InsertNormalized ( coordinate_type point)
inline

◆ InsertNormalized() [2/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::InsertNormalized ( typename cell_type::pointer_type  object)
inline

◆ IsIntersected()

template<class TCellType >
bool Kratos::OctreeBinary< TCellType >::IsIntersected ( typename cell_type::pointer_type  rObject,
double  Tolerance,
const double rLowPoint,
const double rHighPoint 
)
inline

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TCellType >
Kratos::OctreeBinary< TCellType >::KRATOS_CLASS_POINTER_DEFINITION ( OctreeBinary< TCellType >  )

Pointer definition of Octree.

◆ NormalizeCoordinates() [1/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::NormalizeCoordinates ( const coordinate_type Coordinates,
coordinate_type NormalizedCoordinates 
) const
inline

◆ NormalizeCoordinates() [2/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::NormalizeCoordinates ( coordinate_type Coordinates) const
inline

◆ pGetBackCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetBackCell ( cell_type p_cell,
std::size_t  level 
)
inline

◆ pGetBackCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetBackCell ( const cell_type p_cell)
inline

◆ pGetBottomCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetBottomCell ( cell_type p_cell,
std::size_t  level 
)
inline

◆ pGetBottomCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetBottomCell ( const cell_type p_cell)
inline

◆ pGetCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetCell ( key_type keys) const
inline

◆ pGetCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetCell ( key_type keys,
std::size_t  level 
) const
inline

◆ pGetCellContainRegion()

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetCellContainRegion ( key_type  min_x_key,
key_type  min_y_key,
key_type  min_z_key,
key_type  max_x_key,
key_type  max_y_key,
key_type  max_z_key 
)
inline

◆ pGetCellNormalized()

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetCellNormalized ( const coordinate_type point) const
inline

◆ pGetFrontCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetFrontCell ( cell_type p_cell,
std::size_t  level 
)
inline

◆ pGetFrontCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetFrontCell ( const cell_type p_cell)
inline

◆ pGetLeftCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetLeftCell ( cell_type p_cell,
std::size_t  level 
)
inline

◆ pGetLeftCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetLeftCell ( const cell_type p_cell)
inline

◆ pGetNeighbourCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetNeighbourCell ( cell_type p_cell,
std::size_t  position,
std::size_t  direction 
)
inline

◆ pGetNeighbourCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetNeighbourCell ( const cell_type p_cell,
std::size_t  direction 
)
inline

◆ pGetRightCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetRightCell ( cell_type p_cell,
std::size_t  level 
)
inline

◆ pGetRightCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetRightCell ( const cell_type p_cell)
inline

◆ pGetRoot()

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetRoot ( )
inline

◆ pGetTopCell() [1/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetTopCell ( cell_type p_cell,
std::size_t  level 
)
inline

◆ pGetTopCell() [2/2]

template<class TCellType >
cell_type* Kratos::OctreeBinary< TCellType >::pGetTopCell ( const cell_type p_cell)
inline

◆ PrintData()

template<class TCellType >
virtual void Kratos::OctreeBinary< TCellType >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintGiDMesh()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::PrintGiDMesh ( std::ostream &  rOStream) const
inline

◆ PrintGiDMeshNew()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::PrintGiDMeshNew ( std::ostream &  rOStream) const
inline

◆ PrintInfo()

template<class TCellType >
virtual void Kratos::OctreeBinary< TCellType >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ RefineWithUniformSizeNormalized()

template<class TCellType >
int Kratos::OctreeBinary< TCellType >::RefineWithUniformSizeNormalized ( const double  uniform_size)
inline

◆ ScaleBackToOriginalCoordinate() [1/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::ScaleBackToOriginalCoordinate ( const coordinate_type ThisCoordinates,
coordinate_type ResultCoordinates 
) const
inline

◆ ScaleBackToOriginalCoordinate() [2/2]

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::ScaleBackToOriginalCoordinate ( coordinate_type ThisCoordinates) const
inline

◆ SetBoundingBox()

template<class TCellType >
void Kratos::OctreeBinary< TCellType >::SetBoundingBox ( const coordinate_type Low,
const coordinate_type High 
)
inline

◆ SubdivideCell()

template<class TCellType >
int Kratos::OctreeBinary< TCellType >::SubdivideCell ( cell_type p_cell)
inline

◆ SubvidiveUntilSizeNormalized()

template<class TCellType >
int Kratos::OctreeBinary< TCellType >::SubvidiveUntilSizeNormalized ( double coord,
const double  desired_size 
)
inline

Member Data Documentation

◆ CHILDREN_NUMBER

template<class TCellType >
constexpr std::size_t Kratos::OctreeBinary< TCellType >::CHILDREN_NUMBER = cell_type::CHILDREN_NUMBER
staticconstexpr

◆ DIMENSION

template<class TCellType >
constexpr std::size_t Kratos::OctreeBinary< TCellType >::DIMENSION = cell_type::DIMENSION
staticconstexpr

◆ MAX_LEVEL

template<class TCellType >
constexpr std::size_t Kratos::OctreeBinary< TCellType >::MAX_LEVEL = cell_type::MAX_LEVEL
staticconstexpr

◆ MIN_LEVEL

template<class TCellType >
constexpr std::size_t Kratos::OctreeBinary< TCellType >::MIN_LEVEL = cell_type::MIN_LEVEL
staticconstexpr

◆ ROOT_LEVEL

template<class TCellType >
constexpr std::size_t Kratos::OctreeBinary< TCellType >::ROOT_LEVEL = cell_type::ROOT_LEVEL
staticconstexpr

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