Skip to content
Snippets Groups Projects
Commit e107effc authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

new method projectOntoTangentSpace

[[Imported from SVN: r5570]]
parent 380a80ac
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
} }
// Project gradient onto the tangent plane at b in order to obtain the surface gradient // Project gradient onto the tangent plane at b in order to obtain the surface gradient
result.axpy(-1*(b.data_*result), b.data_); result = b.projectOntoTangentSpace(result);
// Gradient must be a tangent vector at b, in other words, orthogonal to it // Gradient must be a tangent vector at b, in other words, orthogonal to it
assert( std::abs(b.data_ * result) < 1e-7); assert( std::abs(b.data_ * result) < 1e-7);
...@@ -63,6 +63,13 @@ public: ...@@ -63,6 +63,13 @@ public:
return result; return result;
} }
/** \brief Project tangent vector of R^n onto the tangent space */
EmbeddedTangentVector projectOntoTangentSpace(const EmbeddedTangentVector& v) const {
EmbeddedTangentVector result = v;
result.axpy(-1*(data_*result), data_);
return result;
}
/** \brief The global coordinates, if you really want them */ /** \brief The global coordinates, if you really want them */
const Dune::FieldVector<double,dim>& globalCoordinates() const { const Dune::FieldVector<double,dim>& globalCoordinates() const {
return data_; return data_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment