Skip to content
Snippets Groups Projects
Commit 52404011 authored by Lisa Julia Nebel's avatar Lisa Julia Nebel
Browse files

Fix error in surfacecosseratenergy

The contravariant base vectors were not calculated correctly.
The contravariant base vectors are the *columns* of the inverse of the covariant matrix, not the rows.
To fix this, take the rows of the transpose of inverse of the covariant matrix.
parent 80523cd2
No related branches found
No related tags found
1 merge request!81Fix error in surfacecosseratenergy
......@@ -263,6 +263,9 @@ RT energy(const typename Basis::LocalView& localView,
auto aContravariant = aCovariant;
aContravariant.invert();
// The contravariant base vectors are the *columns* of the inverse of the covariant matrix
// To get an easier access to the columns, we use the transpose of the contravariant matrix
aContravariant = Dune::GFE::transpose(aContravariant);
Dune::FieldMatrix<double,3,3> a(0);
for (int alpha=0; alpha<boundaryDim; alpha++)
......
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