Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef DUNE_SKEW_MATRIX_HH
#define DUNE_SKEW_MATRIX_HH
/** \brief Static dense skew-symmetric matrix */
template <class T, int N>
class SkewMatrix
{};
/** \brief Static dense skew-symmetric 3x3 matrix */
template <class T>
class SkewMatrix<T,3>
{
public:
/** \brief Default constructor -- does nothing */
SkewMatrix()
{}
/** \brief Constructor from an axial vector */
explicit SkewMatrix(const Dune::FieldVector<T,3>& v)
: data_(v)
{}
SkewMatrix<T,3>& operator*=(const T& a)
{
data_ *= a;
return *this;
}
Dune::FieldVector<T,3>& axial()
{
return data_;
}
const Dune::FieldVector<T,3>& axial() const
{
return data_;
}
private:
// we store the axial vector
Dune::FieldVector<T,3> data_;
};
#endif