Skip to content
Snippets Groups Projects

Fix error in nonplanarcosseratshellenergy

1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
  • bd97e290
    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.
@@ -230,6 +230,9 @@ 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<gridDim; alpha++)
Loading