MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
playground.cc File Reference
#include "mbconfig.h"
#include <cstdlib>
#include <cstring>
#include <iostream>
#include "matvec3.h"
#include "matvec6.h"
#include "matvecexp.h"
#include "Rot.hh"
Include dependency graph for playground.cc:

Go to the source code of this file.

Functions

int main (int argn, const char *const argv[])
 

Function Documentation

int main ( int  argn,
const char *const  argv[] 
)

Definition at line 43 of file playground.cc.

References Mat3x3::dDet(), RotManip::DRot_I(), Mat3x3::Inv(), Mat3x3::LDLSolve(), Mat3x3::MulMT(), R, RotManip::Rot(), and RotManip::VecRot().

44 {
45  static doublereal d[9];
46  while (true) {
47  std::cin >> d[0];
48  if (std::cin) {
49  std::cin >> d[1] >> d[2];
50 
51 #if 0
52  Mat3x3 Gamma_m1 = RotManip::DRot_I(Vec3(d));
53  Mat3x3 Gamma = Gamma_m1.Inv();
54  doublereal dDet = Gamma.dDet();
55  std::cout << "Gamma=" << Gamma << " det(Gamma)=" << dDet << std::endl;
56 #endif
57 
58 #if 0
60  Vec3 Theta(RotManip::VecRot(R));
61  Mat3x3 Rcheck(RotManip::Rot(Theta));
62  std::cout << "R={" << R << "}" << std::endl
63  << " V={" << Theta << "}" << std::endl
64  << " R={" << Rcheck << "}" << std::endl
65  << " I={" << R.MulMT(Rcheck) << "}"
66  << std::endl;
67 #endif
68 
69  std::cin >> d[3] >> d[4] >> d[5] >> d[6] >> d[7] >> d[8];
70  Mat3x3 M(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8]);
71  doublereal b[3];
72  std::cin >> b[0] >> b[1] >> b[2];
73  Vec3 x = M.LDLSolve(Vec3(b[0], b[1], b[2]));
74  std::cout << x << std::endl;
75  } else {
76  break;
77  }
78  }
79 
80  return EXIT_SUCCESS;
81 }
Definition: matvec3.h:98
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
Mat3x3 Inv(const doublereal &ddet) const
Definition: matvec3.cc:133
doublereal dDet(void) const
Definition: matvec3.cc:122
Mat3x3 Rot(const Vec3 &phi)
Definition: Rot.cc:62
Mat3x3 MulMT(const Mat3x3 &m) const
Definition: matvec3.cc:444
double doublereal
Definition: colamd.c:52
Mat3x3 DRot_I(const Vec3 &phi)
Definition: Rot.cc:111
Mat3x3 R

Here is the call graph for this function: