MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::MatRInit< T, VectorExpr > Class Template Reference

#include <matvec.h>

Collaboration diagram for grad::MatRInit< T, VectorExpr >:

Public Member Functions

 MatRInit (const VectorExpression< VectorExpr, 3 > &g)
 
void Initialize (Matrix< T, 3, 3 > &RDelta) const
 
index_type iGetNumRows () const
 
index_type iGetNumCols () const
 

Static Public Attributes

static const index_type iNumRows = 3
 
static const index_type iNumCols = 3
 

Private Attributes

const VectorExpression
< VectorExpr, 3 > 
g
 

Detailed Description

template<typename T, typename VectorExpr>
class grad::MatRInit< T, VectorExpr >

Definition at line 2646 of file matvec.h.

Constructor & Destructor Documentation

template<typename T , typename VectorExpr >
grad::MatRInit< T, VectorExpr >::MatRInit ( const VectorExpression< VectorExpr, 3 > &  g)
inline

Definition at line 2651 of file matvec.h.

2652  :g(g) {
2653  }
const VectorExpression< VectorExpr, 3 > g
Definition: matvec.h:2680

Member Function Documentation

template<typename T , typename VectorExpr >
index_type grad::MatRInit< T, VectorExpr >::iGetNumCols ( void  ) const
inline

Definition at line 2677 of file matvec.h.

2677 { return iNumCols; }
static const index_type iNumCols
Definition: matvec.h:2649
template<typename T , typename VectorExpr >
index_type grad::MatRInit< T, VectorExpr >::iGetNumRows ( void  ) const
inline

Definition at line 2676 of file matvec.h.

References grad::Vector< T, N_rows >::iNumRows.

2676 { return iNumRows; }
static const index_type iNumRows
Definition: matvec.h:2648
template<typename T , typename VectorExpr >
void grad::MatRInit< T, VectorExpr >::Initialize ( Matrix< T, 3, 3 > &  RDelta) const
inline

Definition at line 2655 of file matvec.h.

References grad::Dot().

2655  {
2656  const T d = 4. / (4. + Dot(g, g));
2657 
2658  const T tmp1 = -g(3) * g(3);
2659  const T tmp2 = -g(2) * g(2);
2660  const T tmp3 = -g(1) * g(1);
2661  const T tmp4 = g(1) * g(2) * 0.5;
2662  const T tmp5 = g(2) * g(3) * 0.5;
2663  const T tmp6 = g(1) * g(3) * 0.5;
2664 
2665  RDelta(1,1) = (tmp1 + tmp2) * d * 0.5 + 1;
2666  RDelta(1,2) = (tmp4 - g(3)) * d;
2667  RDelta(1,3) = (tmp6 + g(2)) * d;
2668  RDelta(2,1) = (g(3) + tmp4) * d;
2669  RDelta(2,2) = (tmp1 + tmp3) * d * 0.5 + 1.;
2670  RDelta(2,3) = (tmp5 - g(1)) * d;
2671  RDelta(3,1) = (tmp6 - g(2)) * d;
2672  RDelta(3,2) = (tmp5 + g(1)) * d;
2673  RDelta(3,3) = (tmp2 + tmp3) * d * 0.5 + 1.;
2674  }
const VectorExpression< VectorExpr, 3 > g
Definition: matvec.h:2680
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
Definition: matvec.h:3133

Here is the call graph for this function:

Member Data Documentation

template<typename T , typename VectorExpr >
const VectorExpression<VectorExpr, 3> grad::MatRInit< T, VectorExpr >::g
private

Definition at line 2680 of file matvec.h.

template<typename T , typename VectorExpr >
const index_type grad::MatRInit< T, VectorExpr >::iNumCols = 3
static

Definition at line 2649 of file matvec.h.

template<typename T , typename VectorExpr >
const index_type grad::MatRInit< T, VectorExpr >::iNumRows = 3
static

Definition at line 2648 of file matvec.h.


The documentation for this class was generated from the following file: