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 Member Functions | Static Public Attributes | List of all members
Kratos::NodeConfigure< TDimension > Class Template Reference

Configuration file for Nodes. More...

#include <node_configure.h>

Collaboration diagram for Kratos::NodeConfigure< TDimension >:

Public Types

enum  { Dimension = TDimension , DIMENSION = TDimension , MAX_LEVEL = 16 , MIN_LEVEL = 2 }
 
typedef Point PointType
 Point and Pointer Types. More...
 
typedef Node ObjectType
 
typedef ObjectType::Pointer PointerType
 
typedef PointerVectorSet< ObjectType, IndexedObjectObjectContainerType
 
typedef ObjectContainerType::ContainerType ContainerType
 
typedef ObjectContainerType::ContainerType ResultContainerType
 
typedef ContactPair< PointerTypeContactPairType
 
typedef ContainerType::iterator IteratorType
 
typedef ResultContainerType::iterator ResultIteratorType
 
typedef std::vector< double >::iterator DistanceIteratorType
 
typedef double CoordinateType
 
typedef Tvector< CoordinateType, DimensionCoordinateArray
 
typedef SpatialSearch SearchType
 
typedef SearchType::PointType PointType
 
typedef SearchType::NodesContainerType::ContainerType ContainerType
 
typedef SearchType::NodesContainerType NodesContainerType
 
typedef SearchType::NodeType NodeType
 
typedef ContainerType::value_type PointerType
 
typedef ContainerType::iterator IteratorType
 
typedef SearchType::NodesContainerType::ContainerType ResultContainerType
 
typedef ResultContainerType::iterator ResultIteratorType
 
typedef std::vector< double >::iterator DistanceIteratorType
 

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (NodeConfigure)
 Pointer definition of NodeConfigure. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (NodeConfigure)
 Pointer definition of SpatialContainersConfigure. More...
 
 NodeConfigure ()
 
virtual ~NodeConfigure ()
 
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...
 
Life Cycle
 NodeConfigure ()
 Default consturctor. More...
 
virtual ~NodeConfigure ()
 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

static void SetDomain (const double domain_min_x, const double domain_min_y, const double domain_min_z, const double domain_max_x, const double domain_max_y, const double domain_max_z)
 
static void SetPeriods (double domain_period_x, double domain_period_y, double domain_period_z)
 
static doubleGetMinPoint ()
 
static doubleGetMaxPoint ()
 
static void GetPeriods (double periods[3])
 
static bool GetDomainPeriodicity ()
 
static void TransformToClosestPeriodicCoordinates (const double target[3], double base_coordinates[3])
 
static void TransformToClosestPeriodicCoordinates (const array_1d< double, 3 > &target, array_1d< double, 3 > &base_coordinates)
 
static void TransformToClosestPeriodicCoordinates (const double target[3], double base_coordinates[3], const double periods[3])
 
static void TransformToClosestPeriodicCoordinates (const array_1d< double, 3 > &target, array_1d< double, 3 > &base_coordinates, const double periods[3])
 
static void GetBoxCenter (double box_center[3], const double min_point[3], const double max_point[3])
 
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 &rCenter)
 
static bool Intersection (const PointerType &rObj_1, const PointerType &rObj_2)
 
