Skip to content
Snippets Groups Projects
Commit 0a847023 authored by Max Kahnt's avatar Max Kahnt
Browse files

Allow to set MatrixType via template parameter.

parent ea2e3a3f
No related branches found
No related tags found
1 merge request!17Cleanup/norms
......@@ -11,13 +11,14 @@
#include "norm.hh"
//! Specialisation of the EnergyNorm class to identity blocks
template<class VectorType>
class H1SemiNorm : public Norm<VectorType>
template<class V, class M = Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> >>
class H1SemiNorm : public Norm<V>
{
public:
typedef V VectorType;
H1SemiNorm() : matrix_(NULL) {}
H1SemiNorm(const Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> >& matrix)
H1SemiNorm(const MatrixType& matrix)
: matrix_(&matrix)
{
assert(matrix.N() == matrix.M());
......@@ -69,7 +70,7 @@ public:
return std::sqrt(sum);
}
const Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> >* matrix_;
const MatrixType* matrix_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment