|
IFEM
90A354
|
Simple class for representing a point in 3D space and time. More...
#include <Vec3.h>


Public Member Functions | |
| Vec4 (const Real *par=nullptr, Real T=Real(0)) | |
| Default constructor creating a point at origin. | |
| Vec4 (Real T) | |
| Constructor creating a point at origin and time T. | |
| Vec4 (Real X, Real Y, Real Z, Real T=Real(0)) | |
| Constructor creating a point at the specified location. | |
| Vec4 (const Vec3 &X, Real T=Real(0), int id=-1) | |
| Constructor creating a point at the specified location. | |
| Vec4 (const Vec3 &X, Real T, const Real *par) | |
| Constructor creating a point at the specified location. | |
| Vec4 (const std::vector< Real > &X, const Real *par=nullptr) | |
| Constructor creating a point from the given std::vector. | |
| Vec4 (const Vec4 &X) | |
| Copy constructor. | |
| Vec4 & | operator= (const Vec4 &X) |
| Assignment operator. | |
| Vec4 & | operator= (Real val) |
| Overloaded assignment operator. | |
| Vec4 & | assign (const Vec3 &X) |
| Assignment method. | |
| std::ostream & | print (std::ostream &os, double tol=1.0e-12) const override |
| Print out a vector. | |
Public Member Functions inherited from Vec3 | |
| Vec3 () | |
| Default constructor creating a point at origin. | |
| Vec3 (Real X, Real Y, Real Z=Real(0)) | |
| Constructor creating a point at the specified location. | |
| Vec3 (const Real *pos, size_t n=3) | |
| Constructor creating a point at the specified location. | |
| Vec3 (const std::vector< Real > &X) | |
| Constructor creating a point from the given std::vector. | |
| Vec3 (const Vec3 &X) | |
| Copy constructor. | |
| Vec3 (const Vec3 &X, const Vec3 &Y) | |
| Constructor creating a cross product of two other vectors. | |
| virtual | ~Vec3 () |
| Empty destructor. | |
| Vec3 & | operator= (const Vec3 &X) |
| Assignment operator. | |
| Vec3 & | operator= (Real val) |
| Overloaded assignment operator. | |
| const Real & | operator() (int i) const |
| Indexing operator for component reference (1-based). | |
| const Real & | operator[] (int i) const |
| Indexing operator for component reference (0-based). | |
| Real & | operator() (int i) |
| Indexing operator for component assignment (1-based). | |
| Real & | operator[] (int i) |
| Indexing operator for component assignment (0-based). | |
| const Real * | ptr () const |
| Reference through a pointer. | |
| std::vector< Real > | vec (size_t n=3) const |
| Conversion to std::vector. | |
| Vec3 & | operator*= (Real c) |
| Multiplication with a scalar. | |
| Vec3 & | operator/= (Real d) |
| Division by a scalar. | |
| Vec3 & | operator+= (const Vec3 &X) |
| Add the given vector X to *this. | |
| Vec3 & | operator-= (const Vec3 &X) |
| Subtract the given vector X from *this. | |
| Vec3 | operator- () const |
| Negation operator. | |
| Real | sum () const |
| Return the sum of the vector components. | |
| Real | asum () const |
| Return the sum of absolute values of the vector components. | |
| Real | length2 () const |
| Return the square of the length of the vector. | |
| double | length () const |
| Return the length of the vector. | |
| Real | normalize (double tol=1.0e-16) |
| Normalize the vector and return its length. | |
| Vec3 & | cross (const Vec3 &a, const Vec3 &b) |
| Cross product between two vectors. | |
| bool | equal (const Vec3 &a, double tol=1.0e-6) const |
| Equality check between two vectors. | |
| bool | isZero (double tol=1.0e-6) const |
| Check if the vector is zero with the given tolerance. | |
| bool | lessThan (const Vec3 &a, double tol=1.0e-6) const |
| Check if one vector is less than the other. More... | |
| bool | inside (const Vec3 &a, const Vec3 &b, double tol=1.0e-6) const |
| Check if a vector is inside the box defined by two other vectors. | |
Public Attributes | |
| const Real * | u |
| Spline parameters of point. | |
| Real | t |
| The time coordinate. | |
| int | idx |
| Nodal point index. | |
Public Attributes inherited from Vec3 | |
| Real & | x |
| Reference to X-component. | |
| Real & | y |
| Reference to Y-component. | |
| Real & | z |
| Reference to Z-component. | |
Additional Inherited Members | |
Static Public Attributes inherited from Vec3 | |
| static double | comparisonTolerance = 1.0e-4 |
| Coordinate comparison tolerance. | |
Simple class for representing a point in 3D space and time.