#include <RealVect.H>
Collaboration diagram for RealVect:
The class RealVect is an implementation of a Real vector in a SpaceDim-dimensional space. RealVect values are accessed using the operator[] function, as for a normal C++ array. In addition, the basic arithmetic operators have been overloaded to implement scaling and translation operations.
Constants | |
const RealVect | Zero |
const RealVect | Unit |
RealVect | BASISREALV (int dir) |
Public Member Functions | |
Constructors and Accessors | |
RealVect () | |
RealVect (const Vector< Real > &) | |
RealVect (D_DECL(Real i, Real j, Real k)) | |
RealVect (const RealVect &rhs) | |
RealVect (const IntVect &iv) | |
RealVect & | operator= (const RealVect &rhs) |
Real & | operator[] (int i) |
const Real & | operator[] (int i) const |
Comparison Operators | |
bool | operator== (const RealVect &p) const |
bool | operator!= (const RealVect &p) const |
bool | operator< (const RealVect &p) const |
bool | operator<= (const RealVect &p) const |
bool | operator> (const RealVect &p) const |
bool | operator>= (const RealVect &p) const |
Arithmetic Operators | |
RealVect & | operator+= (Real s) |
RealVect & | operator+= (const RealVect &p) |
RealVect & | operator-= (Real s) |
RealVect & | operator-= (const RealVect &p) |
RealVect | operator- (Real s) const |
RealVect & | operator *= (Real s) |
Real | dotProduct (const RealVect &a_rhs) const |
RealVect & | operator *= (const RealVect &p) |
RealVect | operator * (Real s) const |
RealVect & | operator/= (Real s) |
RealVect & | operator/= (const RealVect &p) |
RealVect | operator/ (Real s) const |
RealVect & | scale (Real s) |
Unary operators | |
RealVect | operator+ () const |
RealVect | operator- () const |
Real | sum () const |
Real | product () const |
int | minDir (const bool &a_doAbs) const |
int | maxDir (const bool &a_doAbs) const |
Data pointer functions | |
const Real * | dataPtr () const |
Real * | dataPtr () |
Static Public Attributes | |
size_t | io_offset |
Protected Attributes | |
Real | vect [SpaceDim] |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const RealVect &p) |
Arithmetic friend functions | |
RealVect | operator+ (Real s, const RealVect &p) |
RealVect | operator- (Real s, const RealVect &p) |
RealVect | operator * (Real s, const RealVect &p) |
RealVect | operator/ (Real s, const RealVect &p) |
RealVect | operator+ (const RealVect &s, const RealVect &p) |
RealVect | operator- (const RealVect &s, const RealVect &p) |
RealVect | operator * (const RealVect &s, const RealVect &p) |
RealVect | operator/ (const RealVect &s, const RealVect &p) |
RealVect | scale (const RealVect &p, Real s) |
|
Construct a RealVect whose components are zero. |
|
|
|
Construct a RealVect given the specific values for its coordinates. D_DECL is a macro that sets the constructor to take CH_SPACEDIM arguments. |
|
The copy constructor. |
|
Construct a RealVect from an IntVect by coercing each component from |
|
The assignment operator. |
|
Returns a modifiable lvalue reference to the i'th coordinate of the RealVect. |
|
Returns the i'th coordinate of the RealVect. |
|
Returns true if this RealVect is equivalent to argument RealVect. All comparisons between analogous components must be satisfied. |
|
Returns true if this RealVect is different from argument RealVect. All comparisons between analogous components must be satisfied. |
|
Returns true if this RealVect is less than argument RealVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is component-wise, it is possible for an RealVect to be neither greater than, less than, nor equal to another. |
|
Returns true if this RealVect is less than or equal to argument RealVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is component-wise, it is possible for an RealVect to be neither greater than or equal to, less than or equal to, nor equal to another. |
|
Returns true if this RealVect is greater than argument RealVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is component-wise, it is possible for an RealVect to be neither greater than, less than, nor equal to another. |
|
Returns true if this RealVect is greater than or equal to argument RealVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is component-wise, it is possible for an RealVect to be neither greater than or equal to, less than or equal to, nor equal to another. |
|
Modifies this RealVect by addition of a scalar to each component. |
|
Modifies this RealVect by component-wise addition by argument. |
|
Modifies this RealVect by subtraction of a scalar from each component. |
|
Modifies this RealVect by component-wise subtraction by argument. |
|
Returns a RealVect that is this RealVect with a scalar s subtracted from each component. |
|
Modifies this RealVect by multiplying each component by a scalar. |
|
|
|
Modifies this RealVect by component-wise multiplication by argument. |
|
Returns a RealVect that is this RealVect with each component multiplied by a scalar. |
|
Modifies this RealVect by dividing each component by a scalar. |
|
Modifies this RealVect by component-wise division by argument. |
|
Returns a RealVect that is this RealVect with each component divided by a scalar. |
|
Modifies this RealVect by multiplying each component by a scalar. |
|
Unary plus -- for completeness. |
|
Unary minus -- negates all components of this RealVect. |
|
Sum of all components of this RealVect. |
|
Product of all components of this RealVect. |
|
Component with the minimum value of this RealVect (returns 0 if they are all the same). a_doAbs : if true then take the absolute value before comparing |
|
Component with the maximum value of this RealVect (returns 0 if they are all the same). a_doAbs : if true then take the absolute value before comparing |
|
Only for sending stuff to Fortran |
|
Only for sending stuff to Fortran |
|
Returns a basis vector in the given coordinate direction. |
|
Returns a RealVect that is a RealVect p with a scalar s added to each component. |
|
Returns s - p. |
|
Returns a RealVect that is a RealVect p with each component multiplied by a scalar s. |
|
Returns a RealVect that is a RealVect p with each component divided by a scalar s. |
|
Returns component-wise sum of RealVects s and p. |
|
Returns s - p. |
|
Returns component-wise product of s and p. |
|
Returns component-wise quotient p / s. |
|
Returns a RealVect obtained by multiplying each of the components of the given RealVect by a scalar. |
|
Print to the given output stream in ASCII. |
|
This is a RealVect all of whose components are equal to zero. |
|
This is a RealVect all of whose components are equal to one. |
|
|
|
The individual components of this RealVect. |