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

Point class. More...

#include <point.h>

Inheritance diagram for Kratos::Point:
Collaboration diagram for Kratos::Point:

Public Member Functions

Life Cycle
 Point ()
 Default constructor. More...
 
 Point (double NewX, double NewY=0, double NewZ=0)
 3d constructor. More...
 
 Point (Point const &rOtherPoint)
 
 Point (CoordinatesArrayType const &rOtherCoordinates)
 
template<class TVectorType >
 Point (vector_expression< TVectorType > const &rOtherCoordinates)
 
 Point (std::vector< double > const &rOtherCoordinates)
 
virtual ~Point ()
 Destructor. More...
 
Operators
Pointoperator= (const Point &rOther)
 Assignment operator. More...
 
bool operator== (const Point &rOther) const
 
Operations
double SquaredDistance (const Point &rOtherPoint) const
 This method computes the distance between this point and another one (squared) More...
 
double Distance (const Point &rOtherPoint) const
 This method computes the distance between this point and another one. 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) const
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::array_1d< double, 3 >
BOOST_UBLAS_INLINE array_1d ()
 Default constructor. More...
 
BOOST_UBLAS_INLINE array_1d (size_type array_size)
 
BOOST_UBLAS_INLINE array_1d (size_type array_size, value_type v)
 
BOOST_UBLAS_INLINE array_1d (const std::initializer_list< value_type > &rInitList)
 
BOOST_UBLAS_INLINE array_1d (size_type array_size, const array_type &rdata)
 
BOOST_UBLAS_INLINE array_1d (const array_1d &v)
 
BOOST_UBLAS_INLINE array_1d (const boost::numeric::ublas::vector_expression< AE > &ae)
 
BOOST_UBLAS_INLINE const_reference operator() (size_type i) const
 
BOOST_UBLAS_INLINE reference operator() (size_type i)
 
BOOST_UBLAS_INLINE const_reference operator[] (size_type i) const
 
BOOST_UBLAS_INLINE reference operator[] (size_type i)
 
BOOST_UBLAS_INLINE array_1doperator= (const array_1d &v)
 
BOOST_UBLAS_INLINE array_1doperator= (const boost::numeric::ublas::vector_expression< AE > &ae)
 
BOOST_UBLAS_INLINE array_1doperator+= (const boost::numeric::ublas::vector_expression< AE > &ae)
 
BOOST_UBLAS_INLINE array_1doperator-= (const boost::numeric::ublas::vector_expression< AE > &ae)
 
BOOST_UBLAS_INLINE array_1doperator/= (const AT &at)
 
BOOST_UBLAS_INLINE bool operator== (const array_1d &v) const
 Compares whether this array_1d is equal to the given array_1d. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (array_1d)
 Pointer definition of array_1d. More...
 
BOOST_UBLAS_INLINE const_iterator find (size_type i) const
 
BOOST_UBLAS_INLINE iterator find (size_type i)
 
BOOST_UBLAS_INLINE size_type size () const
 
BOOST_UBLAS_INLINE array_1dminus_assign (const boost::numeric::ublas::vector_expression< AE > &ae)
 
BOOST_UBLAS_INLINE const array_typedata () const
 
BOOST_UBLAS_INLINE array_typedata ()
 
BOOST_UBLAS_INLINE const_iterator begin () const
 
BOOST_UBLAS_INLINE iterator begin ()
 
BOOST_UBLAS_INLINE const_iterator end () const
 
BOOST_UBLAS_INLINE iterator end ()
 
BOOST_UBLAS_INLINE const_reverse_iterator rbegin () const
 
BOOST_UBLAS_INLINE reverse_iterator rbegin ()
 
BOOST_UBLAS_INLINE const_reverse_iterator rend () const
 
BOOST_UBLAS_INLINE reverse_iterator rend ()
 
BOOST_UBLAS_INLINE void resize (size_type array_size, bool preserve=true)
 
BOOST_UBLAS_INLINE array_1dassign_temporary (array_1d &v)
 
BOOST_UBLAS_INLINE array_1doperator*= (const AT &at)
 
BOOST_UBLAS_INLINE array_1dplus_assign (const boost::numeric::ublas::vector_expression< AE > &ae)
 
BOOST_UBLAS_INLINE array_1dassign (const boost::numeric::ublas::vector_expression< AE > &ae)
 
BOOST_UBLAS_INLINE void swap (array_1d &v)
 
BOOST_UBLAS_INLINE reference insert_element (size_type i, const_reference t)
 
BOOST_UBLAS_INLINE void erase_element (size_type i)
 
BOOST_UBLAS_INLINE void clear ()
 

Type Definitions

typedef array_1d< double, mDimension > BaseType
 
typedef BaseType CoordinatesArrayType
 
typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
 KRATOS_CLASS_POINTER_DEFINITION (Point)
 Pointer definition of Point. More...
 

