From 7071f9ad648d15a633c330bed141030edc35a6fb Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 23 Aug 2005 16:43:51 +0000
Subject: [PATCH] minor cleanup

[[Imported from SVN: r482]]
---
 src/rodassembler.cc |  4 ----
 src/rodassembler.hh | 27 ++++++++++++++++++---------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/rodassembler.cc b/src/rodassembler.cc
index d0a4992c..75541f8f 100644
--- a/src/rodassembler.cc
+++ b/src/rodassembler.cc
@@ -46,12 +46,9 @@ assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol,
                BCRSMatrix<MatrixBlock>& matrix)
 {
 
-    //int n = grid_->size(grid_->maxlevel(), dim);
-    
     MatrixIndexSet neighborsPerVertex;
     getNeighborsPerVertex(neighborsPerVertex);
     
-    //neighborsPerVertex.exportIdx(*matrix_);
     matrix = 0;
     
     ElementIterator it    = grid_->template lbegin<0>( grid_->maxlevel() );
@@ -68,7 +65,6 @@ assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol,
 
         // Extract local solution
         BlockVector<FieldVector<double, blocksize> > localSolution(numOfBaseFct);
-        //BlockVector<FieldVector<double, dim> > localRhs(numOfBaseFct);
         
         for (int i=0; i<numOfBaseFct; i++)
             localSolution[i] = sol[functionSpace_.mapToGlobal(*it,i)];
diff --git a/src/rodassembler.hh b/src/rodassembler.hh
index 7375fab3..69425981 100644
--- a/src/rodassembler.hh
+++ b/src/rodassembler.hh
@@ -38,8 +38,6 @@ namespace Dune
         typedef typename FunctionSpaceType::RangeField RangeFieldType;
         typedef typename FunctionSpaceType::Range       RangeType;
         
-    public:
-        
         /** \todo Does actually belong into the base class */
         const GridType* grid_; 
         
@@ -51,6 +49,8 @@ namespace Dune
         double A1;
         double A3;
 
+    public:
+        
         //! ???
         RodAssembler(const FunctionSpaceType &f) : 
             functionSpace_(f)
@@ -63,24 +63,33 @@ namespace Dune
 
         ~RodAssembler() {}
 
-        void getNeighborsPerVertex(MatrixIndexSet& nb) const;
-        
+        void setParameters(double b, double a1, double a3) {
+            B  = b;
+            A1 = a1;
+            A3 = a3;
+        }
+
         /** \brief Assemble the tangent stiffness matrix and the right hand side
          */
         void assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol,
                             BCRSMatrix<MatrixBlock>& matrix);
         
+        void assembleGradient(const BlockVector<FieldVector<double, blocksize> >& sol,
+                              BlockVector<FieldVector<double, blocksize> >& grad) const;
+
+        /** \brief Compute the energy of a deformation state */
+        double computeEnergy(const BlockVector<FieldVector<double, blocksize> >& sol) const;
+
+        void getNeighborsPerVertex(MatrixIndexSet& nb) const;
+        
+    protected:
+
         /** \brief Compute the element tangent stiffness matrix  */
         template <class MatrixType>
         void getLocalMatrix( EntityType &entity, 
                              const BlockVector<FieldVector<double, blocksize> >& localSolution, 
                              const int matSize, MatrixType& mat) const;
 
-        void assembleGradient(const BlockVector<FieldVector<double, blocksize> >& sol,
-                              BlockVector<FieldVector<double, blocksize> >& grad) const;
-
-        /** \brief Compute the energy of a deformation state */
-        double computeEnergy(const BlockVector<FieldVector<double, blocksize> >& sol) const;
         
         
         
-- 
GitLab