libMesh::Point Class Reference

#include <point.h>

Inheritance diagram for libMesh::Point:

Public Member Functions

 Point (const Real x=0., const Real y=0., const Real z=0.)
 
 Point (const Point &p)
 
 Point (const TypeVector< Real > &p)
 
 ~Point ()
 
void assign (const TypeVector< T2 > &)
 
const Realoperator() (const unsigned int i) const
 
Realoperator() (const unsigned int i)
 
const Realslice (const unsigned int i) const
 
Realslice (const unsigned int i)
 
TypeVector< typename
CompareTypes< Real, T2 >
::supertype > 
operator+ (const TypeVector< T2 > &) const
 
const TypeVector< Real > & operator+= (const TypeVector< T2 > &)
 
void add (const TypeVector< T2 > &)
 
void add_scaled (const TypeVector< T2 > &, const Real)
 
TypeVector< typename
CompareTypes< Real, T2 >
::supertype > 
operator- (const TypeVector< T2 > &) const
 
TypeVector< Realoperator- () const
 
const TypeVector< Real > & operator-= (const TypeVector< T2 > &)
 
void subtract (const TypeVector< T2 > &)
 
void subtract_scaled (const TypeVector< T2 > &, const Real)
 
boostcopy::enable_if_c
< ScalarTraits< Scalar >
::value, TypeVector< typename
CompareTypes< Real, Scalar >
::supertype > >::type 
operator* (const Scalar) const
 
CompareTypes< Real, T2 >::supertype operator* (const TypeVector< T2 > &) const
 
const TypeVector< Real > & operator*= (const Real)
 
boostcopy::enable_if_c
< ScalarTraits< Scalar >
::value, TypeVector< typename
CompareTypes< Real, Scalar >
::supertype > >::type 
operator/ (const Scalar) const
 
const TypeVector< Real > & operator/= (const Real)
 
CompareTypes< Real, T2 >::supertype contract (const TypeVector< T2 > &) const
 
TypeVector< typename
CompareTypes< Real, T2 >
::supertype > 
cross (const TypeVector< T2 > &) const
 
TypeVector< Realunit () const
 
Real size () const
 
Real size_sq () const
 
void zero ()
 
bool relative_fuzzy_equals (const TypeVector< Real > &rhs, Real tol=TOLERANCE) const
 
bool absolute_fuzzy_equals (const TypeVector< Real > &rhs, Real tol=TOLERANCE) const
 
bool operator== (const TypeVector< Real > &rhs) const
 
bool operator!= (const TypeVector< Real > &rhs) const
 
bool operator< (const TypeVector< Real > &rhs) const
 
bool operator<= (const TypeVector< Real > &rhs) const
 
bool operator> (const TypeVector< Real > &rhs) const
 
bool operator>= (const TypeVector< Real > &rhs) const
 
void print (std::ostream &os=libMesh::out) const
 
void write_unformatted (std::ostream &out, const bool newline=true) const
 

Protected Attributes

Real _coords [LIBMESH_DIM]
 

Friends

class Node
 

Detailed Description

A Point defines a location in LIBMESH_DIM dimensional Real space. Points are always real-valued, even if the library is configured with –enable-complex.

Author
Benjamin S. Kirk, 2003.

Definition at line 42 of file point.h.

Constructor & Destructor Documentation

libMesh::Point::Point ( const Real  x = 0.,
const Real  y = 0.,
const Real  z = 0. 
)
inline

Constructor. By default sets all entries to 0. Gives the point 0 in LIBMESH_DIM dimensions.

Definition at line 89 of file point.h.

Referenced by libMesh::Node::PackedNode::build_point().

91  :
92  TypeVector<Real> (x,y,z)
93 {
94 }
libMesh::Point::Point ( const Point p)
inline

Copy-constructor.

Definition at line 99 of file point.h.

99  :
100  TypeVector<Real> (p)
101 {
102 }
libMesh::Point::Point ( const TypeVector< Real > &  p)
inline

Copy-constructor.

Definition at line 107 of file point.h.

107  :
108  TypeVector<Real> (p)
109 {
110 }
libMesh::Point::~Point ( )
inline

Empty.

Definition at line 67 of file point.h.

67 {}

Member Function Documentation

bool libMesh::TypeVector< Real >::absolute_fuzzy_equals ( const TypeVector< Real > &  rhs,
Real  tol = TOLERANCE 
) const
inherited
Returns
true iff two vectors occupy approximately the same physical location in space, to within an absolute tolerance of tol.
void libMesh::TypeVector< Real >::add ( const TypeVector< T2 > &  )
inherited

Add to this vector without creating a temporary.

void libMesh::TypeVector< Real >::add_scaled ( const TypeVector< T2 > &  ,
const Real   
)
inherited

Add a scaled value to this vector without creating a temporary.

void libMesh::TypeVector< Real >::assign ( const TypeVector< T2 > &  )
inherited

Assign to a vector without creating a temporary.

CompareTypes<Real , T2>::supertype libMesh::TypeVector< Real >::contract ( const TypeVector< T2 > &  ) const
inherited

Multiply 2 vectors together, i.e. dot-product. The vectors may be of different types.

TypeVector<typename CompareTypes<Real , T2>::supertype> libMesh::TypeVector< Real >::cross ( const TypeVector< T2 > &  ) const
inherited

Cross 2 vectors together, i.e. cross-product.

