Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • Nektar Nektar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 93
    • Issues 93
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 66
    • Merge requests 66
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Nektar
  • NektarNektar
  • Merge requests
  • !1435

Tidy up virtual functions in StdRegions and LocalRegions classes.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Chris Cantwell requested to merge ccantwel/nektar:feature/override into master Nov 12, 2022
  • Overview 15
  • Commits 25
  • Pipelines 9
  • Changes 48

Issue/feature addressed

Some virtual functions were incorrectly overridden, or were left over in sub-classes after the public interface had been removed.

Proposed solution

Enforce correct implementation of these virtual functions and remove unnecessary functions from derived classes.

Implementation

  • Fixed those v_-prefixed functions which were not virtual.
  • The C++11 keyword override was applied to all virtual functions in derived classes; this enforces that a corresponding function exists in the base class.
  • final was applied conservatively where it is clear that a virtual function should not be further overridden.
  • Some functions were made const where it was obvious they should not be changing the member data (e.g. getter functions).
  • Some functions which must necessarily be overridden in all derived classes were switched to be pure virtual and the corresponding base class implementation removed.
  • Some functions Expansion::v_GetMF* were renamed, since they do not need to be virtual.
  • The *_MatOp functions were removed completely since they had no public interface function and are never used anyway since sum-factorisation is more efficient.

Tests

Notes

Please add any other information that could be useful for reviewers.

Checklist

  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).

Warning

On the 19.07 the code formatting (code style) was standardised using clang-format, over the whole Nektar++ code. This means changes in your branch will conflict with formatting changes on the master branch. To resolve these conflicts , see #295

Edited Nov 13, 2022 by Chris Cantwell
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature/override