From 08ffaa36a5b6636e0f79a107f92370dc82cd6d63 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 3 Aug 1998 15:16:18 +0000 Subject: [PATCH] Remove dependence of dVector from VectorBase. This makes many functions non-virtual. This change may be reverted some time if multigrid algorithms are used, but for the time being... git-svn-id: https://svn.dealii.org/trunk@475 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/dvector.h | 19 +++++++----------- deal.II/lac/include/lac/solver_cg.h | 1 + deal.II/lac/source/dvector.cc | 31 ++++++----------------------- 3 files changed, 14 insertions(+), 37 deletions(-) diff --git a/deal.II/lac/include/lac/dvector.h b/deal.II/lac/include/lac/dvector.h index a1286f3201..d998c1fad7 100644 --- a/deal.II/lac/include/lac/dvector.h +++ b/deal.II/lac/include/lac/dvector.h @@ -10,7 +10,6 @@ #include #include -#include #include @@ -27,8 +26,7 @@ * * @author Roland Becker, Guido Kanschat, Franz-Theo Suttmeier, revised and extended by Wolfgang Bangerth, documented by Klaus Mampel and Wolfgang Bangerth */ -class dVector : public VectorBase -{ +class dVector { friend class dFMatrix; protected: @@ -376,13 +374,13 @@ class dVector : public VectorBase /** * U(i)=a*V(j) . Replacing */ - void cequ(unsigned int i, const VectorBase& V, + void cequ(unsigned int i, const dVector& V, double a, unsigned int j); /** * U(i)=a*V(j)+b*V(k) . Replacing by sum */ - void cequ (const unsigned int i, const VectorBase& V, + void cequ (const unsigned int i, const dVector& V, const double a, const unsigned int j, const double b, const unsigned int k); @@ -390,7 +388,7 @@ class dVector : public VectorBase * U(i)=a*V(j)+b*V(k)+c*V(l)+d*V(m). * Replacing by sum */ - void cequ (const unsigned int i, const VectorBase& V, + void cequ (const unsigned int i, const dVector& V, const double a, const unsigned int j, const double b, const unsigned int k, const double c, const unsigned int l, @@ -399,13 +397,13 @@ class dVector : public VectorBase /** * U(i)+=a*V(j) . Simple addition */ - void cadd (const unsigned int i, const VectorBase& V, + void cadd (const unsigned int i, const dVector& V, const double a, const unsigned int j); /** * U(i)+=a*V(j)+b*V(k). Multiple addition */ - void cadd (const unsigned int i, const VectorBase& V, + void cadd (const unsigned int i, const dVector& V, const double a, const unsigned int j, const double b, const unsigned int k); @@ -413,7 +411,7 @@ class dVector : public VectorBase * U(i)+=a*V(j)+b*V(k)+c*V(l)+d*V(m). * Multiple addition */ - void cadd (const unsigned int i, const VectorBase& V, + void cadd (const unsigned int i, const dVector& V, const double a, const unsigned int j, const double b, const unsigned int k, const double c, const unsigned int l, @@ -425,9 +423,6 @@ class dVector : public VectorBase * @name 5: Mixed stuff */ //@{ - /// - virtual const char* name () const; - /** * Output of vector in user-defined format. */ diff --git a/deal.II/lac/include/lac/solver_cg.h b/deal.II/lac/include/lac/solver_cg.h index 167aedf4a6..548b5489f4 100644 --- a/deal.II/lac/include/lac/solver_cg.h +++ b/deal.II/lac/include/lac/solver_cg.h @@ -14,6 +14,7 @@ /** * Preconditioned cg method. + * @author Original implementation by G. Kanschat, R. Becker and F.-T. Suttmeier, reworking and documentation by Wolfgang Bangerth */ template class SolverPCG : public Solver { diff --git a/deal.II/lac/source/dvector.cc b/deal.II/lac/source/dvector.cc index 3e2f052194..9a40eea7fb 100644 --- a/deal.II/lac/source/dvector.cc +++ b/deal.II/lac/source/dvector.cc @@ -32,7 +32,6 @@ dVector::dVector (const unsigned int n) : dVector::dVector (const dVector& v) : - VectorBase(v), dim(v.size()), maxdim(v.size()), val(0) @@ -486,12 +485,10 @@ dVector& dVector::operator = (const dVector& v) -void dVector::cadd (const unsigned int i, const VectorBase& V, +void dVector::cadd (const unsigned int i, const dVector& v, const double s, const unsigned int j) { Assert (dim!=0, ExcEmptyVector()); - const dVector& v = (const dVector&) V; - Assert (i