static bool Intersection (const PointerType &rObj_1, const PointerType &rObj_2, const 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 void SquaredDistance (const PointerType &rObj_1, const PointerType &rObj_2, double &squared_distance)
 
Operations
static void CalculateBoundingBox (const PointerType &rObject, PointType &rLowPoint, PointType &rHighPoint)
 Calculates the bounding box for the given object. More...
 
static void CalculateBoundingBox (const PointerType &rObject, PointType &rLowPoint, PointType &rHighPoint, const double Radius)
 Calculates the bounding box for the given object extended with a Radius. More...
 
static void CalculateCenter (const PointerType &rObject, PointType &rCentralPoint)
 Calculates the Center of the object. More...
 
static bool Intersection (const PointerType &rObj_1, const PointerType &rObj_2)
 Tests the intersection of two objects. More...
 
static bool Intersection (const PointerType &rObj_1, const PointerType &rObj_2, double Radius)
 Tests the intersection of two objects extended with a given radius. More...
 
static bool IntersectionBox (const PointerType &rObject, const PointType &rLowPoint, const PointType &rHighPoint)
 Tests the intersection of one object with a boundingbox descrived by 'rLowPoint' and 'rHighPoint'. More...
 
static bool IntersectionBox (const PointerType &rObject, const PointType &rLowPoint, const PointType &rHighPoint, const double Radius)
 Tests the intersection of one object with a boundingbox descrived by 'rLowPoint' and 'rHighPoint'. More...
 
static void Distance (const PointerType &rObj_1, const PointerType &rObj_2, double &distance)
 Calculates the distance betwen two objects. More...
 
static double GetObjectRadius (const PointerType &rObject, const double Radius)
 Returns a radius associated to the object. More...
 

Static Public Attributes

static constexpr auto Epsilon = std::numeric_limits<double>::epsilon()
 Compile time definitions. More...
 
static constexpr auto Dimension = 3
 
static double mDomainPeriods [3] = {-1.0, -1.0, -1.0}
 
static double mDomainMin [3] = {0.0, 0.0, 0.0}
 
static double mDomainMax [3] = {-1.0, -1.0, -1.0}
 
static bool mDomainIsPeriodic = false
 

Detailed Description

template<std::size_t TDimension>
class Kratos::NodeConfigure< TDimension >

Configuration file for Nodes.

This class provides a configuration file to calculate a 'Bins' using nodes.

Member Typedef Documentation

◆ ContactPairType

template<std::size_t TDimension>
typedef ContactPair<PointerType> Kratos::NodeConfigure< TDimension >::ContactPairType

◆ ContainerType [1/2]

template<std::size_t TDimension>
typedef SearchType::NodesContainerType::ContainerType Kratos::NodeConfigure< TDimension >::ContainerType

◆ ContainerType [2/2]

template<std::size_t TDimension>
typedef ObjectContainerType::ContainerType Kratos::NodeConfigure< TDimension >::ContainerType

◆ CoordinateArray

template<std::size_t TDimension>
typedef Tvector<CoordinateType,Dimension> Kratos::NodeConfigure< TDimension >::CoordinateArray

◆ CoordinateType

template<std::size_t TDimension>
typedef double Kratos::NodeConfigure< TDimension >::CoordinateType

◆ DistanceIteratorType [1/2]

template<std::size_t TDimension>
typedef std::vector<double>::iterator Kratos::NodeConfigure< TDimension >::DistanceIteratorType

◆ DistanceIteratorType [2/2]

template<std::size_t TDimension>
typedef std::vector<double>::iterator Kratos::NodeConfigure< TDimension >::DistanceIteratorType

◆ IteratorType [1/2]

template<std::size_t TDimension>
typedef ContainerType::iterator Kratos::NodeConfigure< TDimension >::IteratorType

◆ IteratorType [2/2]

template<std::size_t TDimension>
typedef ContainerType::iterator Kratos::NodeConfigure< TDimension >::IteratorType

◆ NodesContainerType

template<std::size_t TDimension>
typedef SearchType::NodesContainerType Kratos::NodeConfigure< TDimension >::NodesContainerType

◆ NodeType

template<std::size_t TDimension>
typedef SearchType::NodeType Kratos::NodeConfigure< TDimension >::NodeType

◆ ObjectContainerType

template<std::size_t TDimension>
typedef PointerVectorSet<ObjectType,IndexedObject> Kratos::NodeConfigure< TDimension >::ObjectContainerType

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)

◆ ObjectType

template<std::size_t TDimension>
typedef Node Kratos::NodeConfigure< TDimension >::ObjectType

◆ PointerType [1/2]

template<std::size_t TDimension>
typedef ContainerType::value_type Kratos::NodeConfigure< TDimension >::PointerType

◆ PointerType [2/2]

template<std::size_t TDimension>
typedef ObjectType::Pointer Kratos::NodeConfigure< TDimension >::PointerType

◆ PointType [1/2]

template<std::size_t TDimension>
typedef SearchType::PointType Kratos::NodeConfigure< TDimension >::PointType

◆ PointType [2/2]

template<std::size_t TDimension>
typedef Point Kratos::NodeConfigure< TDimension >::PointType

