libMesh
|
A Point
defines a location in LIBMESH_DIM dimensional Real space.
More...
#include <point.h>
Public Types | |
typedef Real | value_type |
Helper typedef for C++98 generic programming. More... | |
typedef unsigned int | index_type |
Helper typedef for generic index programming. More... | |
Public Member Functions | |
Point (const Real x=0., const Real y=0., const Real z=0.) | |
Constructor. More... | |
Point (const Point &p)=default | |
Trivial copy-constructor. More... | |
Point (const TypeVector< Real > &p) | |
Copy-constructor from non-point Typevector. More... | |
Point & | operator= (const Point &p)=default |
Copy-assignment operator. More... | |
template<typename T , typename = typename boostcopy::enable_if_c<ScalarTraits<T>::value,void>::type> | |
Point (const T x) | |
Disambiguate constructing from non-Real scalars. More... | |
~Point ()=default | |
Destructor. More... | |
void | assign (const TypeVector< T2 > &) |
Assign to this vector without creating a temporary. More... | |
const Real & | operator() (const unsigned int i) const |
Real & | operator() (const unsigned int i) |
const Real & | slice (const unsigned int i) const |
Real & | slice (const unsigned int i) |
TypeVector< typename CompareTypes< Real, T2 >::supertype > | operator+ (const TypeVector< T2 > &) const |
Add two vectors. More... | |
const TypeVector< Real > & | operator+= (const TypeVector< T2 > &) |
Add to this vector. More... | |
void | add (const TypeVector< T2 > &) |
Add to this vector without creating a temporary. More... | |
void | add_scaled (const TypeVector< T2 > &, const Real &) |
Add a scaled value to this vector without creating a temporary. More... | |
TypeVector< typename CompareTypes< Real, T2 >::supertype > | operator- (const TypeVector< T2 > &) const |
Subtract from this vector. More... | |
TypeVector< Real > | operator- () const |
const TypeVector< Real > & | operator-= (const TypeVector< T2 > &) |
Subtract from this vector. More... | |
void | subtract (const TypeVector< T2 > &) |
Subtract from this vector without creating a temporary. More... | |
void | subtract_scaled (const TypeVector< T2 > &, const Real &) |
Subtract a scaled value from this vector without creating a temporary. More... | |
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< Real, Scalar >::supertype > >::type | operator* (const Scalar &) const |
Multiply this vector by a scalar value. More... | |
CompareTypes< Real, T2 >::supertype | operator* (const TypeVector< T2 > &) const |
const TypeVector< Real > & | operator*= (const Real &) |
Multiply this vector by a scalar value. More... | |
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< Real, Scalar >::supertype > >::type | operator/ (const Scalar &) const |
Divide each entry of this vector by scalar value. More... | |
const TypeVector< Real > & | operator/= (const Real &) |
Divide each entry of this vector by scalar value. More... | |
CompareTypes< Real, T2 >::supertype | contract (const TypeVector< T2 > &) const |
TypeVector< typename CompareTypes< Real, T2 >::supertype > | cross (const TypeVector< T2 > &v) const |
TypeVector< Real > | unit () const |
auto | norm () const -> decltype(std::norm(Real())) |
auto | norm_sq () const -> decltype(std::norm(Real())) |
bool | is_zero () const |
void | zero () |
Set all entries of the vector to 0. More... | |
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< Complex > &rhs) const |
bool | operator<= (const TypeVector< Real > &rhs) const |
bool | operator<= (const TypeVector< Complex > &rhs) const |
bool | operator> (const TypeVector< Real > &rhs) const |
bool | operator> (const TypeVector< Complex > &rhs) const |
bool | operator>= (const TypeVector< Real > &rhs) const |
bool | operator>= (const TypeVector< Complex > &rhs) const |
void | print (std::ostream &os=libMesh::out) const |
Formatted print, by default to libMesh::out . More... | |
void | write_unformatted (std::ostream &out_stream, const bool newline=true) const |
Unformatted print to the stream out . More... | |
Protected Attributes | |
Real | _coords [LIBMESH_DIM] |
The coordinates of the TypeVector . More... | |
Friends | |
class | Node |
Make the derived class a friend. More... | |
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
.
|
inherited |
Helper typedef for generic index programming.
Definition at line 149 of file type_vector.h.
|
inherited |
Helper typedef for C++98 generic programming.
Definition at line 144 of file type_vector.h.
Constructor.
By default sets all entries to 0. Gives the point 0 in LIBMESH_DIM
dimensions.
Definition at line 47 of file point.h.
|
default |
Trivial copy-constructor.
|
inline |
Copy-constructor from non-point Typevector.
Definition at line 61 of file point.h.
|
inline |
Disambiguate constructing from non-Real scalars.
Definition at line 76 of file point.h.
|
default |
Destructor.
|
inlineinherited |
true
if two vectors are equal to within an absolute tolerance of tol
. Definition at line 979 of file type_vector.h.
References std::abs().
|
inlineinherited |
Add to this vector without creating a temporary.
Definition at line 627 of file type_vector.h.
|
inlineinherited |
Add a scaled value to this vector without creating a temporary.
Definition at line 651 of file type_vector.h.
|
inlineinherited |
Assign to this vector without creating a temporary.
Definition at line 556 of file type_vector.h.
|
inlineinherited |
Definition at line 896 of file type_vector.h.
|
inherited |
v
. Definition at line 906 of file type_vector.h.
References libMesh::libmesh_ignore().
|
inlineinherited |
Definition at line 969 of file type_vector.h.
|
inlineinherited |
Definition at line 929 of file type_vector.h.
References libMesh::TensorTools::norm_sq(), and std::sqrt().
|
inlineinherited |
Definition at line 948 of file type_vector.h.
References libMesh::TensorTools::norm_sq().
|
inlineinherited |
Definition at line 1051 of file type_vector.h.
|
inlineinherited |
Definition at line 566 of file type_vector.h.
|
inlineinherited |
Definition at line 577 of file type_vector.h.
|
inlineinherited |
Multiply this vector by a scalar value.
Definition at line 763 of file type_vector.h.
|
inlineinherited |
Definition at line 874 of file type_vector.h.
|
inlineinherited |
Multiply this vector by a scalar value.
Definition at line 800 of file type_vector.h.
|
inlineinherited |
Add two vectors.
Definition at line 590 of file type_vector.h.
|
inlineinherited |
Add to this vector.
Definition at line 615 of file type_vector.h.
|
inlineinherited |
Subtract from this vector.
Definition at line 676 of file type_vector.h.
|
inlineinherited |
Definition at line 735 of file type_vector.h.
|
inlineinherited |
Subtract from this vector.
Definition at line 702 of file type_vector.h.
|
inlineinherited |
Divide each entry of this vector by scalar value.
Definition at line 828 of file type_vector.h.
|
inlineinherited |
Divide each entry of this vector by scalar value.
Definition at line 857 of file type_vector.h.
|
inherited |
Definition at line 148 of file type_vector.C.
References std::imag(), and std::real().
|
inherited |
true
if this vector is "less" than rhs
.Useful for sorting. Also used for choosing some arbitrary basis function orientations.
Definition at line 90 of file type_vector.C.
|
inherited |
Definition at line 167 of file type_vector.C.
References std::imag(), and std::real().
|
inherited |
true
if this vector is <= to rhs
.Useful for sorting. Also used for choosing some arbitrary constraint equation directions.
Definition at line 104 of file type_vector.C.
|
inlineinherited |
true
if this(i)==rhs(i) for each component of the vector.absolute_fuzzy_equals()
may be a more appropriate choice. Definition at line 1029 of file type_vector.h.
Referenced by libMesh::Node::operator==().
|
inherited |
Definition at line 186 of file type_vector.C.
References std::imag(), and std::real().
|
inherited |
true
if this vector is "greater" than rhs
.Useful for sorting. Also used for choosing some arbitrary basis function orientations.
Definition at line 119 of file type_vector.C.
|
inherited |
Definition at line 205 of file type_vector.C.
References std::imag(), and std::real().
|
inherited |
true
if this vector is >= rhs
.Useful for sorting. Also used for choosing some arbitrary constraint equation directions.
Definition at line 133 of file type_vector.C.
|
inherited |
|
inlineinherited |
true
if two vectors are equal to within a relative tolerance of tol
. Definition at line 1004 of file type_vector.h.
References std::abs().
|
inlineinherited |
Definition at line 187 of file type_vector.h.
|
inlineinherited |
Definition at line 193 of file type_vector.h.
|
inlineinherited |
Subtract from this vector without creating a temporary.
Definition at line 714 of file type_vector.h.
|
inlineinherited |
Subtract a scaled value from this vector without creating a temporary.
Definition at line 725 of file type_vector.h.
|
inlineinherited |
Definition at line 1120 of file type_vector.h.
References std::norm().
|
inherited |
Unformatted print to the stream out
.
Simply prints the elements of the vector separated by spaces. Also prints a newline by default, however, this behavior can be controlled with the newline
parameter.
Definition at line 75 of file type_vector.C.
|
inlineinherited |
Set all entries of the vector to 0.
Definition at line 938 of file type_vector.h.
|
protectedinherited |
The coordinates of the TypeVector
.
Definition at line 439 of file type_vector.h.