Skip to content
Snippets Groups Projects
Commit 5c96f55a authored by Uli Sack's avatar Uli Sack Committed by usack
Browse files

harmonized type name of Vector with other Norm-classes

[[Imported from SVN: r5604]]
parent 848c97a2
Branches
Tags 0.1.7
No related merge requests found
......@@ -12,10 +12,10 @@
* \f$\Vert u \Vert_M = (u, Mu)^{1/2} = (mu,mu)^{1/2}\f$
*
* \tparam LowRankFactor the type of the factor used to represent the low rank operator
* \tparam Vector the vector type the norm may be applied to
* \tparam VectorType the vector type the norm may be applied to
*/
template <class LowRankFactor, class Vector>
class FullNorm: public Norm<Vector>
template <class LowRankFactor, class VectorType>
class FullNorm: public Norm<VectorType>
{
public:
FullNorm(double alpha, const LowRankFactor &lowRankFactor) :
......@@ -24,9 +24,9 @@ class FullNorm: public Norm<Vector>
{}
//! Compute the norm of the given vector
double operator()(const Vector &v) const
double operator()(const VectorType &v) const
{
Vector r(lowRankFactor_.N());
VectorType r(lowRankFactor_.N());
r = 0.0;
lowRankFactor_.umv(v,r);
......@@ -37,12 +37,12 @@ class FullNorm: public Norm<Vector>
}
//! Compute the norm of the difference of two vectors
double diff(const Vector &v1, const Vector &v2) const
double diff(const VectorType &v1, const VectorType &v2) const
{
Vector r(lowRankFactor_.N());
VectorType r(lowRankFactor_.N());
r = 0.0;
// Vector temp(v1);
// VectorType temp(v1);
// v1 -= v2;
// lowRankFactor_.umv(temp,r);
......@@ -64,15 +64,15 @@ class FullNorm: public Norm<Vector>
class FullNorm<Dune::BlockVector<Dune::FieldVector<double,1> >, Dune::BlockVector<Dune::FieldVector<double,1> > >:
public Norm<Dune::BlockVector<Dune::FieldVector<double,1> > >
{
typedef <Dune::BlockVector<Dune::FieldVector<double,1> > Vector;
typedef <Dune::BlockVector<Dune::FieldVector<double,1> > VectorType;
public:
FullNorm(double alpha, const Vector &m) :
FullNorm(double alpha, const VectorType &m) :
m(m),
alpha(alpha)
{}
//! Compute the norm of the given vector
double operator()(const Vector &v) const
double operator()(const VectorType &v) const
{
double r = 0.0;
......@@ -83,7 +83,7 @@ class FullNorm<Dune::BlockVector<Dune::FieldVector<double,1> >, Dune::BlockVecto
}
//! Compute the norm of the difference of two vectors
double diff(const Vector &v1, const Vector &v2) const
double diff(const VectorType &v1, const VectorType &v2) const
{
double r = 0.0;
......@@ -94,7 +94,7 @@ class FullNorm<Dune::BlockVector<Dune::FieldVector<double,1> >, Dune::BlockVecto
}
private:
const Vector &m;
const VectorType &m;
const double alpha;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment