Templated 3D spatial vector derived from VectorSpace used to represent the anglular and linear components of position, velocity and acceleration of rigid bodies. More...
Classes | |
class | dual |
Class to represent the dual spatial vector. More... | |
Public Types | |
enum | components { WX, WY, WZ, LX, LY, LZ } |
Component labeling enumeration. More... | |
Public Types inherited from VectorSpace< SpatialVector< Cmpt >, Cmpt, 6 > | |
typedef VectorSpace< SpatialVector< Cmpt >, Cmpt, Ncmpts > | vsType |
VectorSpace type. More... | |
typedef Cmpt | cmptType |
Component type. More... | |
typedef Cmpt | magType |
Magnitude type. More... | |
typedef Cmpt * | iterator |
Random access iterator for traversing VectorSpace. More... | |
Public Member Functions | |
SpatialVector () | |
Construct null. More... | |
SpatialVector (const Foam::zero) | |
Construct initialized to zero. More... | |
SpatialVector (const typename SpatialVector::vsType &) | |
Construct given VectorSpace of the same rank. More... | |
SpatialVector (const Vector< Cmpt > &w, const Vector< Cmpt > &l) | |
Construct from the angular and linear vector components. More... | |
SpatialVector (const Cmpt &wx, const Cmpt &wy, const Cmpt &wz, const Cmpt &lx, const Cmpt &ly, const Cmpt &lz) | |
Construct given 6 components. More... | |
SpatialVector (Istream &) | |
Construct from Istream. More... | |
const Cmpt & | wx () const |
const Cmpt & | wy () const |
const Cmpt & | wz () const |
const Cmpt & | lx () const |
const Cmpt & | ly () const |
const Cmpt & | lz () const |
Cmpt & | wx () |
Cmpt & | wy () |
Cmpt & | wz () |
Cmpt & | lx () |
Cmpt & | ly () |
Cmpt & | lz () |
Vector< Cmpt > | w () const |
Return the angular part of the spatial vector as a vector. More... | |
Vector< Cmpt > | l () const |
Return the linear part of the spatial vector as a vector. More... | |
dual | operator* () const |
Return the dual spatial vector. More... | |
Public Member Functions inherited from VectorSpace< SpatialVector< Cmpt >, Cmpt, 6 > | |
VectorSpace ()=default | |
Default construct. More... | |
VectorSpace (const Foam::zero) | |
Construct initialized to zero. More... | |
VectorSpace (const VectorSpace< SpatialVector< Cmpt >, Cmpt, Ncmpts > &vs) | |
Copy construct. More... | |
VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &) | |
Copy construct of a VectorSpace with the same size. More... | |
VectorSpace (Istream &is) | |
Construct from Istream. More... | |
const Cmpt & | component (const direction) const |
Cmpt & | component (const direction) |
void | component (Cmpt &, const direction) const |
void | replace (const direction, const Cmpt &) |
const Cmpt * | cdata () const noexcept |
Return const pointer to the first data element. More... | |
Cmpt * | data () noexcept |
Return pointer to the first data element. More... | |
const ConstBlock< SubVector, BStart > | block () const |
const Foam::VectorSpace< SpatialVector< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
const Cmpt & | operator[] (const direction) const |
Cmpt & | operator[] (const direction) |
void | operator= (const VectorSpace< SpatialVector< Cmpt >, Cmpt, Ncmpts > &) |
void | operator= (const Foam::zero) |
void | operator+= (const VectorSpace< SpatialVector< Cmpt >, Cmpt, Ncmpts > &) |
void | operator-= (const VectorSpace< SpatialVector< Cmpt >, Cmpt, Ncmpts > &) |
void | operator*= (const scalar) |
void | operator/= (const scalar) |
iterator | begin () noexcept |
Return an iterator to begin of VectorSpace. More... | |
const_iterator | begin () const noexcept |
Return const_iterator to begin of VectorSpace. More... | |
iterator | end () noexcept |
Return an iterator to end of VectorSpace. More... | |
const_iterator | end () const noexcept |
Return const_iterator to end of VectorSpace. More... | |
const_iterator | cbegin () const noexcept |
Return const_iterator to begin of VectorSpace. More... | |
const_iterator | cend () const noexcept |
Return const_iterator to end of VectorSpace. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from VectorSpace< SpatialVector< Cmpt >, Cmpt, 6 > | |
static constexpr direction | size () noexcept |
The number of elements in the VectorSpace = Ncmpts. More... | |
static SpatialVector< Cmpt > | uniform (const Cmpt &s) |
Return a VectorSpace with all elements = s. More... | |
Public Attributes inherited from VectorSpace< SpatialVector< Cmpt >, Cmpt, 6 > | |
const typedef Cmpt * | const_iterator |
Random access iterator for traversing VectorSpace. More... | |
Cmpt | v_ [Ncmpts] |
The components of this vector space. More... | |
Static Public Attributes inherited from VectorSpace< SpatialVector< Cmpt >, Cmpt, 6 > | |
static constexpr direction | dim |
Dimensionality of space. More... | |
static constexpr direction | nComponents |
Number of components in this vector space. More... | |
static constexpr direction | mRows |
static constexpr direction | nCols |
static const char *const | typeName |
static const char *const | componentNames [] |
static const SpatialVector< Cmpt > | zero |
static const SpatialVector< Cmpt > | one |
static const SpatialVector< Cmpt > | max |
static const SpatialVector< Cmpt > | min |
static const SpatialVector< Cmpt > | rootMax |
static const SpatialVector< Cmpt > | rootMin |
Templated 3D spatial vector derived from VectorSpace used to represent the anglular and linear components of position, velocity and acceleration of rigid bodies.
Featherstone, R. (2008). Rigid body dynamics algorithms. Springer.
Definition at line 65 of file SpatialVector.H.
enum components |
Component labeling enumeration.
Enumerator | |
---|---|
WX | |
WY | |
WZ | |
LX | |
LY | |
LZ |
Definition at line 73 of file SpatialVector.H.
|
inline |
Construct null.
Definition at line 31 of file SpatialVectorI.H.
|
inline |
Construct initialized to zero.
Definition at line 36 of file SpatialVectorI.H.
|
inline |
Construct given VectorSpace of the same rank.
Definition at line 44 of file SpatialVectorI.H.
|
inline |
Construct from the angular and linear vector components.
Definition at line 54 of file SpatialVectorI.H.
|
inline |
Construct given 6 components.
Definition at line 70 of file SpatialVectorI.H.
|
inline |
Construct from Istream.
Definition at line 89 of file SpatialVectorI.H.
|
inline |
Definition at line 105 of file SpatialVectorI.H.
Referenced by Rx::jcalc(), and Foam::operator^().
|
inline |
Definition at line 112 of file SpatialVectorI.H.
Referenced by Ry::jcalc(), and Foam::operator^().
|
inline |
Definition at line 119 of file SpatialVectorI.H.
Referenced by Rz::jcalc(), and Foam::operator^().
|
inline |
Definition at line 126 of file SpatialVectorI.H.
Referenced by Foam::operator^().
|
inline |
Definition at line 133 of file SpatialVectorI.H.
Referenced by Foam::operator^().
|
inline |
Definition at line 140 of file SpatialVectorI.H.
Referenced by Foam::operator^().
|
inline |
Definition at line 147 of file SpatialVectorI.H.
|
inline |
Definition at line 154 of file SpatialVectorI.H.
|
inline |
Definition at line 161 of file SpatialVectorI.H.
|
inline |
Definition at line 168 of file SpatialVectorI.H.
|
inline |
Definition at line 175 of file SpatialVectorI.H.
|
inline |
Definition at line 182 of file SpatialVectorI.H.
|
inline |
Return the angular part of the spatial vector as a vector.
Definition at line 189 of file SpatialVectorI.H.
Referenced by rigidBodyMotion::status().
|
inline |
Return the linear part of the spatial vector as a vector.
Definition at line 195 of file SpatialVectorI.H.
Referenced by rigidBodyMotion::status(), and rigidBodyMotion::vCofR().
|
inline |
Return the dual spatial vector.
Definition at line 212 of file SpatialVectorI.H.