CG
Version 25
|
#include "RigidBodyMotion.h"
#include "GenericGraphicsInterface.h"
#include "display.h"
#include "TimeFunction.h"
Macros | |
#define | DGECO EXTERN_C_NAME(dgeco) |
#define | SGECO EXTERN_C_NAME(sgeco) |
#define | DGESL EXTERN_C_NAME(dgesl) |
#define | SGESL EXTERN_C_NAME(sgesl) |
#define | GECO SGECO |
#define | GESL SGESL |
Functions | |
RealArray | mult (const RealArray &a, const RealArray &b) |
return the product if two matrices. | |
RealArray | trans (const RealArray &a) |
return the transpose of a matrix | |
real | dot (const RealArray &a, const RealArray &b) |
return the dot product of two arrays | |
RealArray | getCrossProductMatrix (const RealArray &w) |
Return the matrix which represents the cross product of w with another vector, [ w X ]. | |
void | SGECO (real &b, const int &nbd, const int &nb, int &ipvt, real &rcond, real &work) |
void | DGECO (real &b, const int &nbd, const int &nb, int &ipvt, real &rcond, real &work) |
void | SGESL (real &a, const int &lda, const int &n, int &ipvt, real &b, int &job) |
void | DGESL (real &a, const int &lda, const int &n, int &ipvt, real &b, int &job) |
RealArray | solve (const RealArray &a, const RealArray &b) |
solve the matrix equation A*x = b and return x. | |
int | arrayToState (const RealArray &yv, RealArray &xv, RealArray &vv, RealArray &omegav, RealArray &ea) |
Unpack the state vector yv into the arrays xv, vv, omegav, and matrix ea. | |
int | stateToArray (const RealArray &xv, const RealArray &vv, const RealArray &omegav, const RealArray &ea, RealArray &yv) |
Pack the arrays xv, vv, omegav, and matrix ea into the state vector yv. | |
#define DGECO EXTERN_C_NAME(dgeco) |
#define DGESL EXTERN_C_NAME(dgesl) |
#define GECO SGECO |
#define GESL SGESL |
#define SGECO EXTERN_C_NAME(sgeco) |
#define SGESL EXTERN_C_NAME(sgesl) |
int arrayToState | ( | const RealArray & | yv, |
RealArray & | xv, | ||
RealArray & | vv, | ||
RealArray & | omegav, | ||
RealArray & | ea | ||
) |
Unpack the state vector yv into the arrays xv, vv, omegav, and matrix ea.
Referenced by RigidBodyMotion::dirkImplicitSolve().
void DGECO | ( | real & | b, |
const int & | nbd, | ||
const int & | nb, | ||
int & | ipvt, | ||
real & | rcond, | ||
real & | work | ||
) |
void DGESL | ( | real & | a, |
const int & | lda, | ||
const int & | n, | ||
int & | ipvt, | ||
real & | b, | ||
int & | job | ||
) |
real dot | ( | const RealArray & | a, |
const RealArray & | b | ||
) |
return the dot product of two arrays
References a, i, m, OV_ABORT(), and printF().
Referenced by Maxwell::advanceNew(), RigidBodyMotion::applyConstraints(), RigidBodyMotion::dirkImplicitSolve(), RigidBodyMotion::takeStepImplicitRungeKutta(), RigidBodyMotion::takeStepLeapFrog(), RigidBodyMotion::takeStepTrapezoid(), and RigidBodyMotion::update().
RealArray getCrossProductMatrix | ( | const RealArray & | w | ) |
Return the matrix which represents the cross product of w with another vector, [ w X ].
References assert(), n, and W.
Referenced by RigidBodyMotion::dirkImplicitSolve(), RigidBodyMotion::getCoordinates(), RigidBodyMotion::getForceInternal(), RigidBodyMotion::takeStepLeapFrog(), and RigidBodyMotion::takeStepTrapezoid().
RealArray mult | ( | const RealArray & | a, |
const RealArray & | b | ||
) |
return the product if two matrices.
References a, assert(), c, display(), i, j, k, m, n, OV_ABORT(), and printF().
Referenced by RigidBodyMotion::dirkImplicitSolve(), RigidBodyMotion::getCoordinates(), RigidBodyMotion::getForce(), RigidBodyMotion::getForceInternal(), RigidBodyMotion::integrate(), main(), RigidBodyMotion::takeStepLeapFrog(), and RigidBodyMotion::takeStepTrapezoid().
void SGECO | ( | real & | b, |
const int & | nbd, | ||
const int & | nb, | ||
int & | ipvt, | ||
real & | rcond, | ||
real & | work | ||
) |
void SGESL | ( | real & | a, |
const int & | lda, | ||
const int & | n, | ||
int & | ipvt, | ||
real & | b, | ||
int & | job | ||
) |
RealArray solve | ( | const RealArray & | a, |
const RealArray & | b | ||
) |
solve the matrix equation A*x = b and return x.
References a, display(), GECO, GESL, m, OV_ABORT(), printF(), and x.
Referenced by RigidBodyMotion::dirkImplicitSolve().
int stateToArray | ( | const RealArray & | xv, |
const RealArray & | vv, | ||
const RealArray & | omegav, | ||
const RealArray & | ea, | ||
RealArray & | yv | ||
) |
RealArray trans | ( | const RealArray & | a | ) |
return the transpose of a matrix
References a, c, i, j, m, and n.
Referenced by RigidBodyMotion::dirkImplicitSolve(), RigidBodyMotion::getCoordinates(), RigidBodyMotion::takeStepLeapFrog(), and RigidBodyMotion::takeStepTrapezoid().