|
CG
Version 25
|
This class knows how to rotate around a line in space or translate along a line. More...
#include <MatrixMotion.h>


Public Types | |
| enum | MotionTypeEnum { rotateAroundALine, translateAlongALine } |
Public Member Functions | |
| MatrixMotion () | |
| Constructor: this class knows how to rotate around a line in space or translate along a line. | |
| MatrixMotion (const MatrixMotion &mm, const CopyType ct=DEEP) | |
| Copy constructor. | |
| ~MatrixMotion () | |
| Destructor. | |
| MatrixMotion & | operator= (const MatrixMotion &mm) |
| Equals operator. Set this object to be equal to another. | |
| int | getMotion (const real &t, RealArray &r) |
| : Determine the motion matrix at time t | |
| int | getMotion (const real &t, RealArray &r, RealArray &rp, int derivative, bool computeComposed=true) |
| Evaluate the motion matrix and an arbitrary time derivative. | |
| int | setLine (const real *x0, const real *v, const MotionTypeEnum motion=rotateAroundALine) |
| Define the line of rotation or line of translation from a point on the line and the tangent. | |
| int | setMotionType (const MotionTypeEnum motion) |
| Set the type of the motion. | |
| int | compose (MatrixMotion *motion) |
| Compose this MatrixMotion with another which is applied first. | |
| int | update (GenericGraphicsInterface &gi) |
| Interactively update MatrixMotion parameters: | |
| int | get (const GenericDataBase &dir, const aString &name) |
| Get from a data base file. | |
| int | put (GenericDataBase &dir, const aString &name) const |
| Put to a data base file. | |
This class knows how to rotate around a line in space or translate along a line.
| MatrixMotion::MatrixMotion | ( | ) |
Constructor: this class knows how to rotate around a line in space or translate along a line.
Motions are of the form of a rotation and translation: x(t) = R(t) * x(0) + g(t) where R(t) is a 3x3 matrix and g(t) is a 3-vector.
References rotateAroundALine, and TimeFunction::setLinearFunction().
Referenced by get(), operator=(), and update().
| MatrixMotion::MatrixMotion | ( | const MatrixMotion & | mm, |
| const CopyType | ct = DEEP |
||
| ) |
Copy constructor.
| MatrixMotion::~MatrixMotion | ( | ) |
Destructor.
| int MatrixMotion::compose | ( | MatrixMotion * | motion | ) |
Compose this MatrixMotion with another which is applied first.
| motion | (input) : apply this MatrixMotion before the current. (set to NULL for none) |
Referenced by getMotion(), and main().
| int MatrixMotion::get | ( | const GenericDataBase & | dir, |
| const aString & | name | ||
| ) |
Get from a data base file.
References get(), TimeFunction::get(), and MatrixMotion().
Referenced by get(), and MovingGrids::get().
| int MatrixMotion::getMotion | ( | const real & | t, |
| RealArray & | r | ||
| ) |
: Determine the motion matrix at time t
x(t) = R(t) * x(0) + g(t)
| r(0:2,0:3) | : 3x4 matrix holding the rotation matrix and shift: |
R = r(0:2,0;3) : 3x3 rotation matrix g = r(0:2,3) : 3 vector "shift"
Referenced by MovingGrids::getBoundaryAcceleration(), getGridMotion(), MovingGrids::getGridVelocity(), getMotion(), MovingGrids::gridAccelerationBC(), main(), and MovingGrids::moveGrids().
| int MatrixMotion::getMotion | ( | const real & | t, |
| RealArray & | r, | ||
| RealArray & | rp, | ||
| int | derivative, | ||
| bool | computeComposed = true |
||
| ) |
Evaluate the motion matrix and an arbitrary time derivative.
| t | (input) : time to evaluate the motion |
| r | (output) : matrix |
| rp | (output) : holds the "derivative" time derivative of r |
| derivative | (input) : if derivative>0 then evaluate this time derivative |
| computeComposed | (input) : if true (default) then evaluate the composed motion, otherwise just evaluate the un-composed mapping. |
References compose(), TimeFunction::eval(), TimeFunction::evalDerivative(), getMotion(), i, I3, j, k, OV_ABORT(), printF(), r, rotateAroundALine, theta, and translateAlongALine.
| MatrixMotion & MatrixMotion::operator= | ( | const MatrixMotion & | mm | ) |
Equals operator. Set this object to be equal to another.
References i, and MatrixMotion().
| int MatrixMotion::put | ( | GenericDataBase & | dir, |
| const aString & | name | ||
| ) | const |
| int MatrixMotion::setLine | ( | const real * | x0_, |
| const real * | v_, | ||
| const MotionTypeEnum | motion = rotateAroundALine |
||
| ) |
| int MatrixMotion::setMotionType | ( | const MotionTypeEnum | motion | ) |
Set the type of the motion.
| moition | (input) : set the motion type to this value. |
| int MatrixMotion::update | ( | GenericGraphicsInterface & | gi | ) |
Interactively update MatrixMotion parameters:
References assert(), MatrixMotion(), printF(), rotateAroundALine, translateAlongALine, update(), and TimeFunction::update().
Referenced by DomainSolver::getMovingGridOption(), main(), update(), and MovingGrids::update().
1.8.3