From 2c4e3b4e6624b0abc60ed540d62a65259fa42b25 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Thu, 14 Oct 2010 15:05:18 +0000 Subject: [PATCH] The method orthonormalFrame() now always returns a squared matrix. The first dim rows contain an orthonormal frame of the tangent space as before. The new rows contain an orthonormal frame of the normal bundle. [[Imported from SVN: r6432]] --- dune/gfe/unitvector.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dune/gfe/unitvector.hh b/dune/gfe/unitvector.hh index a8cd3287..a7be1603 100644 --- a/dune/gfe/unitvector.hh +++ b/dune/gfe/unitvector.hh @@ -6,6 +6,10 @@ #include <dune/gfe/tensor3.hh> +/** \brief A unit vector in R^dim + + \tparam dim Dimension of the embedding space +*/ template <int dim> class UnitVector { @@ -280,13 +284,16 @@ public: This basis is of course not globally continuous. */ - Dune::FieldMatrix<double,dim-1,dim> orthonormalFrame() const { + Dune::FieldMatrix<double,dim,dim> orthonormalFrame() const { - Dune::FieldMatrix<double,dim-1,dim> result; + Dune::FieldMatrix<double,dim,dim> result; if (dim==2) { + // spans the tangent space result[0][0] = -data_[1]; result[0][1] = data_[0]; + // spans the normal space + result[1] = data_; } else DUNE_THROW(Dune::NotImplemented, "orthonormalFrame for dim!=2!"); -- GitLab