From 8b7a38f1463b410e0b966c095b11cc2837f0a907 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Tue, 7 Jun 2011 09:36:39 +0000 Subject: [PATCH] move method assembleGradient out of the Imp class again [[Imported from SVN: r7388]] --- dune/gfe/localgeodesicfestiffness.hh | 29 ++++++++++------------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/dune/gfe/localgeodesicfestiffness.hh b/dune/gfe/localgeodesicfestiffness.hh index 680993f5..68a7e6ed 100644 --- a/dune/gfe/localgeodesicfestiffness.hh +++ b/dune/gfe/localgeodesicfestiffness.hh @@ -119,24 +119,6 @@ class LocalGeodesicFEStiffnessImp } - public: - static void assembleGradient(const Entity& element, - const std::vector<TargetSpace>& localSolution, - std::vector<typename TargetSpace::TangentVector>& localGradient, - const LocalGeodesicFEStiffness<GridView,TargetSpace>* energyObject) - { - std::vector<typename TargetSpace::EmbeddedTangentVector> embeddedLocalGradient; - - // first compute the gradient in embedded coordinates - assembleEmbeddedGradient(element, localSolution, embeddedLocalGradient, energyObject); - - // transform to coordinates on the tangent space - localGradient.resize(embeddedLocalGradient.size()); - - for (size_t i=0; i<localGradient.size(); i++) - localSolution[i].orthonormalFrame().mv(embeddedLocalGradient[i], localGradient[i]); - - } }; @@ -200,7 +182,16 @@ assembleGradient(const Entity& element, const std::vector<TargetSpace>& localSolution, std::vector<typename TargetSpace::TangentVector>& localGradient) const { - LocalGeodesicFEStiffnessImp<GridView,TargetSpace>::assembleGradient(element, localSolution, localGradient,this); + std::vector<typename TargetSpace::EmbeddedTangentVector> embeddedLocalGradient; + + // first compute the gradient in embedded coordinates + LocalGeodesicFEStiffnessImp<GridView,TargetSpace>::assembleEmbeddedGradient(element, localSolution, embeddedLocalGradient, this); + + // transform to coordinates on the tangent space + localGradient.resize(embeddedLocalGradient.size()); + + for (size_t i=0; i<localGradient.size(); i++) + localSolution[i].orthonormalFrame().mv(embeddedLocalGradient[i], localGradient[i]); } template <class GridView, class TargetSpace> -- GitLab