From 7c160dc5795dcff360deb4ef57915dfb3e294ba9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 7 Sep 2021 20:31:52 -0600 Subject: [PATCH] Consistently declare size_type in preconditioners derived from PreconditionRelaxation. The base class declares a 'size_type' typedef, but only some of the derived classes import it. Do so consistently, and do it by inheriting the type instead of re-inventing the wheel. --- include/deal.II/lac/precondition.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/include/deal.II/lac/precondition.h b/include/deal.II/lac/precondition.h index a1048a9636..fdfa87d49c 100644 --- a/include/deal.II/lac/precondition.h +++ b/include/deal.II/lac/precondition.h @@ -497,6 +497,11 @@ template > class PreconditionJacobi : public PreconditionRelaxation { public: + /** + * Declare type for container size. + */ + using size_type = typename PreconditionRelaxation::size_type; + /** * An alias to the base class AdditionalData. */ @@ -583,6 +588,11 @@ template > class PreconditionSOR : public PreconditionRelaxation { public: + /** + * Declare type for container size. + */ + using size_type = typename PreconditionRelaxation::size_type; + /** * An alias to the base class AdditionalData. */ @@ -651,15 +661,15 @@ class PreconditionSSOR : public PreconditionRelaxation { public: /** - * An alias to the base class AdditionalData. + * Declare type for container size. */ - using AdditionalData = - typename PreconditionRelaxation::AdditionalData; + using size_type = typename PreconditionRelaxation::size_type; /** - * Declare type for container size. + * An alias to the base class AdditionalData. */ - using size_type = typename MatrixType::size_type; + using AdditionalData = + typename PreconditionRelaxation::AdditionalData; /** * An alias to the base class. @@ -752,7 +762,7 @@ public: /** * Declare type for container size. */ - using size_type = typename MatrixType::size_type; + using size_type = typename PreconditionRelaxation::size_type; /** * Parameters for PreconditionPSOR. -- 2.39.5