From: Wolfgang Bangerth Date: Wed, 8 Sep 2021 02:31:52 +0000 (-0600) Subject: Consistently declare size_type in preconditioners derived from PreconditionRelaxation. X-Git-Tag: v9.4.0-rc1~992^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12749%2Fhead;p=dealii.git 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. --- 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.