bool libMesh::TypeVector< Real >::operator!= ( const TypeVector< Real > &  rhs) const
inherited
Returns
true iff two vectors do not occupy approximately the same physical location in space.
const Real & libMesh::TypeVector< Real >::operator() ( const unsigned int  i) const
inherited

Return the $ i^{th} $ element of the vector.

Real & libMesh::TypeVector< Real >::operator() ( const unsigned int  i)
inherited

Return a writeable reference to the $ i^{th} $ element of the vector.

boostcopy::enable_if_c< ScalarTraits<Scalar>::value, TypeVector<typename CompareTypes<Real , Scalar>::supertype> >::type libMesh::TypeVector< Real >::operator* ( const Scalar  ) const
inherited

Multiply a vector by a number, i.e. scale.

CompareTypes<Real , T2>::supertype libMesh::TypeVector< Real >::operator* ( const TypeVector< T2 > &  ) const
inherited

Multiply 2 vectors together, i.e. dot-product. The vectors may be of different types.

const TypeVector<Real >& libMesh::TypeVector< Real >::operator*= ( const Real  )
inherited

Multiply this vector by a number, i.e. scale.

TypeVector<typename CompareTypes<Real , T2>::supertype> libMesh::TypeVector< Real >::operator+ ( const TypeVector< T2 > &  ) const
inherited

Add two vectors.

const TypeVector<Real >& libMesh::TypeVector< Real >::operator+= ( const TypeVector< T2 > &  )
inherited

Add to this vector.

TypeVector<typename CompareTypes<Real , T2>::supertype> libMesh::TypeVector< Real >::operator- ( const TypeVector< T2 > &  ) const
inherited

Subtract two vectors.

TypeVector<Real > libMesh::TypeVector< Real >::operator- ( ) const
inherited

Return the opposite of a vector

const TypeVector<Real >& libMesh::TypeVector< Real >::operator-= ( const TypeVector< T2 > &  )
inherited

Subtract from this vector.

boostcopy::enable_if_c< ScalarTraits<Scalar>::value, TypeVector<typename CompareTypes<Real , Scalar>::supertype> >::type libMesh::TypeVector< Real >::operator/ ( const Scalar  ) const
inherited

Divide a vector by a number, i.e. scale.

const TypeVector<Real >& libMesh::TypeVector< Real >::operator/= ( const Real  )
inherited

Divide this vector by a number, i.e. scale.

bool libMesh::TypeVector< Real >::operator< ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is "less" than another. Useful for sorting. Also used for choosing some arbitrary basis function orientations
bool libMesh::TypeVector< Real >::operator<= ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is "less" than or equal to another. Useful for sorting. Also used for choosing some arbitrary constraint equation directions
bool libMesh::TypeVector< Real >::operator== ( const TypeVector< Real > &  rhs) const
inherited
Returns
true iff two vectors occupy approximately the same physical location in space, to within an absolute tolerance of TOLERANCE.

Referenced by libMesh::Node::operator==().

bool libMesh::TypeVector< Real >::operator> ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is "greater" than another. Useful for sorting. Also used for choosing some arbitrary basis function orientations
bool libMesh::TypeVector< Real >::operator>= ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is "greater" than or equal to another. Useful for sorting. Also used for choosing some arbitrary constraint equation directions
void libMesh::TypeVector< Real >::print ( std::ostream &  os = libMesh::out) const
inherited

Formatted print, by default to libMesh::out.

bool libMesh::TypeVector< Real >::relative_fuzzy_equals ( const TypeVector< Real > &  rhs,
Real  tol = TOLERANCE 
) const
inherited
Returns
true iff two vectors occupy approximately the same physical location in space, to within a relative tolerance of tol.
Real libMesh::TypeVector< Real >::size ( ) const
inherited

Returns the magnitude of the vector, i.e. the square-root of the sum of the elements squared.

Real libMesh::TypeVector< Real >::size_sq ( ) const
inherited

Returns the magnitude of the vector squared, i.e. the sum of the element magnitudes squared.

const Real & libMesh::TypeVector< Real >::slice ( const unsigned int  i) const
inlineinherited

Definition at line 123 of file type_vector.h.

123 { return (*this)(i); }
Real & libMesh::TypeVector< Real >::slice ( const unsigned int  i)
inlineinherited

Definition at line 130 of file type_vector.h.

130 { return (*this)(i); }
void libMesh::TypeVector< Real >::subtract ( const TypeVector< T2 > &  )
inherited

Subtract from this vector without creating a temporary.

void libMesh::TypeVector< Real >::subtract_scaled ( const TypeVector< T2 > &  ,
const Real   
)
inherited

Subtract a scaled value from this vector without creating a temporary.

TypeVector<Real > libMesh::TypeVector< Real >::unit ( ) const
inherited

Think of a vector as a dim dimensional vector. This will return a unit vector aligned in that direction.

void libMesh::TypeVector< Real >::write_unformatted ( std::ostream &  out,
const bool  newline = true 
) const
inherited

Unformatted print to the stream out. Simply prints the elements of the vector separated by spaces. Optionally prints a newline, which it does by default.

void libMesh::TypeVector< Real >::zero ( )
inherited

Zero the vector in any dimension.

Friends And Related Function Documentation

friend class Node
friend
Returns
a key associated with this point. Useful for sorting. Make the derived class a friend

Definition at line 81 of file point.h.

Member Data Documentation

Real libMesh::TypeVector< Real >::_coords[LIBMESH_DIM]
protectedinherited

The coordinates of the TypeVector

Definition at line 347 of file type_vector.h.


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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:58:01 UTC

Hosted By:
SourceForge.net Logo