Serialization

class Serializer
 

Access

double X () const
 
double Y () const
 
double Z () const
 
doubleX ()
 
doubleY ()
 
doubleZ ()
 
CoordinatesArrayType const & Coordinates () const
 
CoordinatesArrayTypeCoordinates ()
 
static constexpr IndexType Dimension ()
 

Additional Inherited Members

- Public Types inherited from Kratos::array_1d< double, 3 >
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef double value_type
 
typedef boost::numeric::ublas::type_traits< double >::const_reference const_reference
 
typedef double & reference
 
typedef std::array< double, N > array_type
 
typedef double * pointer
 
typedef array_1d< double, N > self_type
 
typedef const boost::numeric::ublas::vector_reference< const self_typeconst_closure_type
 
typedef boost::numeric::ublas::vector_reference< self_typeclosure_type
 
typedef self_type vector_temporary_type
 
typedef boost::numeric::ublas::dense_tag storage_category
 
typedef boost::numeric::ublas::reverse_iterator_base< const_iterator > const_reverse_iterator
 
typedef boost::numeric::ublas::reverse_iterator_base< iterator > reverse_iterator
 

Detailed Description

Point class.

Point class. Stores coordinates of a point and have some basic operations defined.

See also
Geometry
Node
IntegrationPoint

Member Typedef Documentation

◆ BaseType

typedef array_1d<double, mDimension> Kratos::Point::BaseType

◆ CoordinatesArrayType

◆ IndexType

typedef std::size_t Kratos::Point::IndexType

◆ SizeType

typedef std::size_t Kratos::Point::SizeType

Constructor & Destructor Documentation

◆ Point() [1/6]

Kratos::Point::Point ( )
inline

Default constructor.

◆ Point() [2/6]

Kratos::Point::Point ( double  NewX,
double  NewY = 0,
double  NewZ = 0 
)
inline

3d constructor.

◆ Point() [3/6]

Kratos::Point::Point ( Point const &  rOtherPoint)
inline

Copy constructor. Initialize this point with the coordinates of given point.

◆ Point() [4/6]

Kratos::Point::Point ( CoordinatesArrayType const &  rOtherCoordinates)
inlineexplicit

Constructor using coordinates stored in given array. Initialize this point with the coordinates in the array.

◆ Point() [5/6]

template<class TVectorType >
Kratos::Point::Point ( vector_expression< TVectorType > const &  rOtherCoordinates)
inlineexplicit

Constructor using coordinates stored in given array. Initialize this point with the coordinates in the array.

◆ Point() [6/6]

Kratos::Point::Point ( std::vector< double > const &  rOtherCoordinates)
inlineexplicit

Constructor using coordinates stored in given std::vector. Initialize this point with the coordinates in the array.

◆ ~Point()

virtual Kratos::Point::~Point ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ Coordinates() [1/2]

CoordinatesArrayType& Kratos::Point::Coordinates ( )
inline

◆ Coordinates() [2/2]

CoordinatesArrayType const& Kratos::Point::Coordinates ( ) const
inline

◆ Dimension()

static constexpr IndexType Kratos::Point::Dimension ( )
inlinestaticconstexpr

◆ Distance()

double Kratos::Point::Distance ( const Point rOtherPoint) const
inline

This method computes the distance between this point and another one.

Using norm_2 to take benefic of the SIMD optimization of the library

Parameters
rOtherPointThe other point to compute the distance
Returns
The distance between this and another point

◆ Info()

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

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::Point::KRATOS_CLASS_POINTER_DEFINITION ( Point  )

Pointer definition of Point.

◆ operator=()

Point& Kratos::Point::operator= ( const Point rOther)
inline

Assignment operator.

◆ operator==()

bool Kratos::Point::operator== ( const Point rOther) const
inline

◆ PrintData()

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

◆ PrintInfo()

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

◆ SquaredDistance()

double Kratos::Point::SquaredDistance ( const Point rOtherPoint) const
inline

This method computes the distance between this point and another one (squared)

In order to avoid square root operation if faster computation is needed

Parameters
rOtherPointThe other point to compute the distance
Returns
The squared distance between this and another point

◆ X() [1/2]

double& Kratos::Point::X ( )
inline

◆ X() [2/2]

double Kratos::Point::X ( ) const
inline

Returns X coordinate

◆ Y() [1/2]

double& Kratos::Point::Y ( )
inline

Returns Y coordinate

◆ Y() [2/2]

double Kratos::Point::Y ( ) const
inline

Returns Y coordinate

◆ Z() [1/2]

double& Kratos::Point::Z ( )
inline

Returns Z coordinate

◆ Z() [2/2]

double Kratos::Point::Z ( ) const
inline

Returns Z coordinate

Friends And Related Function Documentation

◆ Serializer

friend class Serializer
friend

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