16#include <dune/common/fvector.hh>
29 template<
class Scalar>
35 template<
class Scalar>
37 result[0] = v1[1]*v2[2] - v1[2]*v2[1];
38 result[1] = v1[2]*v2[0] - v1[0]*v2[2];
39 result[2] = v1[0]*v2[1] - v1[1]*v2[0];
47 template<
class Vector>
49 if(vector.two_norm() < 1e-16)
return vector;
50 vector /= vector.two_norm();
61 template<
class Vector>
63 if(vector.two_norm() < 1e-16)
return vector;
65 result /= result.two_norm();
77 template<
class Vector>
79 vec -= (vec*planeNormal)*planeNormal;
90 template <
class Vector>
93 vec -=(vec*projectionUnitNormal)*projectionUnitNormal;
This file contains various utility functions that augment the basic functionality of Dune.
T vectorProduct(Dune::FieldVector< T, 2 > const &x, Dune::FieldVector< T, 2 > const &y)
vector product .
Dune::FieldVector< Scalar, dim > Vector