diff --git a/src/rodassembler.cc b/src/rodassembler.cc index d0a4992cf7ffa13285947b9ab0adebc7d3cef4f8..75541f8fdd50df32c051df30ba9d3b4ef5ed44cd 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 7375fab34b2be779a62463eda30582e804845b4c..69425981d7611ba608ceb09b9c5b42a7cb5f2f03 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;