From 0dc1eaf2dce112758b06726431316a28a287ef0e Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 21 Dec 2015 14:42:19 -0500 Subject: [PATCH] remove NamedData and deprecated algorithms::Operator - remove deprecated algorithms::Operator - remove references to NamedData --- examples/doxygen/theta_timestepping.cc | 4 +-- include/deal.II/algorithms/named_selection.h | 4 +-- include/deal.II/algorithms/newton.h | 8 ++--- include/deal.II/algorithms/newton.templates.h | 3 +- include/deal.II/algorithms/operator.h | 35 ------------------- .../deal.II/algorithms/operator.templates.h | 4 --- .../deal.II/algorithms/theta_timestepping.h | 10 +++--- .../algorithms/theta_timestepping.templates.h | 2 +- source/algorithms/operator.inst.in | 1 - tests/algorithms/newton_01.cc | 4 +-- tests/algorithms/theta_01.cc | 4 +-- 11 files changed, 20 insertions(+), 59 deletions(-) diff --git a/examples/doxygen/theta_timestepping.cc b/examples/doxygen/theta_timestepping.cc index 3fdb0fbe18..33ec369fa4 100644 --- a/examples/doxygen/theta_timestepping.cc +++ b/examples/doxygen/theta_timestepping.cc @@ -29,7 +29,7 @@ using namespace dealii; using namespace Algorithms; -class Explicit : public Operator > +class Explicit : public OperatorBase { public: Explicit(const FullMatrix &matrix); @@ -41,7 +41,7 @@ private: }; -class Implicit : public Operator > +class Implicit : public OperatorBase { public: Implicit(const FullMatrix &matrix); diff --git a/include/deal.II/algorithms/named_selection.h b/include/deal.II/algorithms/named_selection.h index 1d7498ea45..c426e396b1 100644 --- a/include/deal.II/algorithms/named_selection.h +++ b/include/deal.II/algorithms/named_selection.h @@ -24,7 +24,7 @@ DEAL_II_NAMESPACE_OPEN /** - * Select data from NamedData corresponding to the attached name. + * Select data from AnyData corresponding to the attached name. * * Given a list of names to search for (provided by add()), objects of this * class provide an index list of the selected data. @@ -58,7 +58,7 @@ public: /** - * Return the corresponding index in the NamedData object supplied to the + * Return the corresponding index in the AnyData object supplied to the * last initialize(). It is an error if initialize() has not been called * before. * diff --git a/include/deal.II/algorithms/newton.h b/include/deal.II/algorithms/newton.h index f85aa1d41c..a58d1a9516 100644 --- a/include/deal.II/algorithms/newton.h +++ b/include/deal.II/algorithms/newton.h @@ -64,14 +64,14 @@ namespace Algorithms * @author Guido Kanschat, 2006, 2010 */ template - class Newton : public Operator + class Newton : public OperatorBase { public: /** * Constructor, receiving the applications computing the residual and * solving the linear problem, respectively. */ - Newton (Operator &residual, Operator &inverse_derivative); + Newton (OperatorBase &residual, OperatorBase &inverse_derivative); /** * Declare the parameters applicable to Newton's method. @@ -112,12 +112,12 @@ namespace Algorithms /** * The operator computing the residual. */ - SmartPointer, Newton > residual; + SmartPointer > residual; /** * The operator applying the inverse derivative to the residual. */ - SmartPointer, Newton > inverse_derivative; + SmartPointer > inverse_derivative; /** * The operator handling the output in case the debug_vectors is true. diff --git a/include/deal.II/algorithms/newton.templates.h b/include/deal.II/algorithms/newton.templates.h index aa2622e266..9a844e74b2 100644 --- a/include/deal.II/algorithms/newton.templates.h +++ b/include/deal.II/algorithms/newton.templates.h @@ -28,7 +28,8 @@ DEAL_II_NAMESPACE_OPEN namespace Algorithms { template - Newton::Newton(Operator &residual, Operator &inverse_derivative) + Newton::Newton(OperatorBase &residual, + OperatorBase &inverse_derivative) : residual(&residual), inverse_derivative(&inverse_derivative), assemble_now(false), diff --git a/include/deal.II/algorithms/operator.h b/include/deal.II/algorithms/operator.h index 5602b4f743..f56bdb11c1 100644 --- a/include/deal.II/algorithms/operator.h +++ b/include/deal.II/algorithms/operator.h @@ -97,41 +97,6 @@ namespace Algorithms }; - /** - * @deprecated This class has been replaced by OperatorBase. - * - * The abstract base class of all algorithms in this library. An operator is - * an object with an operator(), which transforms a set of named vectors - * into another set of named vectors. - * - * Furthermore, an operator can be notified of parameter changes by the - * calling routine. The outer iteration can notify() the Operator of an - * Event, which could be for instance a change of mesh, a different time - * step size or too slow convergence of Newton's method, which would then - * trigger reassembling of a matrix or similar things. - * - *

Usage for nested iterations

- * - * This is probably the most prominent use for Operator, where an outer - * iterative method calls an inner solver and so on. Typically, the - * innermost method in such a nested system will have to compute a residual - * using values from all outer iterations. Since the depth and order of such - * a nesting is hardly predictable when designing a general tool, we use - * NamedData to access these vectors. Typically, the first vector in - * out contains the start vector when operator()() is called, and - * the solution when the function returns. The object in is - * providing additional information and forwarded to the inner Operator - * objects of the nested iteration. - * - * @author Guido Kanschat, 2010 - */ - template - class Operator : public OperatorBase - { - public: - Operator(); - }; - /** * An unary operator base class, intended to output the vectors in AnyData * in each step of an iteration. diff --git a/include/deal.II/algorithms/operator.templates.h b/include/deal.II/algorithms/operator.templates.h index c0b65a778b..937ee64de9 100644 --- a/include/deal.II/algorithms/operator.templates.h +++ b/include/deal.II/algorithms/operator.templates.h @@ -21,10 +21,6 @@ DEAL_II_NAMESPACE_OPEN namespace Algorithms { - template - Operator::Operator() - {} - template OutputOperator::~OutputOperator() {} diff --git a/include/deal.II/algorithms/theta_timestepping.h b/include/deal.II/algorithms/theta_timestepping.h index 423c078c78..df4802ac67 100644 --- a/include/deal.II/algorithms/theta_timestepping.h +++ b/include/deal.II/algorithms/theta_timestepping.h @@ -187,7 +187,7 @@ namespace Algorithms * @date 2010 */ template - class ThetaTimestepping : public Operator + class ThetaTimestepping : public OperatorBase { public: /** @@ -195,8 +195,8 @@ namespace Algorithms * #op_implicit. For their meaning, see the description of those * variables. */ - ThetaTimestepping (Operator &op_explicit, - Operator &op_implicit); + ThetaTimestepping (OperatorBase &op_explicit, + OperatorBase &op_implicit); /** * The timestepping scheme. @@ -309,7 +309,7 @@ namespace Algorithms * vector, $M$ the mass matrix, $F$ the operator in space and $c$ is the * adjusted time step size $(1-\theta) \Delta t$. */ - SmartPointer, ThetaTimestepping > op_explicit; + SmartPointer > op_explicit; /** * The operator solving the implicit part of the scheme. It will receive @@ -321,7 +321,7 @@ namespace Algorithms * the input data, M the mass matrix, F the operator in * space and c is the adjusted time step size $ \theta \Delta t$ */ - SmartPointer, ThetaTimestepping > op_implicit; + SmartPointer > op_implicit; /** * The operator writing the output in each time step diff --git a/include/deal.II/algorithms/theta_timestepping.templates.h b/include/deal.II/algorithms/theta_timestepping.templates.h index 71d048d4c8..40e19a1820 100644 --- a/include/deal.II/algorithms/theta_timestepping.templates.h +++ b/include/deal.II/algorithms/theta_timestepping.templates.h @@ -24,7 +24,7 @@ DEAL_II_NAMESPACE_OPEN namespace Algorithms { template - ThetaTimestepping::ThetaTimestepping (Operator &e, Operator &i) + ThetaTimestepping::ThetaTimestepping (OperatorBase &e, OperatorBase &i) : vtheta(0.5), adaptive(false), op_explicit(&e), op_implicit(&i) {} diff --git a/source/algorithms/operator.inst.in b/source/algorithms/operator.inst.in index 8b04299908..e693263e0e 100644 --- a/source/algorithms/operator.inst.in +++ b/source/algorithms/operator.inst.in @@ -16,7 +16,6 @@ for (VEC : SERIAL_VECTORS) { - template class Operator; template class OutputOperator; template class Newton; template class ThetaTimestepping; diff --git a/tests/algorithms/newton_01.cc b/tests/algorithms/newton_01.cc index d29196b03f..8be4e5214f 100644 --- a/tests/algorithms/newton_01.cc +++ b/tests/algorithms/newton_01.cc @@ -33,7 +33,7 @@ public: }; class SquareRootResidual : public - Algorithms::Operator > + Algorithms::OperatorBase { SmartPointer discretization; @@ -50,7 +50,7 @@ public: }; class SquareRootSolver : public - Algorithms::Operator > + Algorithms::OperatorBase { SmartPointer solver; diff --git a/tests/algorithms/theta_01.cc b/tests/algorithms/theta_01.cc index b0204c64ab..7078b979cc 100644 --- a/tests/algorithms/theta_01.cc +++ b/tests/algorithms/theta_01.cc @@ -30,7 +30,7 @@ using namespace Algorithms; class Explicit - : public Operator > + : public OperatorBase { public: Explicit(const FullMatrix &matrix); @@ -42,7 +42,7 @@ private: class Implicit - : public Operator > + : public OperatorBase { public: Implicit(const FullMatrix &matrix); -- 2.39.5