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 | Static Public Attributes | List of all members
Kratos::InterfaceObjectConfigure Class Reference

#include <interface_object_configure.h>

Collaboration diagram for Kratos::InterfaceObjectConfigure:

Public Types

typedef Point PointType
 
typedef InterfaceObject ObjectType
 
typedef PointerVectorSet< ObjectType, IndexedObjectObjectContainerType
 
typedef ObjectType::Pointer PointerType
 
typedef ObjectContainerType::ContainerType ContainerType
 
typedef ObjectContainerType::ContainerType ResultContainerType
 
typedef ContainerType::iterator IteratorType
 
typedef ResultContainerType::iterator ResultIteratorType
 
typedef std::vector< double >::iterator DistanceIteratorType
 
typedef double CoordinateType
 
typedef Tvector< CoordinateType, DimensionCoordinateArray
 

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (InterfaceObjectConfigure)
 Pointer definition of InterfaceObjectConfigure. More...
 
Life Cycle
 InterfaceObjectConfigure ()
 Default consturctor. More...
 
virtual ~InterfaceObjectConfigure ()
 Default destructor. More...
 
Input and output
virtual std::string Info () const
 Turns back information as a string. More...
 
virtual std::string Data () const
 Turns back data as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Prints object's information. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Prints object's data. More...
 

Static Public Member Functions

Operations
static void CalculateBoundingBox (const PointerType &rObject, PointType &rLowPoint, PointType &rHighPoint)
 
static void CalculateBoundingBox (const PointerType &rObject, PointType &rLowPoint, PointType &rHighPoint, const double &Radius)
 
static void CalculateCenter (const PointerType &rObject, PointType &rCentralPoint)
 
static bool Intersection (const PointerType &rObj_1, const PointerType &rObj_2)
 
static bool Intersection (const PointerType &rObj_1, const PointerType &rObj_2, double Radius)
 
static bool IntersectionBox (const PointerType &rObject, const PointType &rLowPoint, const PointType &rHighPoint)
 
static bool IntersectionBox (const PointerType &rObject, const PointType &rLowPoint, const PointType &rHighPoint, const double &Radius)
 
static void Distance (const PointerType &rObj_1, const PointerType &rObj_2, double &distance)
 
static double GetObjectRadius (const PointerType &rObject, const double &Radius)
 

Static Public Attributes

static constexpr auto Epsilon = std::numeric_limits<double>::epsilon()
 
static constexpr auto Dimension = 3
 

Detailed Description

Configuration file for InterfaceObject. This class provides a configuration file to calculate a 'Bins' using InterfaceObject. It is an adapted copy of "kratos/spatial_containers/configures/point_configure.h"

Member Typedef Documentation

◆ ContainerType

◆ CoordinateArray

◆ CoordinateType

◆ DistanceIteratorType

◆ IteratorType

typedef ContainerType::iterator Kratos::InterfaceObjectConfigure::IteratorType

◆ ObjectContainerType

◆ ObjectType

Additional types needed by the bins.

Parameters
PointContainerTypePoint Container.
ContainerTypeBase container Type.
ResultContainerTypeResult Container. For this configure should be the same as ContainerType.
ContactPairTypeContact pair for points.
IteratorTypeIterator of points.
ResultIteratorTypeIterator of results. For this configure should be the same as PointIteratorType.
DistanceIteratorTypeIterato of distances (doubles)

◆ PointerType

typedef ObjectType::Pointer Kratos::InterfaceObjectConfigure::PointerType

◆ PointType

Point and Pointer Types

Parameters
PointTypePoint of doubles with 3 coordinates (Dimension = 3)
PointerTypePointer to Point of doubles with 3 coordinates (Dimension = 3)

◆ ResultContainerType

◆ ResultIteratorType

typedef ResultContainerType::iterator Kratos::InterfaceObjectConfigure::ResultIteratorType

Constructor & Destructor Documentation

◆ InterfaceObjectConfigure()

Kratos::InterfaceObjectConfigure::InterfaceObjectConfigure ( )
inline

Default consturctor.

◆ ~InterfaceObjectConfigure()

virtual Kratos::InterfaceObjectConfigure::~InterfaceObjectConfigure ( )
inlinevirtual

Default destructor.

Member Function Documentation

◆ CalculateBoundingBox() [1/2]

static void Kratos::InterfaceObjectConfigure::CalculateBoundingBox ( const PointerType rObject,
PointType rLowPoint,
PointType rHighPoint 
)
inlinestatic

Calculates the bounding box for the given object. For this configuation file, the bounding box is the equal to the point given in 'rObject'.

Parameters
rObjectPoint for which the bounding box will be calculated.
rLowPointLower point of the boundingbox.
rHighPointHigher point of the boundingbox.

◆ CalculateBoundingBox() [2/2]

static void Kratos::InterfaceObjectConfigure::CalculateBoundingBox ( const PointerType rObject,
PointType rLowPoint,
PointType rHighPoint,
const double Radius 
)
inlinestatic

Calculates the bounding box for the given object extended with a Radius. For this configuation file, the bounding box is the equal to the point given in 'rObject' + - a radius.

