Commit 19db2486 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[math] add triple product

the triple product will be used in mpfa methods to determine whether or not
three connection vectors form a right hand basis inside a sub control volume

(cherry picked from commit 719d59dadb2cbfead3a11a61c733296acc502bbb)
parent 010151a6
......@@ -498,6 +498,18 @@ Scalar crossProduct(const Dune::FieldVector<Scalar, 2> &vec1,
const Dune::FieldVector<Scalar, 2> &vec2)
{ return vec1[0]*vec2[1]-vec1[1]*vec2[0]; }
* \brief Triple product of three vectors in three-dimensional Euclidean space retuning scalar
* \param vec1 The first vector
* \param vec2 The second vector
* \param vec3 The third vector
template <class Scalar>
Scalar tripleProduct(const Dune::FieldVector<Scalar, 3> &vec1,
const Dune::FieldVector<Scalar, 3> &vec2,
const Dune::FieldVector<Scalar, 3> &vec3)
{ return crossProduct<Scalar>(vec1, vec2)*vec3; }
} // end namespace Dumux
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment