MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
gradVecAssTest Namespace Reference

Functions

template<typename T >
Matrix< T, 3, 3 > & Euler123ToMatR (const Vector< T, 3 > &v, Matrix< T, 3, 3 > &R)
 

Variables

const int I1 = 1
 
const int I2 = 2
 
const int I3 = 3
 

Function Documentation

template<typename T >
Matrix<T, 3, 3>& gradVecAssTest::Euler123ToMatR ( const Vector< T, 3 > &  v,
Matrix< T, 3, 3 > &  R 
)

Definition at line 1790 of file matvectest.cc.

References grad::cos(), R, and grad::sin().

Referenced by cppad_benchmark1(), cppad_benchmark2(), and cppad_benchmark3().

1790  {
1791  T d = v(1);
1792  T dCosAlpha(cos(d));
1793  T dSinAlpha(sin(d));
1794  d = v(2);
1795  T dCosBeta(cos(d));
1796  T dSinBeta(sin(d));
1797  d = v(3);
1798  T dCosGamma(cos(d));
1799  T dSinGamma(sin(d));
1800 
1801  R(1, 1) = dCosBeta*dCosGamma;
1802  R(2, 1) = dCosAlpha*dSinGamma + dSinAlpha*dSinBeta*dCosGamma;
1803  R(3, 1) = dSinAlpha*dSinGamma - dCosAlpha*dSinBeta*dCosGamma;
1804  R(1, 2) = -dCosBeta*dSinGamma;
1805  R(2, 2) = dCosAlpha*dCosGamma - dSinAlpha*dSinBeta*dSinGamma;
1806  R(3, 2) = dSinAlpha*dCosGamma + dCosAlpha*dSinBeta*dSinGamma;
1807  R(1, 3) = dSinBeta;
1808  R(2, 3) = -dSinAlpha*dCosBeta;
1809  R(3, 3) = dCosAlpha*dCosBeta;
1810 
1811  return R;
1812 }
GradientExpression< UnaryExpr< FuncSin, Expr > > sin(const GradientExpression< Expr > &u)
Definition: gradient.h:2977
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
Definition: gradient.h:2978
Mat3x3 R

Here is the call graph for this function:

Variable Documentation

const int gradVecAssTest::I1 = 1

Definition at line 1787 of file matvectest.cc.

Referenced by testMatVecProductGradient().

const int gradVecAssTest::I2 = 2

Definition at line 1787 of file matvectest.cc.

const int gradVecAssTest::I3 = 3

Definition at line 1787 of file matvectest.cc.