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::kDOP Class Reference

#include <bounding_volume_tree.h>

Inheritance diagram for Kratos::kDOP:
Collaboration diagram for Kratos::kDOP:

Public Types

typedef Node NodeType
 
typedef Geometry< NodeTypeGeometryType
 
typedef NodeType::PointType PointType
 
typedef const double ArrayType[3]
 
typedef ArrayTypeArray2DType
 

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (kDOP)
 
 kDOP ()
 
virtual ~kDOP ()
 
virtual std::size_t NumberOfDirections () const
 Return the number of directions of the k-DOP. More...
 
void Initialize ()
 Initialize the bounding volume to initial state. More...
 
bool IsInside (const PointType &r_point, double tolerance) const
 
int TestOverlapped (const kDOP &rOther, double tolerance, bool test_tangent=true) const
 
void InsertPoint (const double &rX, const double &rY, const double &rZ)
 Add a point to the DOP /// This is mainly used for debugging. More...
 
template<bool current_configuration>
void InsertGeometry (const GeometryType &rGeometry)
 Add a geometry (from an element/a condition) to the k-DOP. More...
 
void SetVolume (const kDOP &rBV1, const kDOP &rBV2)
 Set the bounding volume by summing up two BVs. It will re-initialize all data of this kDOP. More...
 
bool SetVolumeIntersection (const kDOP &rBV1, const kDOP &rBV2, double tolerance)
 Set the bounding volume by intersecting two BVs. It will re-initialize all data of this kDOP. More...
 
const std::vector< double > & MinValues () const
 Get the respective minimum values and maximum values of this bounding volume. More...
 
const std::vector< double > & MaxValues () const
 
std::size_t GetLongestAxis () const
 Get the longest axis. More...
 
const double(& Direction (std::size_t i) const)[3]
 Get the i'th-direction. More...
 
std::size_t GetType () const
 Get the type of this k-DOP. More...
 
void GetInequalities (Matrix &rM, Vector &rB) const
 
void PrintInfo (std::ostream &rOStream) const
 

Detailed Description

Class Description:

Member Typedef Documentation

◆ Array2DType

◆ ArrayType

typedef const double Kratos::kDOP::ArrayType[3]

◆ GeometryType

◆ NodeType

◆ PointType

Constructor & Destructor Documentation

◆ kDOP()

Kratos::kDOP::kDOP ( )
inline

◆ ~kDOP()

virtual Kratos::kDOP::~kDOP ( )
inlinevirtual

Member Function Documentation

◆ Direction()

const double(& Kratos::kDOP::Direction ( std::size_t  i) )[3]
inline

Get the i'th-direction.

◆ GetInequalities()

void Kratos::kDOP::GetInequalities ( Matrix rM,
Vector rB 
) const
inline

Get the vertices of the bounding box by using vertex enumeration algorithm Introduction to vertex enumeration: https://en.wikipedia.org/wiki/Vertex_enumeration_problem Export the inequalities (minimal H-representation) representing the polytopes. In general, any polyhedron/polytope can be represented by set of inequality equations: Mx <= b This can i.e be used to export data for other vertex enumeration package, to obtain the V-representation of the polytope, e.g. cddlib/lrs cddlib: https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html lrs: http://cgm.cs.mcgill.ca/~avis/C/lrs.html

◆ GetLongestAxis()

std::size_t Kratos::kDOP::GetLongestAxis ( ) const
inline

Get the longest axis.

◆ GetType()

std::size_t Kratos::kDOP::GetType ( ) const
inline

Get the type of this k-DOP.

◆ Initialize()

void Kratos::kDOP::Initialize ( )
inline

Initialize the bounding volume to initial state.

◆ InsertGeometry()

template<bool current_configuration>
void Kratos::kDOP::InsertGeometry ( const GeometryType rGeometry)
inline

Add a geometry (from an element/a condition) to the k-DOP.

◆ InsertPoint()

void Kratos::kDOP::InsertPoint ( const double rX,
const double rY,
const double rZ 
)
inline

Add a point to the DOP /// This is mainly used for debugging.

◆ IsInside()

bool Kratos::kDOP::IsInside ( const PointType r_point,
double  tolerance 
) const
inline

Check if the point is inside the bounding volume tolerance parameter is to account for proximity

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::kDOP::KRATOS_CLASS_POINTER_DEFINITION ( kDOP  )

◆ MaxValues()

const std::vector<double>& Kratos::kDOP::MaxValues ( ) const
inline

◆ MinValues()

const std::vector<double>& Kratos::kDOP::MinValues ( ) const
inline

Get the respective minimum values and maximum values of this bounding volume.

◆ NumberOfDirections()

virtual std::size_t Kratos::kDOP::NumberOfDirections ( ) const
inlinevirtual

Return the number of directions of the k-DOP.

Reimplemented in Kratos::_26DOP, Kratos::_20DOP, Kratos::_18DOP, Kratos::_14DOP, Kratos::_12DOP, Kratos::_8DOP, and Kratos::_6DOP.

◆ PrintInfo()

void Kratos::kDOP::PrintInfo ( std::ostream &  rOStream) const
inline

◆ SetVolume()

void Kratos::kDOP::SetVolume ( const kDOP rBV1,
const kDOP rBV2 
)
inline

Set the bounding volume by summing up two BVs. It will re-initialize all data of this kDOP.

◆ SetVolumeIntersection()

bool Kratos::kDOP::SetVolumeIntersection ( const kDOP rBV1,
const kDOP rBV2,
double  tolerance 
)
inline

Set the bounding volume by intersecting two BVs. It will re-initialize all data of this kDOP.

◆ TestOverlapped()

int Kratos::kDOP::TestOverlapped ( const kDOP rOther,
double  tolerance,
bool  test_tangent = true 
) const
inline

Test if this bounding volume overlap or no-overlaping with another one The meaning of return value:

  • 0: the two BVs are not overlapping within the tolerance, which mean this condition is satisfied in at least one direction: (this.max <= other.min - tol) or (this.min >= other.max + tol)
  • 1: the two BVs are overlapping, which means in all direction, this condition is satisfied: (this.max >= other.min + tol) or (this.min <= other.max - tol)
  • 2: the two BVs are in tangent to each other (only enabled if test_tangent == true)

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