diff --git a/src/amdis/AdaptInstationary.hpp b/src/amdis/AdaptInstationary.hpp index 48af810a09f7beee315a59532d7de9e581b79272..016f6355e0aa1ed2f88c3b9bdd7f531cbdf3a55f 100644 --- a/src/amdis/AdaptInstationary.hpp +++ b/src/amdis/AdaptInstationary.hpp @@ -44,7 +44,7 @@ namespace AMDiS } /// Implementation of AdaptBase::adapt() - virtual int adapt() override; + int adapt() override; protected: /** \brief diff --git a/src/amdis/AdaptStationary.hpp b/src/amdis/AdaptStationary.hpp index cc7fc0fecb653fc36ecca8be2604cb71ca2ad513..cdd5702b40731b1b748f7492c0baf7a3593013ec 100644 --- a/src/amdis/AdaptStationary.hpp +++ b/src/amdis/AdaptStationary.hpp @@ -35,7 +35,7 @@ namespace AMDiS AdaptInfo& adaptInfo); /// Implementation of AdaptBase::adapt() - virtual int adapt() override; + int adapt() override; }; } // end namespace AMDiS diff --git a/src/amdis/CreatorInterface.hpp b/src/amdis/CreatorInterface.hpp index 01a83a89a88133ad3a5d23dcc7b30e2b1a0fb6b2..7e39ea73ee6a1d0df489a5899cf5143ee246a6b9 100644 --- a/src/amdis/CreatorInterface.hpp +++ b/src/amdis/CreatorInterface.hpp @@ -44,7 +44,7 @@ namespace AMDiS { public: - virtual std::unique_ptr<BaseClass> create() final + std::unique_ptr<BaseClass> create() final { error_exit("Should not be called. Call create(string) instead!"); return {}; diff --git a/src/amdis/FileWriter.hpp b/src/amdis/FileWriter.hpp index 9576f4c71180f503a406e98f1214715e7e3d9108..88d7faa7105401e6f07af562d531864c012fce3c 100644 --- a/src/amdis/FileWriter.hpp +++ b/src/amdis/FileWriter.hpp @@ -94,7 +94,7 @@ namespace AMDiS void init(std::string const&, tag::unknown) {} /// Implements \ref FileWriterInterface::writeFiles - virtual void writeFiles(AdaptInfo& adaptInfo, bool force) override + void writeFiles(AdaptInfo& adaptInfo, bool force) override { test_exit(filesystem::exists(dir_), "Output directory '{}' does not exist!",dir_); diff --git a/src/amdis/GridTransfer.hpp b/src/amdis/GridTransfer.hpp index 3cd13923dbd29734bed80400d35fdb6ee9180998..4800585c40fb43cb3738f55e88b4ffc649b4b7ad 100644 --- a/src/amdis/GridTransfer.hpp +++ b/src/amdis/GridTransfer.hpp @@ -39,12 +39,12 @@ namespace AMDiS } /// Attach a data container to the grid transfer, that gets interpolated during grid change - virtual void attach(DOFVectorInterface* vec) override + void attach(DOFVectorInterface* vec) override { data_.push_back(vec); } - virtual void detach(DOFVectorInterface* vec) override + void detach(DOFVectorInterface* vec) override { auto it = std::find(data_.begin(), data_.end(), vec); if (it != data_.end()) @@ -54,7 +54,7 @@ namespace AMDiS } /// Prepare the grid and the data for the adaption - virtual bool preAdapt() override + bool preAdapt() override { assert(grid_ != nullptr); mightCoarsen_ = grid_->preAdapt(); // any element might be coarsened in adapt() @@ -64,7 +64,7 @@ namespace AMDiS } /// do the grid adaption - virtual bool adapt() override + bool adapt() override { assert(grid_ != nullptr); refined_ = grid_->adapt(); // returns true if a least one entity was refined @@ -72,7 +72,7 @@ namespace AMDiS } // Perform data adaption to the new grid - virtual void postAdapt() override + void postAdapt() override { assert(grid_ != nullptr); if (mightCoarsen_ || refined_) { diff --git a/src/amdis/Marker.hpp b/src/amdis/Marker.hpp index 2ec8ed17673b2932048d264b5b3d15ffdb2f2563..83c62e522d74910aabe526ae8b70aca0e38c6020 100644 --- a/src/amdis/Marker.hpp +++ b/src/amdis/Marker.hpp @@ -164,10 +164,10 @@ namespace AMDiS } /// Can be used by sub classes. Called before traversal. - virtual void initMarking(AdaptInfo& adaptInfo) override; + void initMarking(AdaptInfo& adaptInfo) override; /// Marks one element. - virtual void markElement(AdaptInfo& adaptInfo, Element const& elem) override; + void markElement(AdaptInfo& adaptInfo, Element const& elem) override; /// Creates a scalar marker depending on the strategy set in parameters. static std::unique_ptr<EstimatorMarker<Grid> > createMarker(std::string const& name, @@ -220,7 +220,7 @@ namespace AMDiS : Super{name, component, est, grid} {} - virtual void markElement(AdaptInfo& adaptInfo, Element const& elem) override + void markElement(AdaptInfo& adaptInfo, Element const& elem) override { if (this->refineAllowed_) this->mark(elem, 1); @@ -252,7 +252,7 @@ namespace AMDiS Parameters::get(name + "->MSGammaC", msGammaC_); } - virtual void initMarking(AdaptInfo& adaptInfo) override; + void initMarking(AdaptInfo& adaptInfo) override; protected: /// Marking parameter. @@ -287,7 +287,7 @@ namespace AMDiS Parameters::get(name + "->ESThetaC", esThetaC_); } - virtual void initMarking(AdaptInfo& adaptInfo) override; + void initMarking(AdaptInfo& adaptInfo) override; protected: /// Marking parameter. @@ -324,7 +324,7 @@ namespace AMDiS Parameters::get(name + "->GERSThetaC", gersThetaC_); } - virtual Flag markGrid(AdaptInfo& adaptInfo) override; + Flag markGrid(AdaptInfo& adaptInfo) override; protected: /// Refinement marking function. @@ -387,12 +387,12 @@ namespace AMDiS /// \brief Implementation of \ref Marker::markElement. Does nothing since marking is /// done in \ref markGrid(). - virtual void markElement(AdaptInfo& adaptInfo, Element const& elem) final {} + void markElement(AdaptInfo& adaptInfo, Element const& elem) final {} /// Mark element for refinement, if grid-function \ref gridFct_ evaluates to /// a value larger than the current level and is marked for coarsening of /// the result is less than the current value. - virtual Flag markGrid(AdaptInfo& adaptInfo) override; + Flag markGrid(AdaptInfo& adaptInfo) override; private: /// Indicator function for adaptation diff --git a/src/amdis/ProblemInstat.hpp b/src/amdis/ProblemInstat.hpp index d2f9704d06235b7beffbcc04a95ccc677ed26221..1525044c056ec6009df6b4fc834395ae204f95fa 100644 --- a/src/amdis/ProblemInstat.hpp +++ b/src/amdis/ProblemInstat.hpp @@ -41,13 +41,13 @@ namespace AMDiS {} /// Initialisation of the problem. - virtual void initialize(Flag initFlag = INIT_NOTHING); + void initialize(Flag initFlag = INIT_NOTHING); /// Implementation of \ref ProblemTimeInterface::initTimestep(). - virtual void initTimestep(AdaptInfo& adaptInfo) override; + void initTimestep(AdaptInfo& adaptInfo) override; /// Implementation of \ref ProblemTimeInterface::closeTimestep(). - virtual void closeTimestep(AdaptInfo& adaptInfo) override; + void closeTimestep(AdaptInfo& adaptInfo) override; /// Returns \ref problemStat. ProblemType& problemStat() { return *problemStat_; } @@ -78,7 +78,7 @@ namespace AMDiS } /// Implementation of \ref ProblemTimeInterface::transferInitialSolution(). - virtual void transferInitialSolution(AdaptInfo& adaptInfo) override; + void transferInitialSolution(AdaptInfo& adaptInfo) override; protected: /// Used in \ref initialize() to create the \ref oldSolution_. diff --git a/src/amdis/ProblemInstatBase.hpp b/src/amdis/ProblemInstatBase.hpp index c2b17fed71db3e7fc086bf8198c9ad7644421632..9a2fdb3357297d3a63362ab5a5864a4cf60d0535 100644 --- a/src/amdis/ProblemInstatBase.hpp +++ b/src/amdis/ProblemInstatBase.hpp @@ -33,13 +33,13 @@ namespace AMDiS {} /// Destructor. - virtual ~ProblemInstatBase() = default; + ~ProblemInstatBase() override = default; /// Implementation of \ref ProblemTimeInterface::setTime(). - virtual void setTime(AdaptInfo& adaptInfo) override; + void setTime(AdaptInfo& adaptInfo) override; /// Implementation of \ref ProblemTimeInterface::solveInitialProblem(). - virtual void solveInitialProblem(AdaptInfo& adaptInfo) override; + void solveInitialProblem(AdaptInfo& adaptInfo) override; /// Return the name of the instationary problem \ref name_ virtual std::string const& name() const diff --git a/src/amdis/ProblemStat.hpp b/src/amdis/ProblemStat.hpp index 75711f2304fa0cc43ce1a73ddb5ee25b4985dccb..452c26be6a6c40315f27a7ed49ff6a001fc61774 100644 --- a/src/amdis/ProblemStat.hpp +++ b/src/amdis/ProblemStat.hpp @@ -254,15 +254,15 @@ namespace AMDiS public: /// Implementation of \ref ProblemStatBase::solve - virtual void solve(AdaptInfo& adaptInfo, - bool createMatrixData = true, - bool storeMatrixData = false) override; + void solve(AdaptInfo& adaptInfo, + bool createMatrixData = true, + bool storeMatrixData = false) override; /// Implementation of \ref ProblemStatBase::buildAfterCoarse - virtual void buildAfterAdapt(AdaptInfo& adaptInfo, - Flag flag, - bool asmMatrix = true, - bool asmVector = true) override; + void buildAfterAdapt(AdaptInfo& adaptInfo, + Flag flag, + bool asmMatrix = true, + bool asmVector = true) override; /// \brief Assemble the linear system by calling \ref buildAfterAdapt with /// `asmMatrix` and `asmVector` set to true. @@ -278,7 +278,7 @@ namespace AMDiS public: // get-methods /// Implementation of \ref ProblemStatBase::name - virtual std::string const& name() const override { return name_; } + std::string const& name() const override { return name_; } /// Return a reference to the grid, \ref grid @@ -416,25 +416,25 @@ namespace AMDiS public: // implementation of iteration interface methods /// Implementation of \ref StandardProblemIteration::oneIteration. - virtual Flag oneIteration(AdaptInfo& adaptInfo, Flag toDo = FULL_ITERATION) override + Flag oneIteration(AdaptInfo& adaptInfo, Flag toDo = FULL_ITERATION) override { return StandardProblemIteration::oneIteration(adaptInfo, toDo); } /// Implementation of \ref ProblemStatBase::estimate. - virtual void estimate(AdaptInfo& adaptInfo) override { /* do nothing. */ } + void estimate(AdaptInfo& adaptInfo) override { /* do nothing. */ } /// Implementation of \ref ProblemStatBase::refineMesh. - virtual Flag adaptGrid(AdaptInfo& adaptInfo) override; + Flag adaptGrid(AdaptInfo& adaptInfo) override; /// Implementation of \ref ProblemStatBase::markElements. - virtual Flag markElements(AdaptInfo& adaptInfo) override; + Flag markElements(AdaptInfo& adaptInfo) override; /// Uniform global grid coarsening by up to n level - virtual Flag globalCoarsen(int n) override; + Flag globalCoarsen(int n) override; /// Uniform global refinement by n level - virtual Flag globalRefine(int n) override; + Flag globalRefine(int n) override; private: /// Name of this problem. diff --git a/src/amdis/StandardProblemIteration.hpp b/src/amdis/StandardProblemIteration.hpp index 90c9f584bce14743f43d506d554a2f045e35c90e..9d719759c8ba40ad54232d6eeca8ae39a2d7d509 100644 --- a/src/amdis/StandardProblemIteration.hpp +++ b/src/amdis/StandardProblemIteration.hpp @@ -22,27 +22,27 @@ namespace AMDiS {} /// Implementation of \ref ProblemIterationIterface::beginIteration() - virtual void beginIteration(AdaptInfo& adaptInfo) override; + void beginIteration(AdaptInfo& adaptInfo) override; /// Implementation of \ref ProblemIterationInterface::oneIteration() - virtual Flag oneIteration(AdaptInfo& adaptInfo, Flag toDo) override; + Flag oneIteration(AdaptInfo& adaptInfo, Flag toDo) override; /// Implementation of \ref ProblemIterationInterface::endIteration() - virtual void endIteration(AdaptInfo& adaptInfo) override; + void endIteration(AdaptInfo& adaptInfo) override; /// Returns the name of the problem. - virtual std::string const& name() const override; + std::string const& name() const override; - virtual int numProblems() const override + int numProblems() const override { return 1; } /// Return the managed ProblemStat \ref problem, by number - virtual ProblemStatBase& problem(int number = 0) override; + ProblemStatBase& problem(int number = 0) override; /// Return the managed ProblemStat \ref problem, by name - virtual ProblemStatBase& problem(std::string const& name) override; + ProblemStatBase& problem(std::string const& name) override; protected: /// Nested assemblage and mesh adaption. diff --git a/src/amdis/linearalgebra/DOFVectorBase.hpp b/src/amdis/linearalgebra/DOFVectorBase.hpp index 3c8c32e76fd8ca09f1af2c4f83a23bb9a1431470..de0ed9fc06031af098f8f99076e6a1d51c2afe1a 100644 --- a/src/amdis/linearalgebra/DOFVectorBase.hpp +++ b/src/amdis/linearalgebra/DOFVectorBase.hpp @@ -81,7 +81,7 @@ namespace AMDiS } /// Destructor - virtual ~DOFVectorBase() override + ~DOFVectorBase() override { GridTransferManager::detach(*this); } @@ -140,7 +140,7 @@ namespace AMDiS } /// Resize the \ref vector to the size of the \ref basis and set to zero - virtual void compress() override + void compress() override { if (size_type(backend_.size()) != size()) { backend_.resize(size()); @@ -206,13 +206,13 @@ namespace AMDiS } /// Implementation of \ref DOFVectorInterface::preAdapt - virtual void preAdapt(bool mightCoarsen) override + void preAdapt(bool mightCoarsen) override { dataTransfer_->preAdapt(*this, mightCoarsen); } /// Implementation of \ref DOFVectorInterface::postAdapt - virtual void postAdapt(bool refined) override + void postAdapt(bool refined) override { dataTransfer_->postAdapt(*this, refined); } diff --git a/src/amdis/linearalgebra/LinearSolver.hpp b/src/amdis/linearalgebra/LinearSolver.hpp index b7a5e3338bb2f571f71eb72b11d56beceebd4af3..7f338f7ab6a7211fdae486c6db92d48224ea6b05 100644 --- a/src/amdis/linearalgebra/LinearSolver.hpp +++ b/src/amdis/linearalgebra/LinearSolver.hpp @@ -32,7 +32,7 @@ namespace AMDiS /// A creator to be used instead of the constructor. struct Creator : CreatorInterfaceName<Super> { - virtual std::unique_ptr<Super> createWithString(std::string prefix) override + std::unique_ptr<Super> createWithString(std::string prefix) override { return std::make_unique<Self>(prefix); } @@ -52,8 +52,8 @@ namespace AMDiS private: /// Implements \ref LinearSolverInterface::solveSystemImpl() - virtual void solveImpl(Matrix const& A, VectorX& x, VectorB const& b, - SolverInfo& solverInfo) override + void solveImpl(Matrix const& A, VectorX& x, VectorB const& b, + SolverInfo& solverInfo) override { Dune::Timer t; if (solverInfo.doCreateMatrixData()) { diff --git a/src/amdis/linearalgebra/eigen/DirectRunner.hpp b/src/amdis/linearalgebra/eigen/DirectRunner.hpp index 5e2aeb3164fe62bec4f95fb162bc303aeabefebc..afcfa23453e06223bc329d669ff32dc5ed01c6f4 100644 --- a/src/amdis/linearalgebra/eigen/DirectRunner.hpp +++ b/src/amdis/linearalgebra/eigen/DirectRunner.hpp @@ -31,7 +31,7 @@ namespace AMDiS } /// Implementes \ref RunnerInterface::init() - virtual void init(Matrix const& A) override + void init(Matrix const& A) override { if (!reusePattern_ || !initialized_) { solver_.analyzePattern(A); @@ -45,11 +45,11 @@ namespace AMDiS /// Implementes \ref RunnerInterface::exit() - virtual void exit() override {} + void exit() override {} /// Implementes \ref RunnerInterface::solve() - virtual int solve(Matrix const& A, VectorX& x, VectorB const& b, - SolverInfo& solverInfo) override + int solve(Matrix const& A, VectorX& x, VectorB const& b, + SolverInfo& solverInfo) override { x = solver_.solve(b); diff --git a/src/amdis/linearalgebra/eigen/IterativeRunner.hpp b/src/amdis/linearalgebra/eigen/IterativeRunner.hpp index 3e4fe65b2d8b0683fb6fa63f7b701d2bafc4bdd3..95aaab1fa0c8fc25e3a15d86230fd4a917065857 100644 --- a/src/amdis/linearalgebra/eigen/IterativeRunner.hpp +++ b/src/amdis/linearalgebra/eigen/IterativeRunner.hpp @@ -27,7 +27,7 @@ namespace AMDiS /// Implementes \ref RunnerInterface::init() - virtual void init(Matrix const& A) override + void init(Matrix const& A) override { if (!reusePattern_ || !initialized_) { solver_.analyzePattern(A); @@ -40,11 +40,11 @@ namespace AMDiS } /// Implementes \ref RunnerInterface::exit() - virtual void exit() override {} + void exit() override {} /// Implementes \ref RunnerInterface::solve() - virtual int solve(Matrix const& A, VectorX& x, VectorB const& b, - SolverInfo& solverInfo) override + int solve(Matrix const& A, VectorX& x, VectorB const& b, + SolverInfo& solverInfo) override { solver_.setTolerance(solverInfo.relTolerance()); x = solver_.solveWithGuess(b, x); diff --git a/src/amdis/linearalgebra/eigen/SolverCreator.hpp b/src/amdis/linearalgebra/eigen/SolverCreator.hpp index dea331ea0cf810d29db548390ef19159873e089f..1e92827c5f392eab919f85996217a329b34096ae 100644 --- a/src/amdis/linearalgebra/eigen/SolverCreator.hpp +++ b/src/amdis/linearalgebra/eigen/SolverCreator.hpp @@ -30,7 +30,7 @@ namespace AMDiS using SolverBase = LinearSolverInterface<Matrix, VectorX, VectorB>; using Scalar = typename Matrix::Scalar; - virtual std::unique_ptr<SolverBase> createWithString(std::string const& prefix) override + std::unique_ptr<SolverBase> createWithString(std::string const& prefix) override { // get creator string for preconditioner std::string precon = "no"; diff --git a/src/amdis/linearalgebra/istl/DirectRunner.hpp b/src/amdis/linearalgebra/istl/DirectRunner.hpp index f4cd263302bdaa59ee86db1ed9e277440dc5cc8f..f2785b644291c421e8d50eae16e0014a79c12a8d 100644 --- a/src/amdis/linearalgebra/istl/DirectRunner.hpp +++ b/src/amdis/linearalgebra/istl/DirectRunner.hpp @@ -29,19 +29,19 @@ namespace AMDiS {} /// Implementes \ref RunnerInterface::init() - virtual void init(Matrix const& A) override + void init(Matrix const& A) override { solver_ = solverCreator_.create(A); } /// Implementes \ref RunnerInterface::exit() - virtual void exit() override + void exit() override { solver_.reset(); } /// Implementes \ref RunnerInterface::solve() - virtual int solve(Matrix const& A, VectorX& x, VectorB const& b, + int solve(Matrix const& A, VectorX& x, VectorB const& b, SolverInfo& solverInfo) override { // storing some statistics diff --git a/src/amdis/linearalgebra/istl/ISTLRunner.hpp b/src/amdis/linearalgebra/istl/ISTLRunner.hpp index 12c80cfd4e085c67fbe857930bd8b902c5b99e31..e49d6a260de3a8ecfed90064bf22910a5e51130b 100644 --- a/src/amdis/linearalgebra/istl/ISTLRunner.hpp +++ b/src/amdis/linearalgebra/istl/ISTLRunner.hpp @@ -27,7 +27,7 @@ namespace AMDiS /// Implementes \ref RunnerInterface::init() - virtual void init(Matrix const& A) override + void init(Matrix const& A) override { precon_ = preconCreator_->create(A); linOperator_ = std::make_shared<LinOperator>(A); @@ -35,7 +35,7 @@ namespace AMDiS } /// Implementes \ref RunnerInterface::exit() - virtual void exit() override + void exit() override { solver_.reset(); linOperator_.reset(); @@ -43,8 +43,8 @@ namespace AMDiS } /// Implementes \ref RunnerInterface::solve() - virtual int solve(Matrix const& A, VectorX& x, VectorB const& b, - SolverInfo& solverInfo) override + int solve(Matrix const& A, VectorX& x, VectorB const& b, + SolverInfo& solverInfo) override { // storing some statistics Dune::InverseOperatorResult statistics; diff --git a/src/amdis/linearalgebra/istl/ISTL_Preconditioner.hpp b/src/amdis/linearalgebra/istl/ISTL_Preconditioner.hpp index 4326124ceef6d60920efdfd95fc14bb1d2af81e3..d33bfa148bdb065abfb6e5a20c8c640007bbe461 100644 --- a/src/amdis/linearalgebra/istl/ISTL_Preconditioner.hpp +++ b/src/amdis/linearalgebra/istl/ISTL_Preconditioner.hpp @@ -30,7 +30,7 @@ namespace AMDiS struct Creator : CreatorInterfaceName<Super> { - virtual std::unique_ptr<Super> createWithString(std::string prefix) override + std::unique_ptr<Super> createWithString(std::string prefix) override { return std::make_unique<Self>(prefix); } @@ -43,7 +43,7 @@ namespace AMDiS } using PreconBase = Dune::Preconditioner<VectorX, VectorB>; - virtual std::unique_ptr<PreconBase> create(Matrix const& A) const override + std::unique_ptr<PreconBase> create(Matrix const& A) const override { return createImpl(A, Type<Precon>{}); } diff --git a/src/amdis/linearalgebra/mtl/KrylovRunner.hpp b/src/amdis/linearalgebra/mtl/KrylovRunner.hpp index 037de430b415e966d8f985de09af88a83e7c86af..e51a1a746a3fa1c6616fab2933c3d40cedf9983d 100644 --- a/src/amdis/linearalgebra/mtl/KrylovRunner.hpp +++ b/src/amdis/linearalgebra/mtl/KrylovRunner.hpp @@ -40,13 +40,13 @@ namespace AMDiS } /// Implements \ref RunnerInterface::lLeftPrecon(), Returns \ref L_ - virtual std::shared_ptr<PreconBase> leftPrecon() override + std::shared_ptr<PreconBase> leftPrecon() override { return L_; } /// Implements \ref RunnerInterface::rightPrecon(), Returns \ref R_ - virtual std::shared_ptr<PreconBase> rightPrecon() override + std::shared_ptr<PreconBase> rightPrecon() override { return R_; } @@ -64,22 +64,22 @@ namespace AMDiS } /// Implementation of \ref RunnerInterface::init() - virtual void init(Matrix const& A) override + void init(Matrix const& A) override { L_->init(A); R_->init(A); } /// Implementation of \ref RunnerInterface::exit() - virtual void exit() override + void exit() override { L_->exit(); R_->exit(); } /// Implementation of \ref RunnerInterface::solve() - virtual int solve(Matrix const& A, Vector& x, Vector const& b, - SolverInfo& solverInfo) override + int solve(Matrix const& A, Vector& x, Vector const& b, + SolverInfo& solverInfo) override { test_exit(bool(L_), "There is no left preconditioner"); test_exit(bool(R_), "There is no right preconditioner"); diff --git a/src/amdis/linearalgebra/mtl/Preconditioner.hpp b/src/amdis/linearalgebra/mtl/Preconditioner.hpp index 23dddbd9c2d49da25c57bfe87fab4d52cc749727..f4e1ee2e0d5f32075adb477393ecc8d44ec25b05 100644 --- a/src/amdis/linearalgebra/mtl/Preconditioner.hpp +++ b/src/amdis/linearalgebra/mtl/Preconditioner.hpp @@ -20,7 +20,7 @@ namespace AMDiS /// A creator to be used instead of the constructor. struct Creator : CreatorInterface<Super> { - virtual std::unique_ptr<Super> create() override + std::unique_ptr<Super> create() override { return std::make_unique<Self>(); } @@ -28,26 +28,26 @@ namespace AMDiS public: /// Implementation of \ref PreconditionerBase::init() - virtual void init(Matrix const& fullMatrix) override + void init(Matrix const& fullMatrix) override { precon_.reset(new PreconRunner(fullMatrix)); } /// Implementation of \ref PreconditionerInterface::exit() - virtual void exit() override + void exit() override { precon_.reset(); } /// Implementation of \ref PreconditionerBase::solve() - virtual void solve(Vector const& vin, Vector& vout) const override + void solve(Vector const& vin, Vector& vout) const override { test_exit_dbg(bool(precon_), "No preconditioner initialized!"); precon_->solve(vin, vout); } /// Implementation of \ref PreconditionerBase::adjoint_solve() - virtual void adjoint_solve(Vector const& vin, Vector& vout) const override + void adjoint_solve(Vector const& vin, Vector& vout) const override { test_exit_dbg(bool(precon_), "No preconditioner initialized!"); precon_->adjoint_solve(vin, vout); diff --git a/src/amdis/linearalgebra/mtl/UmfpackRunner.hpp b/src/amdis/linearalgebra/mtl/UmfpackRunner.hpp index 35659d76f7aee8a6b28f816935a9cd5bfa66bc89..f1f382db56fa0ede0967fd78352fb9bcea18a298 100644 --- a/src/amdis/linearalgebra/mtl/UmfpackRunner.hpp +++ b/src/amdis/linearalgebra/mtl/UmfpackRunner.hpp @@ -47,8 +47,8 @@ namespace AMDiS } /// Implementation of \ref RunnerBase::solve() - virtual int solve(Matrix const& A, Vector& x, Vector const& b, - SolverInfo& solverInfo) override + int solve(Matrix const& A, Vector& x, Vector const& b, + SolverInfo& solverInfo) override { AMDIS_FUNCNAME("Umfpack_Runner::solve()"); test_exit(bool(solver_), "The umfpack solver was not initialized\n"); @@ -71,7 +71,7 @@ namespace AMDiS } /// Implementation of \ref RunnerInterface::exit() - virtual void exit() override {} + void exit() override {} protected: std::shared_ptr<SolverType> solver_; @@ -98,7 +98,7 @@ namespace AMDiS {} /// Implementation of \ref RunnerInterface::init() - virtual void init(FullMatrix const& fullMatrix) override + void init(FullMatrix const& fullMatrix) override { try { Super::solver_.reset(new SolverType(fullMatrix, Super::symmetricStrategy_, Super::allocInit_)); diff --git a/src/amdis/utility/QuadratureFactory.hpp b/src/amdis/utility/QuadratureFactory.hpp index 46091941232b5ca26a88ac3ab46293f74e04bf04..74d8c21df223f0813d7a8a49c3b8ca0492e07a7e 100644 --- a/src/amdis/utility/QuadratureFactory.hpp +++ b/src/amdis/utility/QuadratureFactory.hpp @@ -54,14 +54,14 @@ namespace AMDiS "Polynomial order of GridFunction can not be extracted. Provide an explicit order parameter instead."); public: - virtual void bind(LocalFunction const& localFct) final + void bind(LocalFunction const& localFct) final { order_ = Dune::Hybrid::ifElse(Concept{}, [&](auto id) { return AMDiS::order(id(localFct)); }, [] (auto) { return -1; }); } - virtual int order() const final { return order_; } + int order() const final { return order_; } private: int order_ = -1; @@ -106,9 +106,9 @@ namespace AMDiS , qt_(qt) {} - virtual int order() const final { return order_; } + int order() const final { return order_; } - virtual QuadratureRule const& rule(Dune::GeometryType const& type, int degree) const final + QuadratureRule const& rule(Dune::GeometryType const& type, int degree) const final { using QuadratureRules = Dune::QuadratureRules<ctype, dimension>; return QuadratureRules::rule(type, degree, qt_); @@ -159,7 +159,7 @@ namespace AMDiS : rule_(rule) {} - virtual QuadratureRule const& rule(Dune::GeometryType const& /*type*/, int /*degree*/) const final + QuadratureRule const& rule(Dune::GeometryType const& /*type*/, int /*degree*/) const final { return rule_; }