From 006ef15072f2b25c1f7c58fdf5552958b275703a Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Mon, 8 Mar 2010 14:21:00 +0000 Subject: [PATCH] don't keep a grid view -- there is already one in the base class [[Imported from SVN: r5691]] --- src/rodassembler.cc | 14 +++++++------- src/rodassembler.hh | 8 ++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/rodassembler.cc b/src/rodassembler.cc index e769bf69..5e439209 100644 --- a/src/rodassembler.cc +++ b/src/rodassembler.cc @@ -18,7 +18,7 @@ assembleGradient(const std::vector<RigidBodyMotion<3> >& sol, { using namespace Dune; - const typename GridView::Traits::IndexSet& indexSet = gridView_.indexSet(); + const typename GridView::Traits::IndexSet& indexSet = this->gridView_.indexSet(); if (sol.size()!=indexSet.size(gridDim)) DUNE_THROW(Exception, "Solution vector doesn't match the grid!"); @@ -26,8 +26,8 @@ assembleGradient(const std::vector<RigidBodyMotion<3> >& sol, grad.resize(sol.size()); grad = 0; - ElementIterator it = gridView_.template begin<0>(); - ElementIterator endIt = gridView_.template end<0>(); + ElementIterator it = this->gridView_.template begin<0>(); + ElementIterator endIt = this->gridView_.template end<0>(); // Loop over all elements for (; it!=endIt; ++it) { @@ -62,7 +62,7 @@ getStrain(const std::vector<RigidBodyMotion<3> >& sol, { using namespace Dune; - const typename GridView::Traits::IndexSet& indexSet = gridView_.indexSet(); + const typename GridView::Traits::IndexSet& indexSet = this->gridView_.indexSet(); if (sol.size()!=indexSet.size(gridDim)) DUNE_THROW(Exception, "Solution vector doesn't match the grid!"); @@ -71,8 +71,8 @@ getStrain(const std::vector<RigidBodyMotion<3> >& sol, strain.resize(indexSet.size(0)); strain = 0; - ElementIterator it = gridView_.template begin<0>(); - ElementIterator endIt = gridView_.template end<0>(); + ElementIterator it = this->gridView_.template begin<0>(); + ElementIterator endIt = this->gridView_.template end<0>(); // Loop over all elements for (; it!=endIt; ++it) { @@ -151,7 +151,7 @@ getResultantForce(const BoundaryPatchBase<PatchGridView>& boundary, // if (gridView_ != &boundary.gridView()) // DUNE_THROW(Dune::Exception, "The boundary patch has to match the grid view of the assembler!"); - const typename GridView::Traits::IndexSet& indexSet = gridView_.indexSet(); + const typename GridView::Traits::IndexSet& indexSet = this->gridView_.indexSet(); if (sol.size()!=indexSet.size(gridDim)) DUNE_THROW(Exception, "Solution vector doesn't match the grid!"); diff --git a/src/rodassembler.hh b/src/rodassembler.hh index a0685369..3f699d79 100644 --- a/src/rodassembler.hh +++ b/src/rodassembler.hh @@ -33,15 +33,11 @@ class RodAssembler : public GeodesicFEAssembler<GridView, RigidBodyMotion<3> > //! typedef Dune::FieldMatrix<double, blocksize, blocksize> MatrixBlock; - /** \todo public only for debugging! */ - public: - GridView gridView_; - +public: //! ??? RodAssembler(const GridView &gridView, RodLocalStiffness<GridView,double>* localStiffness) - : GeodesicFEAssembler<GridView, RigidBodyMotion<3> >(gridView,localStiffness), - gridView_(gridView) + : GeodesicFEAssembler<GridView, RigidBodyMotion<3> >(gridView,localStiffness) { std::vector<RigidBodyMotion<3> > referenceConfiguration(gridView.size(gridDim)); -- GitLab