From 4773a2546b1054c3425d5fd86aff7ab2c5751168 Mon Sep 17 00:00:00 2001 From: Norihiro Watanabe <norihiro.watanabe@ufz.de> Date: Fri, 30 Aug 2013 12:46:33 +0200 Subject: [PATCH] rename Edge to Line in MshElemType and CellType --- FileIO/Legacy/MeshIO.cpp | 4 ++-- FileIO/RapidXmlIO/BoostVtuInterface.cpp | 2 +- FileIO/RapidXmlIO/RapidVtuInterface.cpp | 2 +- Gui/VtkVis/VtkMeshSource.cpp | 2 +- MeshLib/Elements/Edge.h | 2 +- MeshLib/Elements/TemplateEdge.h | 6 +++--- MeshLib/Mesh.cpp | 6 +++--- MeshLib/MeshEnums.cpp | 4 ++-- MeshLib/MeshEnums.h | 6 +++--- MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp | 2 +- MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp | 2 +- MeshLib/MeshQuality/MeshQualityVolume.cpp | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/FileIO/Legacy/MeshIO.cpp b/FileIO/Legacy/MeshIO.cpp index 9353705b136..cb0b5449f62 100644 --- a/FileIO/Legacy/MeshIO.cpp +++ b/FileIO/Legacy/MeshIO.cpp @@ -168,7 +168,7 @@ MeshLib::Element* MeshIO::readElement(const std::string& line, switch(elem_type) { - case MeshElemType::EDGE: { + case MeshElemType::LINE: { for (int i = 0; i < 2; ++i) ss >> idx[i]; // edge_nodes array will be deleted from Edge object @@ -286,7 +286,7 @@ void MeshIO::writeElementsExceptLines(std::vector<MeshLib::Element*> const& ele_ size_t n_elements(0); for (size_t i(0); i < ele_vector_size; ++i) { - if ((ele_vec[i])->getGeomType() == MeshElemType::EDGE) { + if ((ele_vec[i])->getGeomType() == MeshElemType::LINE) { non_line_element[i] = false; non_null_element[i] = false; } else { diff --git a/FileIO/RapidXmlIO/BoostVtuInterface.cpp b/FileIO/RapidXmlIO/BoostVtuInterface.cpp index 8fae54eeb22..5462a3bc435 100644 --- a/FileIO/RapidXmlIO/BoostVtuInterface.cpp +++ b/FileIO/RapidXmlIO/BoostVtuInterface.cpp @@ -500,7 +500,7 @@ unsigned BoostVtuInterface::getVTKElementID(MeshElemType type) const { switch (type) { - case MeshElemType::EDGE: + case MeshElemType::LINE: return 3; case MeshElemType::TRIANGLE: return 5; diff --git a/FileIO/RapidXmlIO/RapidVtuInterface.cpp b/FileIO/RapidXmlIO/RapidVtuInterface.cpp index 86008571299..76ce86a8f01 100644 --- a/FileIO/RapidXmlIO/RapidVtuInterface.cpp +++ b/FileIO/RapidXmlIO/RapidVtuInterface.cpp @@ -431,7 +431,7 @@ unsigned RapidVtuInterface::getVTKElementID(MeshElemType type) const { switch (type) { - case MeshElemType::EDGE: + case MeshElemType::LINE: return 3; case MeshElemType::TRIANGLE: return 5; diff --git a/Gui/VtkVis/VtkMeshSource.cpp b/Gui/VtkVis/VtkMeshSource.cpp index 19047116010..555b4a76b5b 100644 --- a/Gui/VtkVis/VtkMeshSource.cpp +++ b/Gui/VtkVis/VtkMeshSource.cpp @@ -140,7 +140,7 @@ int VtkMeshSource::RequestData( vtkInformation* request, switch (elem->getGeomType()) { - case MeshElemType::EDGE: + case MeshElemType::LINE: type = 3; break; case MeshElemType::TRIANGLE: diff --git a/MeshLib/Elements/Edge.h b/MeshLib/Elements/Edge.h index 6fac5eda898..152f2bc114f 100644 --- a/MeshLib/Elements/Edge.h +++ b/MeshLib/Elements/Edge.h @@ -19,7 +19,7 @@ namespace MeshLib { -typedef TemplateEdge<2,CellType::EDGE2> Edge; +typedef TemplateEdge<2,CellType::LINE2> Edge; } diff --git a/MeshLib/Elements/TemplateEdge.h b/MeshLib/Elements/TemplateEdge.h index b48095243fa..45e2fe5a239 100644 --- a/MeshLib/Elements/TemplateEdge.h +++ b/MeshLib/Elements/TemplateEdge.h @@ -86,10 +86,10 @@ public: } /** - * Method returns the type of the element. In this case EDGE will be returned. - * @return MeshElemType::EDGE + * Method returns the type of the element. In this case LINE will be returned. + * @return MeshElemType::LINE */ - virtual MeshElemType getGeomType() const { return MeshElemType::EDGE; } + virtual MeshElemType getGeomType() const { return MeshElemType::LINE; } /** * Get the type of the element in context of the finite element method. diff --git a/MeshLib/Mesh.cpp b/MeshLib/Mesh.cpp index 8c64d5b74e9..26311c957e3 100644 --- a/MeshLib/Mesh.cpp +++ b/MeshLib/Mesh.cpp @@ -101,7 +101,7 @@ void Mesh::makeNodesUnique() //set correct id for each node //if (this->getDimension() > 1) - // this->removeMeshElements(MeshElemType::EDGE); + // this->removeMeshElements(MeshElemType::LINE); } @@ -179,7 +179,7 @@ void Mesh::setElementsConnectedToElements() // create vector with all elements connected to current element (includes lots of doubles!) std::vector<Element*> neighbors; Element *const element (_elements[m]); - if (element->getGeomType() != MeshElemType::EDGE) + if (element->getGeomType() != MeshElemType::LINE) { const size_t nNodes (element->getNNodes()); for (unsigned n(0); n<nNodes; ++n) @@ -192,7 +192,7 @@ void Mesh::setElementsConnectedToElements() for (unsigned i(0); i<nNeighbors; ++i) { - if (element->addNeighbor(neighbors[i]) && neighbors[i]->getGeomType() != MeshElemType::EDGE) + if (element->addNeighbor(neighbors[i]) && neighbors[i]->getGeomType() != MeshElemType::LINE) { neighbors[i]->addNeighbor(element); } diff --git a/MeshLib/MeshEnums.cpp b/MeshLib/MeshEnums.cpp index c504eaa56ca..d0cb803a3ee 100644 --- a/MeshLib/MeshEnums.cpp +++ b/MeshLib/MeshEnums.cpp @@ -16,7 +16,7 @@ const std::string MeshElemType2String(const MeshElemType t) { - if (t == MeshElemType::EDGE) + if (t == MeshElemType::LINE) return "line"; if (t == MeshElemType::QUAD) return "quad"; @@ -36,7 +36,7 @@ const std::string MeshElemType2String(const MeshElemType t) MeshElemType String2MeshElemType(const std::string &s) { if (s.compare("line") == 0) - return MeshElemType::EDGE; + return MeshElemType::LINE; if (s.compare("quad") == 0) return MeshElemType::QUAD; if (s.compare("hex") == 0) diff --git a/MeshLib/MeshEnums.h b/MeshLib/MeshEnums.h index d8d13ab2480..69950507a6a 100644 --- a/MeshLib/MeshEnums.h +++ b/MeshLib/MeshEnums.h @@ -23,7 +23,7 @@ enum class MeshElemType { INVALID, - EDGE, + LINE, QUAD, HEXAHEDRON, TRIANGLE, @@ -38,8 +38,8 @@ enum class MeshElemType enum class CellType { INVALID, - EDGE2, - EDGE3, + LINE2, + LINE3, TRI3, TRI6, QUAD4, diff --git a/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp b/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp index b4e65166320..0d0861f2061 100644 --- a/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp +++ b/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp @@ -47,7 +47,7 @@ void MeshQualityEquiAngleSkew::check () const Element* elem (elements[k]); switch (elem->getGeomType()) { - case MeshElemType::EDGE: + case MeshElemType::LINE: _mesh_quality_measure[k] = -1.0; break; case MeshElemType::TRIANGLE: diff --git a/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp b/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp index 32c2b041273..dbcfac3c487 100644 --- a/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp +++ b/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp @@ -34,7 +34,7 @@ void MeshQualityShortestLongestRatio::check() const Element* elem (elements[k]); switch (elem->getGeomType()) { - case MeshElemType::EDGE: + case MeshElemType::LINE: _mesh_quality_measure[k] = 1.0; break; case MeshElemType::TRIANGLE: { diff --git a/MeshLib/MeshQuality/MeshQualityVolume.cpp b/MeshLib/MeshQuality/MeshQualityVolume.cpp index 6fd05ea2953..9c6066944ac 100644 --- a/MeshLib/MeshQuality/MeshQualityVolume.cpp +++ b/MeshLib/MeshQuality/MeshQualityVolume.cpp @@ -36,7 +36,7 @@ void MeshQualityVolume::check() { const Element* elem (elements[k]); MeshElemType elem_type (elem->getGeomType()); - if (elem_type == MeshElemType::EDGE + if (elem_type == MeshElemType::LINE || elem_type == MeshElemType::TRIANGLE || elem_type == MeshElemType::QUAD) { -- GitLab