Parameters
rObjectPoint for which the bounding box will be calculated.
rLowPointLower point of the boundingbox.
rHighPointHigher point of the boundingbox.
RadiusThe extension radius to be applied to the boundingbox.

◆ CalculateCenter()

static void Kratos::InterfaceObjectConfigure::CalculateCenter ( const PointerType rObject,
PointType rCentralPoint 
)
inlinestatic

Calculates the Center of the object.

Parameters
rObjectPoint for which the bounding box will be calculated.
rCentralPointThe center point of the object.

◆ Data()

virtual std::string Kratos::InterfaceObjectConfigure::Data ( ) const
inlinevirtual

Turns back data as a string.

◆ Distance()

static void Kratos::InterfaceObjectConfigure::Distance ( const PointerType rObj_1,
const PointerType rObj_2,
double distance 
)
inlinestatic

Calculates the distance betwen two objects. For this configuation file, calculates the euclidean distance between 'rObj_1' and 'rObj_2'.

Performance

In C++11 'std::pow(T, int)' provides the optimal solution in terms of speed.

References

(http://en.cppreference.com/w/cpp/numeric/math/pow) (http://stackoverflow.com/questions/2940367)

Parameters
rObj_1First point.
rLowPointLower point.
rHighPointHigher point of the boundingbox.
distanceThe euclidean distance between 'rObj_1' and 'rObj_2'.

◆ GetObjectRadius()

static double Kratos::InterfaceObjectConfigure::GetObjectRadius ( const PointerType rObject,
const double Radius 
)
inlinestatic

Returns a radius associated to the object Returns a radius associated to the object

Parameters
rObjectthe object
Radiusan extension factor.
Returns
0.0f always.

◆ Info()

virtual std::string Kratos::InterfaceObjectConfigure::Info ( ) const
inlinevirtual

Turns back information as a string.

◆ Intersection() [1/2]

static bool Kratos::InterfaceObjectConfigure::Intersection ( const PointerType rObj_1,
const PointerType rObj_2 
)
inlinestatic

Tests the intersection of two objects For this configuation file, tests if the two points are the same within a Epsilon tolerance range.

Parameters
rObj_1First point of the tests
rObj_2Second point of the tests
Returns
Boolean indicating the result of the intersection test described.

◆ Intersection() [2/2]

static bool Kratos::InterfaceObjectConfigure::Intersection ( const PointerType rObj_1,
const PointerType rObj_2,
double  Radius 
)
inlinestatic

Tests the intersection of two objects extended with a given radius. For this configuation file, tests if the two points extended with a radius are the same within a Epsilon tolerance range.

Parameters
rObj_1First point of the tests
rObj_2Second point of the tests
RadiusThe extension radius to be applied in the intersection.
Returns
Boolean indicating the result of the intersection test described.

◆ IntersectionBox() [1/2]

static bool Kratos::InterfaceObjectConfigure::IntersectionBox ( const PointerType rObject,
const PointType rLowPoint,
const PointType rHighPoint 
)
inlinestatic

Tests the intersection of one object with a boundingbox descrived by 'rLowPoint' and 'rHighPoint'. For this configuation file, tests if one point is inside the boundingbox described by 'rLowPoint' and 'rHighPoint' within a Epsilon tolerance range.

Parameters
rObjectPoint of the tests.
rLowPointLower point of the boundingbox.
rHighPointHigher point of the boundingbox.
Returns
Boolean indicating the result of the intersection test described.

◆ IntersectionBox() [2/2]

static bool Kratos::InterfaceObjectConfigure::IntersectionBox ( const PointerType rObject,
const PointType rLowPoint,
const PointType rHighPoint,
const double Radius 
)
inlinestatic

Tests the intersection of one object with a boundingbox descrived by 'rLowPoint' and 'rHighPoint'. For this configuation file, tests if one point extended by radius is inside the boundingbox described by 'rLowPoint' and 'rHighPoint' within a Epsilon tolerance range.

Parameters
rObjectPoint of the tests.
rLowPointLower point of the boundingbox.
rHighPointHigher point of the boundingbox.
RadiusThe extension radius to be applied in the intersection.
Returns
Boolean indicating the result of the intersection test described.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::InterfaceObjectConfigure::KRATOS_CLASS_POINTER_DEFINITION ( InterfaceObjectConfigure  )

Pointer definition of InterfaceObjectConfigure.

◆ PrintData()

virtual void Kratos::InterfaceObjectConfigure::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Prints object's data.

◆ PrintInfo()

virtual void Kratos::InterfaceObjectConfigure::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Prints object's information.

Member Data Documentation

◆ Dimension

constexpr auto Kratos::InterfaceObjectConfigure::Dimension = 3
staticconstexpr

◆ Epsilon

constexpr auto Kratos::InterfaceObjectConfigure::Epsilon = std::numeric_limits<double>::epsilon()
staticconstexpr

Compile time definitions

Parameters
EpsilonError tolerance for cmparison operations with doubles
DimensionDimension of the problem. Fixed to 3.

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