From 10cce9442b58bd718db5de20249dff828d0ddf2a Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 17 Apr 2009 13:42:07 +0000 Subject: [PATCH] assembleGradient in RodLocalStiffness should override the corresponding method in the base class [[Imported from SVN: r4022]] --- src/rodassembler.cc | 3 ++- src/rodlocalstiffness.hh | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/rodassembler.cc b/src/rodassembler.cc index 114af253..f177ae4b 100644 --- a/src/rodassembler.cc +++ b/src/rodassembler.cc @@ -154,7 +154,8 @@ assembleGradient(const std::vector<RigidBodyMotion<3> >& sol, // Assemble local gradient array<FieldVector<double,blocksize>, nDofs> localGradient; - localStiffness.assembleGradient(*it, localSolution, localReferenceConfiguration, localGradient); + localStiffness.localReferenceConfiguration_ = localReferenceConfiguration; + localStiffness.assembleGradient(*it, localSolution, localGradient); // Add to global gradient for (int i=0; i<nDofs; i++) diff --git a/src/rodlocalstiffness.hh b/src/rodlocalstiffness.hh index 8bab6c94..f254cc01 100644 --- a/src/rodlocalstiffness.hh +++ b/src/rodlocalstiffness.hh @@ -91,7 +91,6 @@ public: /** \brief Assemble the element gradient of the energy functional */ void assembleGradient(const Entity& element, const std::vector<RigidBodyMotion<3> >& solution, - const std::vector<RigidBodyMotion<3> >& referenceConfiguration, Dune::array<Dune::FieldVector<double,6>, 2>& gradient) const; template <class T> @@ -461,7 +460,6 @@ template <class GridType, class RT> void RodLocalStiffness<GridType, RT>:: assembleGradient(const Entity& element, const std::vector<RigidBodyMotion<3> >& solution, - const std::vector<RigidBodyMotion<3> >& referenceConfiguration, Dune::array<Dune::FieldVector<double,6>, 2>& gradient) const { using namespace Dune; @@ -527,7 +525,7 @@ assembleGradient(const Entity& element, FieldVector<double,blocksize> strain = getStrain(solution, element, quadPos); // The reference strain - FieldVector<double,blocksize> referenceStrain = getStrain(referenceConfiguration, element, quadPos); + FieldVector<double,blocksize> referenceStrain = getStrain(localReferenceConfiguration_, element, quadPos); // dd_dvij[m][i][j] = \parder {(d_k)_i} {q} @@ -603,7 +601,7 @@ assembleGradient(const Entity& element, FieldVector<double,blocksize> strain = getStrain(solution, element, quadPos); // The reference strain - FieldVector<double,blocksize> referenceStrain = getStrain(referenceConfiguration, element, quadPos); + FieldVector<double,blocksize> referenceStrain = getStrain(localReferenceConfiguration_, element, quadPos); // First derivatives of the position array<Quaternion<double>,6> dq_dwij; -- GitLab