Skip to content
Snippets Groups Projects
Commit 176bc81e authored by Timo Koch's avatar Timo Koch
Browse files

[vtkfunction] Mark interfaces as final to allow overload check and not allow inheritance

parent b9607fdd
No related branches found
No related tags found
1 merge request!1971Cleanup/vtkfunction
...@@ -72,18 +72,18 @@ struct VectorP0VTKFunction : Dune::VTKFunction<GridView> ...@@ -72,18 +72,18 @@ struct VectorP0VTKFunction : Dune::VTKFunction<GridView>
public: public:
//! return number of components //! return number of components
virtual int ncomps() const { return nComps_; } int ncomps() const final { return nComps_; }
//! get name //! get name
virtual std::string name() const { return name_; } std::string name() const final { return name_; }
//! evaluate //! evaluate
virtual double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>&) const double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>&) const final
{ return Impl::accessEntry(field_, mycomp, mapper_.index(e)); } { return Impl::accessEntry(field_, mycomp, mapper_.index(e)); }
#if DUNE_VERSION_GTE(DUNE_GRID, 2, 7) #if DUNE_VERSION_GTE(DUNE_GRID, 2, 7)
//! get output precision for the field //! get output precision for the field
Dumux::Vtk::Precision precision() const override Dumux::Vtk::Precision precision() const final
{ return precision_; } { return precision_; }
#endif #endif
...@@ -127,13 +127,13 @@ struct VectorP1VTKFunction : Dune::VTKFunction<GridView> ...@@ -127,13 +127,13 @@ struct VectorP1VTKFunction : Dune::VTKFunction<GridView>
public: public:
//! return number of components //! return number of components
virtual int ncomps() const { return nComps_; } int ncomps() const final { return nComps_; }
//! get name //! get name
virtual std::string name() const { return name_; } std::string name() const final { return name_; }
//! evaluate //! evaluate
virtual double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const final
{ {
const unsigned int dim = Element::mydimension; const unsigned int dim = Element::mydimension;
const unsigned int nVertices = e.subEntities(dim); const unsigned int nVertices = e.subEntities(dim);
...@@ -149,7 +149,7 @@ public: ...@@ -149,7 +149,7 @@ public:
#if DUNE_VERSION_GTE(DUNE_GRID, 2, 7) #if DUNE_VERSION_GTE(DUNE_GRID, 2, 7)
//! get output precision for the field //! get output precision for the field
Dumux::Vtk::Precision precision() const override Dumux::Vtk::Precision precision() const final
{ return precision_; } { return precision_; }
#endif #endif
...@@ -197,13 +197,13 @@ struct VectorP1NonConformingVTKFunction : Dune::VTKFunction<GridView> ...@@ -197,13 +197,13 @@ struct VectorP1NonConformingVTKFunction : Dune::VTKFunction<GridView>
public: public:
//! return number of components //! return number of components
virtual int ncomps() const { return nComps_; } int ncomps() const final { return nComps_; }
//! get name //! get name
virtual std::string name() const { return name_; } std::string name() const final { return name_; }
//! evaluate //! evaluate
virtual double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const final
{ {
const unsigned int dim = Element::mydimension; const unsigned int dim = Element::mydimension;
const unsigned int nVertices = e.subEntities(dim); const unsigned int nVertices = e.subEntities(dim);
...@@ -219,7 +219,7 @@ public: ...@@ -219,7 +219,7 @@ public:
#if DUNE_VERSION_GTE(DUNE_GRID, 2, 7) #if DUNE_VERSION_GTE(DUNE_GRID, 2, 7)
//! get output precision for the field //! get output precision for the field
Dumux::Vtk::Precision precision() const override Dumux::Vtk::Precision precision() const final
{ return precision_; } { return precision_; }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment