From d24384d07f11a1e0e36556579940a6cbfccaae97 Mon Sep 17 00:00:00 2001 From: Karsten Rink <karsten.rink@ufz.de> Date: Tue, 25 Feb 2014 17:31:49 +0100 Subject: [PATCH] with inexpressable regret renamed MeshQualityController to MeshValidation --- Gui/DataView/MeshAnalysisDialog.cpp | 8 ++++---- Gui/DataView/MshView.cpp | 1 - Gui/mainwindow.cpp | 1 - MeshLib/Mesh.h | 1 - ...ualityController.cpp => MeshValidation.cpp} | 18 +++++++++--------- ...eshQualityController.h => MeshValidation.h} | 14 +++++++------- 6 files changed, 20 insertions(+), 23 deletions(-) rename MeshLib/MeshQuality/{MeshQualityController.cpp => MeshValidation.cpp} (84%) rename MeshLib/MeshQuality/{MeshQualityController.h => MeshValidation.h} (85%) diff --git a/Gui/DataView/MeshAnalysisDialog.cpp b/Gui/DataView/MeshAnalysisDialog.cpp index 7d469ecfa31..8af9cd9175e 100644 --- a/Gui/DataView/MeshAnalysisDialog.cpp +++ b/Gui/DataView/MeshAnalysisDialog.cpp @@ -14,7 +14,7 @@ #include "MeshAnalysisDialog.h" #include "Mesh.h" -#include "MeshQuality/MeshQualityController.h" +#include "MeshQuality/MeshValidation.h" // ThirdParty/logog #include "logog/include/logog.hpp" @@ -40,12 +40,12 @@ void MeshAnalysisDialog::on_startButton_pressed() { const MeshLib::Mesh* mesh (_mesh_vec[this->meshListBox->currentIndex()]); - const std::vector<std::size_t> unusedNodesIdx (MeshLib::MeshQualityController::removeUnusedMeshNodes(*const_cast<MeshLib::Mesh*>(mesh))); + const std::vector<std::size_t> unusedNodesIdx (MeshLib::MeshValidation::removeUnusedMeshNodes(*const_cast<MeshLib::Mesh*>(mesh))); this->nodesMsgOutput(unusedNodesIdx); - const std::vector<ElementErrorCode> element_error_codes (MeshLib::MeshQualityController::testElementGeometry(*mesh)); + const std::vector<ElementErrorCode> element_error_codes (MeshLib::MeshValidation::testElementGeometry(*mesh)); //this->elementMsgOutput(element_error_codes); - QString elementMsgOutput = QString::fromStdString(MeshLib::MeshQualityController::ElementErrorCodeOutput(element_error_codes)); + QString elementMsgOutput = QString::fromStdString(MeshLib::MeshValidation::ElementErrorCodeOutput(element_error_codes)); this->elementsMsg->setText(elementMsgOutput); } diff --git a/Gui/DataView/MshView.cpp b/Gui/DataView/MshView.cpp index 135b1a420bb..9318a81dce5 100644 --- a/Gui/DataView/MshView.cpp +++ b/Gui/DataView/MshView.cpp @@ -28,7 +28,6 @@ #include "MshModel.h" #include "OGSError.h" #include "MeshSurfaceExtraction.h" -#include "MeshQuality/MeshQualityController.h" #include "ImportFileTypes.h" #include "LastSavedFileDirectory.h" diff --git a/Gui/mainwindow.cpp b/Gui/mainwindow.cpp index 8ba11b59d2f..85198b7f265 100644 --- a/Gui/mainwindow.cpp +++ b/Gui/mainwindow.cpp @@ -90,7 +90,6 @@ #include "MeshSurfaceExtraction.h" #include "readMeshFromFile.h" #include "convertMeshToGeo.h" -#include "MeshQuality/MeshQualityController.h" // Qt includes #include <QDesktopWidget> diff --git a/MeshLib/Mesh.h b/MeshLib/Mesh.h index 270eaceffb8..3296ca3fc31 100644 --- a/MeshLib/Mesh.h +++ b/MeshLib/Mesh.h @@ -20,7 +20,6 @@ #include <vector> #include "MeshEnums.h" -#include "MeshQuality/MeshQualityController.h" #include "BaseLib/Counter.h" diff --git a/MeshLib/MeshQuality/MeshQualityController.cpp b/MeshLib/MeshQuality/MeshValidation.cpp similarity index 84% rename from MeshLib/MeshQuality/MeshQualityController.cpp rename to MeshLib/MeshQuality/MeshValidation.cpp index 1385571a2ba..e6a97012600 100644 --- a/MeshLib/MeshQuality/MeshQualityController.cpp +++ b/MeshLib/MeshQuality/MeshValidation.cpp @@ -1,8 +1,8 @@ /** - * \file MeshQualityController.cpp + * \file MeshValidation.cpp * \author Karsten Rink * \date 2013-04-04 - * \brief Implementation of the MeshQualityController class. + * \brief Implementation of the MeshValidation class. * * \copyright * Copyright (c) 2013, OpenGeoSys Community (http://www.opengeosys.org) @@ -12,7 +12,7 @@ * */ -#include "MeshQualityController.h" +#include "MeshValidation.h" #include <numeric> @@ -27,7 +27,7 @@ namespace MeshLib { -MeshQualityController::MeshQualityController(MeshLib::Mesh &mesh) +MeshValidation::MeshValidation(MeshLib::Mesh &mesh) { INFO ("Mesh Quality Control:"); this->removeUnusedMeshNodes(mesh); @@ -35,7 +35,7 @@ MeshQualityController::MeshQualityController(MeshLib::Mesh &mesh) this->ElementErrorCodeOutput(codes); } -std::vector<std::size_t> MeshQualityController::findUnusedMeshNodes(const MeshLib::Mesh &mesh) +std::vector<std::size_t> MeshValidation::findUnusedMeshNodes(const MeshLib::Mesh &mesh) { INFO ("Looking for unused mesh nodes..."); unsigned count(0); @@ -56,9 +56,9 @@ std::vector<std::size_t> MeshQualityController::findUnusedMeshNodes(const MeshLi return del_node_idx; } -std::vector<std::size_t> MeshQualityController::removeUnusedMeshNodes(MeshLib::Mesh &mesh) +std::vector<std::size_t> MeshValidation::removeUnusedMeshNodes(MeshLib::Mesh &mesh) { - std::vector<std::size_t> del_node_idx = MeshQualityController::findUnusedMeshNodes(mesh); + std::vector<std::size_t> del_node_idx = MeshValidation::findUnusedMeshNodes(mesh); MeshLib::removeMeshNodes(mesh, del_node_idx); if (!del_node_idx.empty()) @@ -67,7 +67,7 @@ std::vector<std::size_t> MeshQualityController::removeUnusedMeshNodes(MeshLib::M return del_node_idx; } - std::vector<ElementErrorCode> MeshQualityController::testElementGeometry(const MeshLib::Mesh &mesh) + std::vector<ElementErrorCode> MeshValidation::testElementGeometry(const MeshLib::Mesh &mesh) { INFO ("Testing mesh element geometry:"); const std::size_t nErrorCodes (static_cast<std::size_t>(ElementErrorFlag::MaxValue)); @@ -106,7 +106,7 @@ std::vector<std::size_t> MeshQualityController::removeUnusedMeshNodes(MeshLib::M return error_code_vector; } -std::string MeshQualityController::ElementErrorCodeOutput(const std::vector<ElementErrorCode> &error_codes) +std::string MeshValidation::ElementErrorCodeOutput(const std::vector<ElementErrorCode> &error_codes) { const std::size_t nErrorFlags (static_cast<std::size_t>(ElementErrorFlag::MaxValue)); ElementErrorFlag flags[nErrorFlags] = { ElementErrorFlag::ZeroVolume, ElementErrorFlag::NonCoplanar, diff --git a/MeshLib/MeshQuality/MeshQualityController.h b/MeshLib/MeshQuality/MeshValidation.h similarity index 85% rename from MeshLib/MeshQuality/MeshQualityController.h rename to MeshLib/MeshQuality/MeshValidation.h index 5b8573862b2..da0a23d3e6a 100644 --- a/MeshLib/MeshQuality/MeshQualityController.h +++ b/MeshLib/MeshQuality/MeshValidation.h @@ -2,7 +2,7 @@ * \file MeshQualityController.h * \author Karsten Rink * \date 2013-04-04 - * \brief Definition of the MeshQualityController class + * \brief Definition of the MeshValidation class * * \copyright * Copyright (c) 2013, OpenGeoSys Community (http://www.opengeosys.org) @@ -12,8 +12,8 @@ * */ -#ifndef MESHQUALITYCONTROLLER_H -#define MESHQUALITYCONTROLLER_H +#ifndef MESHVALIDATION_H +#define MESHVALIDATION_H #include <vector> @@ -25,13 +25,13 @@ namespace MeshLib { /** * \brief A collection of methods for testing mesh quality and correctness */ -class MeshQualityController +class MeshValidation { public: /// Constructor /// \warning This might change the mesh when removing unused mesh nodes. - MeshQualityController(MeshLib::Mesh &mesh); - ~MeshQualityController() {} + MeshValidation(MeshLib::Mesh &mesh); + ~MeshValidation() {} /** * Find mesh nodes that are not part of any element @@ -64,4 +64,4 @@ private: } // end namespace MeshLib -#endif //MESHQUALITYCONTROLLER_H +#endif //MESHVALIDATION_H -- GitLab