diff --git a/dune/gfe/cosseratenergystiffness.hh b/dune/gfe/cosseratenergystiffness.hh index 3157e8fb31d5cb4adf058614c538321af1f138af..fa4b6660501069dafbe5adcc7bacb58367614095 100644 --- a/dune/gfe/cosseratenergystiffness.hh +++ b/dune/gfe/cosseratenergystiffness.hh @@ -450,6 +450,8 @@ energy(const Entity& element, const LocalFiniteElement& localFiniteElement, const std::vector<RigidBodyMotion<double,dim> >& localSolution) const { + assert(element.type() == localFiniteElement.type()); + RT energy = 0; LocalGeodesicFEFunction<gridDim, double, LocalFiniteElement, TargetSpace> localGeodesicFEFunction(localFiniteElement,