3 #ifndef DUNE_PDELAB_COMMON_CROSSPRODUCT_HH
4 #define DUNE_PDELAB_COMMON_CROSSPRODUCT_HH
6 #include <dune/common/fvector.hh>
25 template<
unsigned dimB_,
unsigned dimC_>
28 "CrossProduct cannot be used unspecialized");
31 static const unsigned dimA;
33 static const unsigned dimB;
35 static const unsigned dimC;
38 template<
typename AType,
typename BType,
typename CType>
59 static const unsigned dimA = 3;
61 static const unsigned dimB = 3;
63 static const unsigned dimC = 3;
66 template<
typename AType,
typename BType,
typename CType>
68 for(
unsigned i = 0; i < 3; ++i) {
71 A[i] = B[j]*C[k] - B[k]*C[j];
99 static const unsigned dimA = 1;
101 static const unsigned dimB = 2;
103 static const unsigned dimC = 2;
106 template<
typename AType,
typename BType,
typename CType>
108 A[0] = B[0]*C[1] - B[1]*C[0];
136 static const unsigned dimA = 2;
138 static const unsigned dimB = 2;
140 static const unsigned dimC = 1;
143 template<
typename AType,
typename BType,
typename CType>
174 static const unsigned dimA = 2;
176 static const unsigned dimB = 1;
178 static const unsigned dimC = 2;
181 template<
typename AType,
typename BType,
typename CType>
202 template<
typename T,
int dimB,
int dimC>
204 const FieldVector<T, dimC>& c,
213 template<
typename T,
int dimB,
int dimC>
214 FieldVector<T, CrossProduct<dimB, dimC>::dimA>
216 const FieldVector<T, dimC>& c) {
217 FieldVector<T, CrossProduct<dimB, dimC>::dimA> a;
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
void crossproduct(const FieldVector< T, dimB > &b, const FieldVector< T, dimC > &c, FieldVector< T,(CrossProduct< dimB, dimC >::dimA)> &a)
calculate crossproduct
Definition: crossproduct.hh:203
Calculate cross product.
Definition: crossproduct.hh:26
static const unsigned dimB
dimension of
Definition: crossproduct.hh:33
static const unsigned dimC
dimension of
Definition: crossproduct.hh:35
CrossProduct(AType &A, const BType &B, const CType &C)
calculate cross product of B and C
static const unsigned dimA
dimension of
Definition: crossproduct.hh:28
CrossProduct(AType &A, const BType &B, const CType &C)
calculate cross product of B and C
Definition: crossproduct.hh:67
CrossProduct(AType &A, const BType &B, const CType &C)
calculate cross product of B and C
Definition: crossproduct.hh:107
CrossProduct(AType &A, const BType &B, const CType &C)
calculate cross product of B and C
Definition: crossproduct.hh:144
CrossProduct(AType &A, const BType &B, const CType &C)
calculate cross product of B and C
Definition: crossproduct.hh:182
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139