Skip to content
Snippets Groups Projects
Commit 21177d60 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Implement the derivative of the projection onto the set of unit vectors

This is needed for projection-based finite elements.

The code in this patch has not been tested yet.

[[Imported from SVN: r9887]]
parent e00c1422
No related branches found
No related tags found
No related merge requests found
...@@ -374,6 +374,15 @@ public: ...@@ -374,6 +374,15 @@ public:
return result; return result;
} }
static Dune::FieldMatrix<T, N, N> derivativeOfProjection(const Dune::FieldVector<T,N>& p)
{
Dune::FieldMatrix<T,N,N> result;
for (int i=0; i<N; i++)
for (int j=0; j<N; j++)
result[i][j] = ( (i==j) - p[i]*p[j] / p.two_norm2() ) / p.two_norm();
return result;
}
/** \brief The global coordinates, if you really want them */ /** \brief The global coordinates, if you really want them */
const CoordinateType& globalCoordinates() const { const CoordinateType& 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