Point and Pointer Types.

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

◆ ResultContainerType [1/2]

template<std::size_t TDimension>
typedef SearchType::NodesContainerType::ContainerType Kratos::NodeConfigure< TDimension >::ResultContainerType

◆ ResultContainerType [2/2]

template<std::size_t TDimension>
typedef ObjectContainerType::ContainerType Kratos::NodeConfigure< TDimension >::ResultContainerType

◆ ResultIteratorType [1/2]

template<std::size_t TDimension>
typedef ResultContainerType::iterator Kratos::NodeConfigure< TDimension >::ResultIteratorType

◆ ResultIteratorType [2/2]

template<std::size_t TDimension>
typedef ResultContainerType::iterator Kratos::NodeConfigure< TDimension >::ResultIteratorType

◆ SearchType

template<std::size_t TDimension>
typedef SpatialSearch Kratos::NodeConfigure< TDimension >::SearchType

Member Enumeration Documentation

◆ anonymous enum

template<std::size_t TDimension>
anonymous enum
Enumerator
Dimension 
DIMENSION 
MAX_LEVEL 
MIN_LEVEL 

Constructor & Destructor Documentation

◆ NodeConfigure() [1/2]

template<std::size_t TDimension>
Kratos::NodeConfigure< TDimension >::NodeConfigure ( )
inline

Default consturctor.

◆ ~NodeConfigure() [1/2]

template<std::size_t TDimension>
virtual Kratos::NodeConfigure< TDimension >::~NodeConfigure ( )
inlinevirtual

Default destructor.

◆ NodeConfigure() [2/2]

template<std::size_t TDimension>
Kratos::NodeConfigure< TDimension >::NodeConfigure ( )
inline

◆ ~NodeConfigure() [2/2]

template<std::size_t TDimension>
virtual Kratos::NodeConfigure< TDimension >::~NodeConfigure ( )
inlinevirtual

Member Function Documentation

◆ CalculateBoundingBox() [1/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::CalculateBoundingBox ( const PointerType rObject,
PointType rLowPoint,
PointType rHighPoint 
)
inlinestatic

◆ CalculateBoundingBox() [2/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::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() [3/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::CalculateBoundingBox ( const PointerType rObject,
PointType rLowPoint,
PointType rHighPoint,
const double Radius 
)
inlinestatic

◆ CalculateBoundingBox() [4/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::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() [1/2]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::CalculateCenter ( const PointerType rObject,
PointType rCenter 
)
inlinestatic

◆ CalculateCenter() [2/2]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::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()

template<std::size_t TDimension>
virtual std::string Kratos::NodeConfigure< TDimension >::Data ( ) const
inlinevirtual

Turns back data as a string.

◆ Distance() [1/2]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::Distance ( const PointerType rObj_1,
const PointerType rObj_2,
double distance 
)
inlinestatic

◆ Distance() [2/2]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::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'.

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

◆ GetBoxCenter()

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::GetBoxCenter ( double  box_center[3],
const double  min_point[3],
const double  max_point[3] 
)
inlinestatic

◆ GetDomainPeriodicity()

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::GetDomainPeriodicity ( )
inlinestatic

◆ GetMaxPoint()

template<std::size_t TDimension>
static double* Kratos::NodeConfigure< TDimension >::GetMaxPoint ( )
inlinestatic

◆ GetMinPoint()

template<std::size_t TDimension>
static double* Kratos::NodeConfigure< TDimension >::GetMinPoint ( )
inlinestatic

◆ GetObjectRadius()

template<std::size_t TDimension>
static double Kratos::NodeConfigure< TDimension >::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.

◆ GetPeriods()

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::GetPeriods ( double  periods[3])
inlinestatic

◆ Info() [1/2]

template<std::size_t TDimension>
virtual std::string Kratos::NodeConfigure< TDimension >::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ Info() [2/2]

template<std::size_t TDimension>
virtual std::string Kratos::NodeConfigure< TDimension >::Info ( ) const
inlinevirtual

Turns back information as a string.

◆ Intersection() [1/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::Intersection ( const PointerType rObj_1,
const PointerType rObj_2 
)
inlinestatic

◆ Intersection() [2/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::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() [3/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::Intersection ( const PointerType rObj_1,
const PointerType rObj_2,
const double Radius 
)
inlinestatic

◆ Intersection() [4/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::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/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::IntersectionBox ( const PointerType rObject,
const PointType rLowPoint,
const PointType rHighPoint 
)
inlinestatic

◆ IntersectionBox() [2/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::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() [3/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::IntersectionBox ( const PointerType rObject,
const PointType rLowPoint,
const PointType rHighPoint,
const double  Radius 
)
inlinestatic

◆ IntersectionBox() [4/4]

template<std::size_t TDimension>
static bool Kratos::NodeConfigure< TDimension >::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() [1/2]

template<std::size_t TDimension>
Kratos::NodeConfigure< TDimension >::KRATOS_CLASS_POINTER_DEFINITION ( NodeConfigure< TDimension >  )

Pointer definition of SpatialContainersConfigure.

◆ KRATOS_CLASS_POINTER_DEFINITION() [2/2]

template<std::size_t TDimension>
Kratos::NodeConfigure< TDimension >::KRATOS_CLASS_POINTER_DEFINITION ( NodeConfigure< TDimension >  )

Pointer definition of NodeConfigure.

◆ PrintData() [1/2]

template<std::size_t TDimension>
virtual void Kratos::NodeConfigure< TDimension >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintData() [2/2]

template<std::size_t TDimension>
virtual void Kratos::NodeConfigure< TDimension >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Prints object's data.

◆ PrintInfo() [1/2]

template<std::size_t TDimension>
virtual void Kratos::NodeConfigure< TDimension >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ PrintInfo() [2/2]

template<std::size_t TDimension>
virtual void Kratos::NodeConfigure< TDimension >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Prints object's information.

◆ SetDomain()

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::SetDomain ( const double  domain_min_x,
const double  domain_min_y,
const double  domain_min_z,
const double  domain_max_x,
const double  domain_max_y,
const double  domain_max_z 
)
inlinestatic

◆ SetPeriods()

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::SetPeriods ( double  domain_period_x,
double  domain_period_y,
double  domain_period_z 
)
inlinestatic

◆ SquaredDistance()

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::SquaredDistance ( const PointerType rObj_1,
const PointerType rObj_2,
double squared_distance 
)
inlinestatic

◆ TransformToClosestPeriodicCoordinates() [1/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::TransformToClosestPeriodicCoordinates ( const array_1d< double, 3 > &  target,
array_1d< double, 3 > &  base_coordinates 
)
inlinestatic

◆ TransformToClosestPeriodicCoordinates() [2/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::TransformToClosestPeriodicCoordinates ( const array_1d< double, 3 > &  target,
array_1d< double, 3 > &  base_coordinates,
const double  periods[3] 
)
inlinestatic

◆ TransformToClosestPeriodicCoordinates() [3/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::TransformToClosestPeriodicCoordinates ( const double  target[3],
double  base_coordinates[3] 
)
inlinestatic

◆ TransformToClosestPeriodicCoordinates() [4/4]

template<std::size_t TDimension>
static void Kratos::NodeConfigure< TDimension >::TransformToClosestPeriodicCoordinates ( const double  target[3],
double  base_coordinates[3],
const double  periods[3] 
)
inlinestatic

Member Data Documentation

◆ Dimension

template<std::size_t TDimension>
constexpr auto Kratos::NodeConfigure< TDimension >::Dimension = 3
staticconstexpr

◆ Epsilon

template<std::size_t TDimension>
constexpr auto Kratos::NodeConfigure< TDimension >::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.

◆ mDomainIsPeriodic

template<std::size_t TDimension>
bool Kratos::NodeConfigure< TDimension >::mDomainIsPeriodic = false
static

◆ mDomainMax

template<std::size_t TDimension>
double Kratos::NodeConfigure< TDimension >::mDomainMax = {-1.0, -1.0, -1.0}
static

◆ mDomainMin

template<std::size_t TDimension>
double Kratos::NodeConfigure< TDimension >::mDomainMin = {0.0, 0.0, 0.0}
static

◆ mDomainPeriods

template<std::size_t TDimension>
double Kratos::NodeConfigure< TDimension >::mDomainPeriods = {-1.0, -1.0, -1.0}
static

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