diff --git a/Applications/FileIO/PetrelInterface.cpp b/Applications/FileIO/PetrelInterface.cpp index 6bea9a22d79727ab13df58a62c2096d2444bd147..387b6cddcbae863bb80854c26fad533ee6f6461b 100644 --- a/Applications/FileIO/PetrelInterface.cpp +++ b/Applications/FileIO/PetrelInterface.cpp @@ -77,9 +77,6 @@ PetrelInterface::PetrelInterface(std::list<std::string> &sfc_fnames, _unique_name); } -PetrelInterface::~PetrelInterface() -{} - void PetrelInterface::readPetrelSurface(std::istream &in) { char buffer[MAX_COLS_PER_ROW]; diff --git a/Applications/FileIO/PetrelInterface.h b/Applications/FileIO/PetrelInterface.h index b7b357404f2e89d3a153a026d95a247a81378710..993a0a77c3c2a80a5bb3641e7391ef5638a6bb30 100644 --- a/Applications/FileIO/PetrelInterface.h +++ b/Applications/FileIO/PetrelInterface.h @@ -32,14 +32,13 @@ namespace GeoLib namespace FileIO { -class PetrelInterface +class PetrelInterface final { public: PetrelInterface(std::list<std::string> &sfc_fnames, std::list<std::string> &well_path_fnames, std::string &unique_model_name, GeoLib::GEOObjects* obj); - virtual ~PetrelInterface(); private: void readPetrelSurface (std::istream &in); diff --git a/FileIO/TetGenInterface.cpp b/FileIO/TetGenInterface.cpp index 9b39bd936d4f2291e65678c407a11d662a7841ea..1f76b4d0ecac58d780f90bb72abe9b8e1f7461f7 100644 --- a/FileIO/TetGenInterface.cpp +++ b/FileIO/TetGenInterface.cpp @@ -38,10 +38,6 @@ TetGenInterface::TetGenInterface() : { } -TetGenInterface::~TetGenInterface() -{ -} - bool TetGenInterface::readTetGenGeometry (std::string const& geo_fname, GeoLib::GEOObjects &geo_objects) { diff --git a/FileIO/TetGenInterface.h b/FileIO/TetGenInterface.h index 7cb274f7f6dd0b4dedb0b2aa60d6a43cc78e46d0..d9ee8f6ae1db46bef85b5172de62c5f1dddf15cd 100644 --- a/FileIO/TetGenInterface.h +++ b/FileIO/TetGenInterface.h @@ -38,11 +38,10 @@ namespace FileIO * node - mesh node / geometric point definition * ele - mesh element definition */ -class TetGenInterface +class TetGenInterface final { public: TetGenInterface(); - virtual ~TetGenInterface(); /** * Method reads geometry from a TetGen poly or smesh file. diff --git a/GeoLib/IO/Gmsh/GMSHLine.cpp b/GeoLib/IO/Gmsh/GMSHLine.cpp index d54864be2700802b863068e7c0d535c7d2f988bc..d3fda7cb580fc53fa71686d3ddd6c84fd5cfa7dd 100644 --- a/GeoLib/IO/Gmsh/GMSHLine.cpp +++ b/GeoLib/IO/Gmsh/GMSHLine.cpp @@ -22,9 +22,6 @@ GMSHLine::GMSHLine(std::size_t start_point_id, std::size_t end_point_id) : _start_pnt_id(start_point_id), _end_pnt_id(end_point_id) {} -GMSHLine::~GMSHLine() -{} - void GMSHLine::write(std::ostream &os, std::size_t id) const { os << "Line(" << id << ") = {" << _start_pnt_id << "," << _end_pnt_id << "};\n"; diff --git a/GeoLib/IO/Gmsh/GMSHLine.h b/GeoLib/IO/Gmsh/GMSHLine.h index f6ca31d91cce46f78d18927d96bd28631a6b1932..d67bfcbcb71c930d5abba386b7a554de33aa0f21 100644 --- a/GeoLib/IO/Gmsh/GMSHLine.h +++ b/GeoLib/IO/Gmsh/GMSHLine.h @@ -20,10 +20,9 @@ namespace IO namespace GMSH { -class GMSHLine { +class GMSHLine final { public: GMSHLine(std::size_t start_point_id, std::size_t end_point_id); - virtual ~GMSHLine(); void write(std::ostream &os, std::size_t id) const; void resetLineData(std::size_t start_point_id, std::size_t end_point_id); diff --git a/GeoLib/IO/Gmsh/GMSHPoint.cpp b/GeoLib/IO/Gmsh/GMSHPoint.cpp index ae9714f5f98618d5dd1ffe23384f945b03c463bc..3e5da53c8a25462087b496024372fb117fddf56f 100644 --- a/GeoLib/IO/Gmsh/GMSHPoint.cpp +++ b/GeoLib/IO/Gmsh/GMSHPoint.cpp @@ -34,9 +34,6 @@ void GMSHPoint::write(std::ostream &os) const } } -GMSHPoint::~GMSHPoint() -{} - std::ostream& operator<< (std::ostream &os, GMSHPoint const& p) { p.write (os); diff --git a/GeoLib/IO/Gmsh/GMSHPoint.h b/GeoLib/IO/Gmsh/GMSHPoint.h index 11b2885d1a9cda36c26d2c94246a2dbed8b857a9..41310a4ba912302d394d45909621353644a78c28 100644 --- a/GeoLib/IO/Gmsh/GMSHPoint.h +++ b/GeoLib/IO/Gmsh/GMSHPoint.h @@ -20,11 +20,10 @@ namespace IO { namespace GMSH { - -class GMSHPoint : public GeoLib::Point { +class GMSHPoint final : public GeoLib::Point +{ public: GMSHPoint(GeoLib::Point const& pnt, std::size_t id, double mesh_density); - virtual ~GMSHPoint(); void write(std::ostream &os) const; private: double _mesh_density; diff --git a/GeoLib/PointVec.cpp b/GeoLib/PointVec.cpp index 22af4c9442a6e141f424e6054c56530dafadc49c..169a4eb713f8fe023c0b0d52d86dea46d078903c 100644 --- a/GeoLib/PointVec.cpp +++ b/GeoLib/PointVec.cpp @@ -121,10 +121,6 @@ PointVec::PointVec(const std::string& name, } } -PointVec::~PointVec() -{ -} - std::size_t PointVec::push_back(Point* pnt) { _pnt_id_map.push_back(uniqueInsert(pnt)); diff --git a/GeoLib/PointVec.h b/GeoLib/PointVec.h index 31dd0042104e51943b6c3d9405ca706b835c2575..fa359ebe3974e7263c61b90cb7f2e41c55fd4dbc 100644 --- a/GeoLib/PointVec.h +++ b/GeoLib/PointVec.h @@ -39,7 +39,7 @@ namespace GeoLib * a unique name from class GEOObject. For this reason PointVec should have * a name. * */ -class PointVec : public TemplateVec<Point> +class PointVec final : public TemplateVec<Point> { public: /// Signals if the vector contains object of type Point or Station @@ -73,9 +73,6 @@ public: std::map<std::string, std::size_t>* name_id_map = nullptr, PointType type = PointVec::PointType::POINT, double rel_eps = std::numeric_limits<double>::epsilon()); - /** Destructor deletes all Points of this PointVec. */ - virtual ~PointVec (); - /** * Method adds a Point to the (internal) standard vector and takes the ownership. * If the given point is already included in the vector, the point will be destroyed and diff --git a/MeshLib/IO/VtkIO/VtuInterface.cpp b/MeshLib/IO/VtkIO/VtuInterface.cpp index f9ce4a60c6e19fa8fb2d1553b9eecd5471f13d26..776e94d6e8fbbf0553c344a0a2d21c67612178bb 100644 --- a/MeshLib/IO/VtkIO/VtuInterface.cpp +++ b/MeshLib/IO/VtkIO/VtuInterface.cpp @@ -49,9 +49,6 @@ VtuInterface::VtuInterface(const MeshLib::Mesh* mesh, int dataMode, bool compres WARN("Ascii data cannot be compressed, ignoring compression flag.") } -VtuInterface::~VtuInterface() -{} - MeshLib::Mesh* VtuInterface::readVTUFile(std::string const &file_name) { if (!BaseLib::IsFileExisting(file_name)) { diff --git a/MeshLib/IO/VtkIO/VtuInterface.h b/MeshLib/IO/VtkIO/VtuInterface.h index 8b28b7458325ed196bb9b516a3ce1cc17fb4b116..06d881ed2d37eb67d0643f8d52ee45d569fbac65 100644 --- a/MeshLib/IO/VtkIO/VtuInterface.h +++ b/MeshLib/IO/VtkIO/VtuInterface.h @@ -29,12 +29,11 @@ namespace IO * This class is currently not inherited from Writer because VTK will implement * writing to a string from 6.2 onwards. */ -class VtuInterface +class VtuInterface final { public: /// Provide the mesh to write and set if compression should be used. VtuInterface(const MeshLib::Mesh* mesh, int dataMode = vtkXMLWriter::Binary, bool compressed = false); - ~VtuInterface(); /// Read an unstructured grid from a VTU file /// \return The converted mesh or a nullptr if reading failed diff --git a/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp b/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp index 3512faebcd266ccdf60bf95f5ba2d4ec07753af2..d97f09abc47ea695322ba40588b3e560932fe0e6 100644 --- a/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp +++ b/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp @@ -33,9 +33,6 @@ Mesh2MeshPropertyInterpolation::Mesh2MeshPropertyInterpolation(Mesh const*const _src_mesh(src_mesh), _src_properties(src_properties) {} -Mesh2MeshPropertyInterpolation::~Mesh2MeshPropertyInterpolation() -{} - bool Mesh2MeshPropertyInterpolation::setPropertiesForMesh(Mesh *dest_mesh, std::vector<double>& dest_properties) const { if (_src_mesh->getDimension() != dest_mesh->getDimension()) { diff --git a/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.h b/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.h index cdaf987fc82454ed70bdaec0194d1a3025c2eb87..3d4a55257785d3f7fa85f5235535b9191d5e5773 100644 --- a/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.h +++ b/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.h @@ -24,7 +24,8 @@ class Mesh; * (destination) mesh deploying weighted interpolation. The two * meshes must have the same dimension. */ -class Mesh2MeshPropertyInterpolation { +class Mesh2MeshPropertyInterpolation final +{ public: /** * Constructor taking the source or input mesh and properties. @@ -37,7 +38,6 @@ public: * indices the vector of properties must have \f$\ge n\f$ entries. */ Mesh2MeshPropertyInterpolation(Mesh const*const source_mesh, std::vector<double> const*const source_properties); - virtual ~Mesh2MeshPropertyInterpolation(); /** * Calculates entries for the property vector and sets appropriate indices in the diff --git a/MeshLib/MeshQuality/AngleSkewMetric.cpp b/MeshLib/MeshQuality/AngleSkewMetric.cpp index 6e2c26dcc9fc5c36b505212e4e51adff59106ce4..81919894f210dfed964c8ebf380120761b727dd6 100644 --- a/MeshLib/MeshQuality/AngleSkewMetric.cpp +++ b/MeshLib/MeshQuality/AngleSkewMetric.cpp @@ -29,9 +29,6 @@ AngleSkewMetric::AngleSkewMetric(Mesh const& mesh) : ElementQualityMetric(mesh) {} -AngleSkewMetric::~AngleSkewMetric() -{} - void AngleSkewMetric::calculateQuality () { const std::vector<MeshLib::Element*>& elements(_mesh.getElements()); diff --git a/MeshLib/MeshQuality/AngleSkewMetric.h b/MeshLib/MeshQuality/AngleSkewMetric.h index c31938eecf80ef1fe0c1e807bbd5e7b1ebd6bed6..3b330df5c8a5eae37d95965b0bf8a9140826d3ec 100644 --- a/MeshLib/MeshQuality/AngleSkewMetric.h +++ b/MeshLib/MeshQuality/AngleSkewMetric.h @@ -23,13 +23,12 @@ namespace MeshLib /** * Calculates the quality of mesh elements based on the EquiAngleSkew measure */ -class AngleSkewMetric : public ElementQualityMetric +class AngleSkewMetric final : public ElementQualityMetric { public: AngleSkewMetric(Mesh const& mesh); - virtual ~AngleSkewMetric(); - virtual void calculateQuality (); + void calculateQuality(); private: double checkTriangle(Element const& elem) const; diff --git a/MeshLib/Node.cpp b/MeshLib/Node.cpp index d28d8a7bbeea53b26726d0569a2e94e27d64044a..c75ae987e282f260798a5f8b9c0acf2640e0e0f3 100644 --- a/MeshLib/Node.cpp +++ b/MeshLib/Node.cpp @@ -38,10 +38,6 @@ Node::Node(const Node &node) { } -Node::~Node() -{ -} - void Node::updateCoordinates(double x, double y, double z) { _x[0] = x; diff --git a/MeshLib/Node.h b/MeshLib/Node.h index 44d3820a2060d80914f5a0df183711cd2eef3ea5..ee7f8db349702cd25ef3cd95934d4bcbb0651da3 100644 --- a/MeshLib/Node.h +++ b/MeshLib/Node.h @@ -29,7 +29,7 @@ class Element; /** * A mesh node with coordinates in 3D space. */ -class Node : public MathLib::Point3dWithID +class Node final : public MathLib::Point3dWithID { /* friend classes: */ friend class Mesh; @@ -61,9 +61,6 @@ public: /// Get number of elements the node is part of. std::size_t getNumberOfElements() const { return _elements.size(); } - /// Destructor - virtual ~Node(); - /// Shift the node according to the displacement vector v. Node operator-(MathLib::Vector3 const& v) const { @@ -73,7 +70,7 @@ public: protected: /// Update coordinates of a node. /// This method automatically also updates the areas/volumes of all connected elements. - virtual void updateCoordinates(double x, double y, double z); + void updateCoordinates(double x, double y, double z); /** * Add an element the node is part of. diff --git a/MeshLib/Vtk/VtkMappedMeshSource.cpp b/MeshLib/Vtk/VtkMappedMeshSource.cpp index 6a3e1ec88bc64714d4154b62a3d55dc6c8dda900..a0d2c7ad743dadac10f31be4d96fc36e4a76a646 100644 --- a/MeshLib/Vtk/VtkMappedMeshSource.cpp +++ b/MeshLib/Vtk/VtkMappedMeshSource.cpp @@ -39,11 +39,6 @@ VtkMappedMeshSource::VtkMappedMeshSource() this->SetNumberOfInputPorts(0); } -VtkMappedMeshSource::~VtkMappedMeshSource() -{ - -} - int VtkMappedMeshSource::ProcessRequest( vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) diff --git a/MeshLib/Vtk/VtkMappedMeshSource.h b/MeshLib/Vtk/VtkMappedMeshSource.h index 4460d1bc58cb84719a804bf45fa0ad2b8893a435..a60306cd5e5c278b0808d0d1a9f6003ca01c8954 100644 --- a/MeshLib/Vtk/VtkMappedMeshSource.h +++ b/MeshLib/Vtk/VtkMappedMeshSource.h @@ -52,12 +52,12 @@ namespace MeshLib { /// Adapter which maps a MeshLib::Mesh to a vtkUnstructuredGridAlgorithm. /// Allows for zero-copy access of the mesh from the visualization side. -class VtkMappedMeshSource : public vtkUnstructuredGridAlgorithm +class VtkMappedMeshSource final : public vtkUnstructuredGridAlgorithm { public: static VtkMappedMeshSource *New(); vtkTypeMacro(VtkMappedMeshSource, vtkUnstructuredGridAlgorithm) - virtual void PrintSelf(std::ostream &os, vtkIndent indent); + void PrintSelf(std::ostream &os, vtkIndent indent); /// Sets the mesh. Calling is mandatory void SetMesh(const MeshLib::Mesh* mesh) { this->_mesh = mesh; this->Modified(); } @@ -67,7 +67,6 @@ public: protected: VtkMappedMeshSource(); - ~VtkMappedMeshSource(); int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector);