From f81fba53ae5fb4120dd179a6fd3467b7970073bc Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Thu, 19 Mar 2015 19:12:10 +0000 Subject: [PATCH] Take intersections from the grid view, not from the element Getting intersections from the element has been deprecated for a long time, because the precise intersection one gets does not only depend on the element, but also on the grid view. [[Imported from SVN: r10090]] --- dune/gfe/cosseratenergystiffness.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dune/gfe/cosseratenergystiffness.hh b/dune/gfe/cosseratenergystiffness.hh index 93de487c..8b8fa351 100644 --- a/dune/gfe/cosseratenergystiffness.hh +++ b/dune/gfe/cosseratenergystiffness.hh @@ -386,20 +386,20 @@ energy(const Entity& element, if (not neumannFunction_) return energy; - for (typename Entity::LeafIntersectionIterator it = element.ileafbegin(); it != element.ileafend(); ++it) { - - if (not neumannBoundary_ or not neumannBoundary_->contains(*it)) + for (auto&& it : intersections(neumannBoundary_->gridView(),element) ) + { + if (not neumannBoundary_ or not neumannBoundary_->contains(it)) continue; const Dune::QuadratureRule<DT, gridDim-1>& quad - = Dune::QuadratureRules<DT, gridDim-1>::rule(it->type(), quadOrder); + = Dune::QuadratureRules<DT, gridDim-1>::rule(it.type(), quadOrder); for (size_t pt=0; pt<quad.size(); pt++) { // Local position of the quadrature point - const Dune::FieldVector<DT,gridDim>& quadPos = it->geometryInInside().global(quad[pt].position()); + const Dune::FieldVector<DT,gridDim>& quadPos = it.geometryInInside().global(quad[pt].position()); - const DT integrationElement = it->geometry().integrationElement(quad[pt].position()); + const DT integrationElement = it.geometry().integrationElement(quad[pt].position()); // The value of the local function RigidBodyMotion<field_type,dim> value = localGeodesicFEFunction.evaluate(quadPos); @@ -410,7 +410,7 @@ energy(const Entity& element, if (dynamic_cast<const VirtualGridViewFunction<GridView,Dune::FieldVector<double,3> >*>(neumannFunction_)) dynamic_cast<const VirtualGridViewFunction<GridView,Dune::FieldVector<double,3> >*>(neumannFunction_)->evaluateLocal(element, quadPos, neumannValue); else - neumannFunction_->evaluate(it->geometry().global(quad[pt].position()), neumannValue); + neumannFunction_->evaluate(it.geometry().global(quad[pt].position()), neumannValue); // Only translational dofs are affected by the Neumann force for (size_t i=0; i<neumannValue.size(); i++) -- GitLab