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

[bugfix] Assemble Laplace matrix for the h1 seminorm using the correct space

Previously, the matrix was always assembled using a P1-basis, even if we used
it to measure errors of vectors pertaining to P2 or other spaces.  Nobody noticed
this, because the h1SemiNorm routine would not fail if the vector was larger
than the matrix.   Sigh...

[[Imported from SVN: r9770]]
parent 0f16eda4
No related branches found
No related tags found
No related merge requests found
......@@ -112,11 +112,11 @@ setup(const GridType& grid,
// //////////////////////////////////////////////////////////////////////////////////////
// Assemble a Laplace matrix to create a norm that's equivalent to the H1-norm
// //////////////////////////////////////////////////////////////////////////////////////
typedef P1NodalBasis<typename GridType::LeafGridView,double> P1Basis;
P1Basis p1Basis(grid.leafGridView());
OperatorAssembler<P1Basis,P1Basis> operatorAssembler(p1Basis, p1Basis);
LaplaceAssembler<GridType, typename P1Basis::LocalFiniteElement, typename P1Basis::LocalFiniteElement> laplaceStiffness;
BasisType basis(grid.leafGridView());
OperatorAssembler<BasisType,BasisType> operatorAssembler(basis, basis);
LaplaceAssembler<GridType, typename BasisType::LocalFiniteElement, typename BasisType::LocalFiniteElement> laplaceStiffness;
typedef Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> > ScalarMatrixType;
ScalarMatrixType* A = new ScalarMatrixType;
......@@ -151,8 +151,6 @@ setup(const GridType& grid,
// Create the transfer operators
// ////////////////////////////////////
BasisType basis(grid_->leafGridView());
for (size_t k=0; k<mmgStep->mgTransfer_.size(); k++)
delete(mmgStep->mgTransfer_[k]);
......
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