Skip to content
Snippets Groups Projects
Commit 7071f9ad authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

minor cleanup

[[Imported from SVN: r482]]
parent 5c1ceace
No related branches found
No related tags found
No related merge requests found
...@@ -46,12 +46,9 @@ assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol, ...@@ -46,12 +46,9 @@ assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol,
BCRSMatrix<MatrixBlock>& matrix) BCRSMatrix<MatrixBlock>& matrix)
{ {
//int n = grid_->size(grid_->maxlevel(), dim);
MatrixIndexSet neighborsPerVertex; MatrixIndexSet neighborsPerVertex;
getNeighborsPerVertex(neighborsPerVertex); getNeighborsPerVertex(neighborsPerVertex);
//neighborsPerVertex.exportIdx(*matrix_);
matrix = 0; matrix = 0;
ElementIterator it = grid_->template lbegin<0>( grid_->maxlevel() ); ElementIterator it = grid_->template lbegin<0>( grid_->maxlevel() );
...@@ -68,7 +65,6 @@ assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol, ...@@ -68,7 +65,6 @@ assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol,
// Extract local solution // Extract local solution
BlockVector<FieldVector<double, blocksize> > localSolution(numOfBaseFct); BlockVector<FieldVector<double, blocksize> > localSolution(numOfBaseFct);
//BlockVector<FieldVector<double, dim> > localRhs(numOfBaseFct);
for (int i=0; i<numOfBaseFct; i++) for (int i=0; i<numOfBaseFct; i++)
localSolution[i] = sol[functionSpace_.mapToGlobal(*it,i)]; localSolution[i] = sol[functionSpace_.mapToGlobal(*it,i)];
......
...@@ -38,8 +38,6 @@ namespace Dune ...@@ -38,8 +38,6 @@ namespace Dune
typedef typename FunctionSpaceType::RangeField RangeFieldType; typedef typename FunctionSpaceType::RangeField RangeFieldType;
typedef typename FunctionSpaceType::Range RangeType; typedef typename FunctionSpaceType::Range RangeType;
public:
/** \todo Does actually belong into the base class */ /** \todo Does actually belong into the base class */
const GridType* grid_; const GridType* grid_;
...@@ -51,6 +49,8 @@ namespace Dune ...@@ -51,6 +49,8 @@ namespace Dune
double A1; double A1;
double A3; double A3;
public:
//! ??? //! ???
RodAssembler(const FunctionSpaceType &f) : RodAssembler(const FunctionSpaceType &f) :
functionSpace_(f) functionSpace_(f)
...@@ -63,24 +63,33 @@ namespace Dune ...@@ -63,24 +63,33 @@ namespace Dune
~RodAssembler() {} ~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 /** \brief Assemble the tangent stiffness matrix and the right hand side
*/ */
void assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol, void assembleMatrix(const BlockVector<FieldVector<double, blocksize> >& sol,
BCRSMatrix<MatrixBlock>& matrix); 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 */ /** \brief Compute the element tangent stiffness matrix */
template <class MatrixType> template <class MatrixType>
void getLocalMatrix( EntityType &entity, void getLocalMatrix( EntityType &entity,
const BlockVector<FieldVector<double, blocksize> >& localSolution, const BlockVector<FieldVector<double, blocksize> >& localSolution,
const int matSize, MatrixType& mat) const; 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment