Poster of Linux kernelThe best gift for a Linux geek
Point

Point

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

Point -  

SYNOPSIS


#include <point.h>

Inherits TypeVector< Real >.

Inherited by Node.  

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)

virtual ~Point ()

void assign (const TypeVector< T2 > &)

Real operator() (const unsigned int i) const

Real & operator() (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< Real > operator- () 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)

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

TypeVector< Real > unit () 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

void print (std::ostream &os) const

void write_unformatted (std::ostream &out, const bool newline=true) const
 

Protected Attributes


Real _coords [LIBMESH_DIM]
 

Friends


class Node

std::ostream & operator<< (std::ostream &os, const TypeVector< Real > &t)
 

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

 

Point::Point (const Realx = 0., const Realy = 0., const Realz = 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 Node::PackedNode::build_point().

                            :
  TypeVector<Real> (x,y,z)
{
}
 

Point::Point (const Point &p) [inline]Copy-constructor.

Definition at line 99 of file point.h.

                            :
  TypeVector<Real> (p)
{
}
 

Point::Point (const TypeVector< Real > &p) [inline]Copy-constructor.

Definition at line 107 of file point.h.

                                       :
  TypeVector<Real> (p)
{
}
 

virtual Point::~Point () [inline, virtual]Empty.

Definition at line 67 of file point.h.

{}
 

Member Function Documentation

 

bool TypeVector< Real >::absolute_fuzzy_equals (const TypeVector< Real > &rhs, Realtol = TOLERANCE) const [inherited]Returns:

true iff two vectors occupy approximately the same physical location in space, to within an absolute tolerance of tol.

 

void TypeVector< Real >::add (const TypeVector< T2 > &) [inherited]Add to this vector without creating a temporary.

 

void TypeVector< Real >::add_scaled (const TypeVector< T2 > &, const Real) [inherited]Add a scaled value to this vector without creating a temporary.

 

void TypeVector< Real >::assign (const TypeVector< T2 > &) [inherited]Assign to a vector without creating a temporary.

 

TypeVector<typename CompareTypes<Real , T2>::supertype> TypeVector< Real >::cross (const TypeVector< T2 > &) const [inherited]Cross 2 vectors together, i.e. cross-product.

 

bool TypeVector< Real >::operator!= (const TypeVector< Real > &rhs) const [inline, inherited]Returns:

true iff two vectors do not occupy approximately the same physical location in space.

Definition at line 827 of file type_vector.h.

{
  return (!(*this == rhs));
}
 

Real TypeVector< Real >::operator() (const unsigned inti) const [inherited]Return the $ i^{th} $ element of the vector.

 

Real & TypeVector< Real >::operator() (const unsigned inti) [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 TypeVector< Real >::operator* (const Scalar) const [inherited]Multiply a vector by a number, i.e. scale.

 

CompareTypes<Real , T2>::supertype 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 >& TypeVector< Real >::operator*= (const Real) [inherited]Multiply this vector by a number, i.e. scale.

 

TypeVector<typename CompareTypes<Real , T2>::supertype> TypeVector< Real >::operator+ (const TypeVector< T2 > &) const [inherited]Add two vectors.

 

const TypeVector<Real >& TypeVector< Real >::operator+= (const TypeVector< T2 > &) [inherited]Add to this vector.

 

TypeVector<typename CompareTypes<Real , T2>::supertype> TypeVector< Real >::operator- (const TypeVector< T2 > &) const [inherited]Subtract two vectors.

 

TypeVector<Real > TypeVector< Real >::operator- () const [inherited]Return the opposite of a vector

 

const TypeVector<Real >& 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 TypeVector< Real >::operator/ (const Scalar) const [inherited]Divide a vector by a number, i.e. scale.

 

const TypeVector<Real >& TypeVector< Real >::operator/= (const Real) [inherited]Divide this vector by a number, i.e. scale.

 

bool 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 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.

 

bool 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

 

void TypeVector< Real >::print (std::ostream &os) const [inherited]Formatted print to std::cout.

 

bool TypeVector< Real >::relative_fuzzy_equals (const TypeVector< Real > &rhs, Realtol = TOLERANCE) const [inherited]Returns:

true iff two vectors occupy approximately the same physical location in space, to within a relative tolerance of tol.

 

Real TypeVector< Real >::size () const [inherited]Returns the magnitude of the vector, i.e. the square-root of the sum of the elements squared.

 

Real TypeVector< Real >::size_sq () const [inherited]Returns the magnitude of the vector squared, i.e. the sum of the element magnitudes squared.

 

void TypeVector< Real >::subtract (const TypeVector< T2 > &) [inherited]Subtract from this vector without creating a temporary.

 

void TypeVector< Real >::subtract_scaled (const TypeVector< T2 > &, const Real) [inherited]Subtract a scaled value from this vector without creating a temporary.

 

TypeVector<Real > 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 TypeVector< Real >::write_unformatted (std::ostream &out, const boolnewline = 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 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.  

std::ostream& operator<< (std::ostream &os, const TypeVector< Real > &t) [friend, inherited]Formatted print as above but allows you to do Point p(1,2,3); std::cout << p << std::endl;

Definition at line 268 of file type_vector.h.

  {
    t.print(os);
    return os;
  }
 

Member Data Documentation

 

Real TypeVector< Real >::_coords[LIBMESH_DIM] [protected, inherited]The coordinates of the TypeVector

Definition at line 286 of file type_vector.h.

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Member Functions
Protected Attributes
Friends
Detailed Description
Constructor & Destructor Documentation
Point::Point (const Realx = 0., const Realy = 0., const Realz = 0.) [inline]Constructor. By default sets all entries to 0. Gives the point 0 in LIBMESH_DIM dimensions.
Point::Point (const Point &p) [inline]Copy-constructor.
Point::Point (const TypeVector< Real > &p) [inline]Copy-constructor.
virtual Point::~Point () [inline, virtual]Empty.
Member Function Documentation
bool TypeVector< Real >::absolute_fuzzy_equals (const TypeVector< Real > &rhs, Realtol = TOLERANCE) const [inherited]Returns:
void TypeVector< Real >::add (const TypeVector< T2 > &) [inherited]Add to this vector without creating a temporary.
void TypeVector< Real >::add_scaled (const TypeVector< T2 > &, const Real) [inherited]Add a scaled value to this vector without creating a temporary.
void TypeVector< Real >::assign (const TypeVector< T2 > &) [inherited]Assign to a vector without creating a temporary.
TypeVector<typename CompareTypes<Real , T2>::supertype> TypeVector< Real >::cross (const TypeVector< T2 > &) const [inherited]Cross 2 vectors together, i.e. cross-product.
bool TypeVector< Real >::operator!= (const TypeVector< Real > &rhs) const [inline, inherited]Returns:
Real TypeVector< Real >::operator() (const unsigned inti) const [inherited]Return the $ i^{th} $ element of the vector.
Real & TypeVector< Real >::operator() (const unsigned inti) [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 TypeVector< Real >::operator* (const Scalar) const [inherited]Multiply a vector by a number, i.e. scale.
CompareTypes<Real , T2>::supertype 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 >& TypeVector< Real >::operator*= (const Real) [inherited]Multiply this vector by a number, i.e. scale.
TypeVector<typename CompareTypes<Real , T2>::supertype> TypeVector< Real >::operator+ (const TypeVector< T2 > &) const [inherited]Add two vectors.
const TypeVector<Real >& TypeVector< Real >::operator+= (const TypeVector< T2 > &) [inherited]Add to this vector.
TypeVector<typename CompareTypes<Real , T2>::supertype> TypeVector< Real >::operator- (const TypeVector< T2 > &) const [inherited]Subtract two vectors.
TypeVector<Real > TypeVector< Real >::operator- () const [inherited]Return the opposite of a vector
const TypeVector<Real >& 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 TypeVector< Real >::operator/ (const Scalar) const [inherited]Divide a vector by a number, i.e. scale.
const TypeVector<Real >& TypeVector< Real >::operator/= (const Real) [inherited]Divide this vector by a number, i.e. scale.
bool TypeVector< Real >::operator< (const TypeVector< Real > &rhs) const [inherited]Returns:
bool TypeVector< Real >::operator== (const TypeVector< Real > &rhs) const [inherited]Returns:
bool TypeVector< Real >::operator> (const TypeVector< Real > &rhs) const [inherited]Returns:
void TypeVector< Real >::print (std::ostream &os) const [inherited]Formatted print to std::cout.
bool TypeVector< Real >::relative_fuzzy_equals (const TypeVector< Real > &rhs, Realtol = TOLERANCE) const [inherited]Returns:
Real TypeVector< Real >::size () const [inherited]Returns the magnitude of the vector, i.e. the square-root of the sum of the elements squared.
Real TypeVector< Real >::size_sq () const [inherited]Returns the magnitude of the vector squared, i.e. the sum of the element magnitudes squared.
void TypeVector< Real >::subtract (const TypeVector< T2 > &) [inherited]Subtract from this vector without creating a temporary.
void TypeVector< Real >::subtract_scaled (const TypeVector< T2 > &, const Real) [inherited]Subtract a scaled value from this vector without creating a temporary.
TypeVector<Real > 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 TypeVector< Real >::write_unformatted (std::ostream &out, const boolnewline = 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 TypeVector< Real >::zero () [inherited]Zero the vector in any dimension.
Friends And Related Function Documentation
friend class Node [friend]Returns:
std::ostream& operator<< (std::ostream &os, const TypeVector< Real > &t) [friend, inherited]Formatted print as above but allows you to do Point p(1,2,3); std::cout << p << std::endl;
Member Data Documentation
Real TypeVector< Real >::_coords[LIBMESH_DIM] [protected, inherited]The coordinates of the TypeVector
Author

This document was created by man2html, using the manual pages.
Time: 21:52:48 GMT, April 16, 2011