50                 << 
"    mass:        " << 
dMass << std::endl
 
   51                 << 
"    J:           " << 
J << std::endl
 
   52                 << 
"    Xcg:         " << 
X_cm << std::endl
 
   53                 << 
"    Jcg:         " << 
J_cm << std::endl
 
   54                 << 
"    Vcg:         " << 
V_cm << std::endl
 
   55                 << 
"    Wcg:         " << 
Omega_cm << std::endl;
 
   67         for (std::set<const ElemGravityOwner *>::const_iterator i = 
elements.begin();
 
   70                 dMass += (*i)->dGetM();
 
   79         if (
dMass < std::numeric_limits<doublereal>::epsilon()) {
 
  136                 << ( 
GetName().empty() ? 
"" : ( std::string(
" \"") + 
GetName() + 
"\"" ) )
 
  141                 << 
"    Xcg-X:       " << DX << std::endl
 
  142                 << 
"    R^T*(Xcg-X): " << 
R0.
MulTV(DX) << std::endl
 
  143                 << 
"    J(X):        " << JX << std::endl
 
  144                 << 
"    R^T*J(X)*R:  " << 
R0.
MulTM(JX)*
R0 << std::endl
 
  145                 << 
"    Rp:          " << 
R_princ << std::endl
 
  147                 << 
"    Jp:          " << 
J_princ << std::endl;
 
  160 Inertia::Inertia(
unsigned int uL, 
const std::string& sN, std::set<const ElemGravityOwner *>& elements,
 
  176 flags(0), X0(x0), R0(r0)
 
  184         if (!(
R0 - 
Eye3).IsNull()) {
 
  189         if ((fOut & 0x1) & !silent_output) {
 
  237         if (
dMass < std::numeric_limits<doublereal>::epsilon()) {
 
  238                 silent_cerr(
"Inertia(" << 
GetLabel() << 
"): " 
  239                         "mass is null" << std::endl);
 
  312         std::ostringstream os;
 
  313         os << 
"elem.inertia." << 
GetLabel();
 
  314         (void)OH.CreateVar(os.str(), 
"inertia");
 
  332                         Var_dMass = OH.CreateVar<
doublereal>(name + 
"M", 
"kg",
 
  334                         Var_X_cm = OH.CreateVar<
Vec3>(name + 
"X_cm", 
"m",
 
  335                                 "center of mass position (x, y, z)");
 
  336                         Var_V_cm = OH.CreateVar<
Vec3>(name + 
"V_cm", 
"m/s",
 
  337                                 "center of mass velocity (x, y, z)");
 
  338                         Var_Omega_cm = OH.CreateVar<
Vec3>(name + 
"Omega_cm", 
"rad/s",
 
  339                                 "center of mass angular velocity (x, y, z)");
 
  341                         Var_DX = OH.CreateVar<
Vec3>(name + 
"DX", 
"m",
 
  342                                 "relative center of mass position, global frame (x, y, z)");
 
  343                         Var_dx = OH.CreateVar<
Vec3>(name + 
"dx", 
"m",
 
  344                                 "relative center of mass position, local frame (x, y, z)");
 
  345                         Var_Jp = OH.CreateVar<
Vec3>(name + 
"Jp", 
"kg*m^2",
 
  346                                 "global inertia matrix, w.r.t. principal axes");
 
  347                         Var_Phip = OH.CreateVar<
Vec3>(name + 
"Phip", 
"-",
 
  348                                 "orientation vector of principal axes, global frame");
 
  473         unsigned int idx = 0;
 
  480                 if (strncasecmp(s, 
"Phi", 
STRLENOF(
"Phi")) != 0) {
 
  492                 if (strncasecmp(s, 
"Omega", 
STRLENOF(
"Omega")) != 0) {
 
  544                         idx += 3*(s[0] - 
'1');
 
  554         if (strcmp(s, 
"]") != 0) {
 
  564         unsigned int what = (i - 1)/3;
 
  565         unsigned int which = (i - 1)%3 + 1;
 
  595         int ir = (i - 15 - 1)%3 + 1;
 
  596         int ic = (i - 15 - 1)/3 + 1;
 
void PutName(const std::string &sN)
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
virtual void Output(OutputHandler &OH) const 
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const 
virtual bool bToBeOutput(void) const 
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
#define MBDYN_EXCEPT_ARGS
bool UseNetCDF(int out) const 
void OutputPrepare(OutputHandler &OH)
const Mat3x3 Eye3(1., 0., 0., 0., 1., 0., 0., 0., 1.)
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const 
virtual bool bInverseDynamics(void) const 
std::set< const ElemGravityOwner * > elements
virtual std::ostream & Output_int(std::ostream &out) const 
std::vector< Hint * > Hints
virtual unsigned int iGetInitialNumDof(void) const 
Vec3 VecRot(const Mat3x3 &Phi)
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Vec3 MulTV(const Vec3 &v) const 
virtual unsigned int iGetPrivDataIdx(const char *s) const 
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual unsigned int iGetNumPrivData(void) const 
void OutputPrepare_int(OutputHandler &OH, std::string &name)
GradientExpression< UnaryExpr< FuncLog, Expr > > log(const GradientExpression< Expr > &u)
long GetCurrentStep(void) const 
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
doublereal dGetM(void) const 
CenterOfMass(std::set< const ElemGravityOwner * > &elements)
virtual doublereal dGetPrivData(unsigned int i) const 
bool EigSym(Vec3 &EigenValues) const 
bool IsOpen(int out) const 
#define ASSERT(expression)
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const 
Mat3x3 MulTM(const Mat3x3 &m) const 
virtual ~CenterOfMass(void)
virtual void Collect_int(void)
Vec3 LDLSolve(const Vec3 &v) const 
bool IsSymmetric(void) const 
const MatCrossCross_Manip MatCrossCross
virtual Elem::Type GetElemType(void) const 
virtual std::ostream & Restart(std::ostream &out) const 
const doublereal * pGetVec(void) const 
virtual flag fToBeOutput(void) const 
Mat3x3 MulMT(const Mat3x3 &m) const 
Mat3x3 GetJ_int(void) const 
Inertia(unsigned int uL, const std::string &sN, std::set< const ElemGravityOwner * > &elements, const Vec3 &x0, const Mat3x3 &r0, std::ostream &log, flag fOut)
const std::string & GetName(void) const 
virtual void SetValue(DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
unsigned int GetLabel(void) const 
virtual void Collect_int(void)
Vec3 GetS_int(void) const 
virtual std::ostream & Output_int(std::ostream &out) const 
virtual void Resize(integer iNewSize)=0
bool UseText(int out) const