diff --git a/FileIO/Legacy/MeshIO.cpp b/FileIO/Legacy/MeshIO.cpp index 8ef075314bc51347d339639e0a0ed25ea623052a..164a01515a2bfdbe6377b3a33d297aaf4fe00716 100644 --- a/FileIO/Legacy/MeshIO.cpp +++ b/FileIO/Legacy/MeshIO.cpp @@ -251,7 +251,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])->getType() == MshElemType::EDGE) { + if ((ele_vec[i])->getGeoType() == MshElemType::EDGE) { non_line_element[i] = false; non_null_element[i] = false; } else { @@ -265,7 +265,7 @@ void MeshIO::writeElementsExceptLines(std::vector<MeshLib::Element*> const& ele_ out << n_elements << std::endl; for (size_t i(0), k(0); i < ele_vector_size; i++) { if (non_line_element[i] && non_null_element[i]) { - out << k << " " << ele_vec[i]->getValue() << " " << MshElemType2String(ele_vec[i]->getType()) << " "; + out << k << " " << ele_vec[i]->getValue() << " " << MshElemType2String(ele_vec[i]->getGeoType()) << " "; for(size_t j = 0; j < ele_vec[i]->getNNodes()-1; j++) out << ele_vec[i]->getNode(j)->getID() << " "; out << ele_vec[i]->getNode(ele_vec[i]->getNNodes()-1)->getID() << std::endl; diff --git a/FileIO/XmlIO/VTKInterface.cpp b/FileIO/XmlIO/VTKInterface.cpp index b483a1e71be9d0a2452a1b3134a4191ec2c60c96..649343648c046a8ff5ad4c073ece0f9096554cb4 100644 --- a/FileIO/XmlIO/VTKInterface.cpp +++ b/FileIO/XmlIO/VTKInterface.cpp @@ -408,7 +408,7 @@ int VTKInterface::write(std::ostream& stream) oss << std::endl; offset_count += nElemNodes; offstream << offset_count << " "; - typestream << this->getVTKElementID(element->getType()) << " "; + typestream << this->getVTKElementID(element->getGeoType()) << " "; } oss << data_array_close; offstream << std::endl << data_array_close; diff --git a/Gui/DataView/ElementTreeModel.cpp b/Gui/DataView/ElementTreeModel.cpp index 34ea1e568a124c7107c8dceb6626b919fd21deb0..974f0a4aa8f8362c3696cc5c60ac287b3e538876 100644 --- a/Gui/DataView/ElementTreeModel.cpp +++ b/Gui/DataView/ElementTreeModel.cpp @@ -43,7 +43,7 @@ void ElementTreeModel::setElement(const MeshLib::Mesh* grid, const size_t elem_i _rootItem->appendChild(elemItem); QList<QVariant> typeData; - typeData << "Element Type: " << QString::fromStdString(MshElemType2String(elem->getType())); + typeData << "Element Type: " << QString::fromStdString(MshElemType2String(elem->getGeoType())); TreeItem* typeItem = new TreeItem(typeData, elemItem); elemItem->appendChild(typeItem); diff --git a/Gui/DataView/MshLayerMapper.cpp b/Gui/DataView/MshLayerMapper.cpp index 612429a6a634736da34fdd289eb1d4965940b1c6..ceb29d8760689fcce64e4d6e42ddc27d89c629e9 100644 --- a/Gui/DataView/MshLayerMapper.cpp +++ b/Gui/DataView/MshLayerMapper.cpp @@ -74,15 +74,15 @@ MeshLib::Mesh* MshLayerMapper::CreateLayers(const MeshLib::Mesh* mesh, unsigned e_nodes[j] = new_nodes[node_id+nNodes]; e_nodes[j+nElemNodes] = new_nodes[node_id]; } - if (sfc_elem->getType() == MshElemType::TRIANGLE) // extrude triangles to prism + if (sfc_elem->getGeoType() == MshElemType::TRIANGLE) // extrude triangles to prism new_elems[elem_offset+i] = new MeshLib::Prism(e_nodes, mat_id); - else if (sfc_elem->getType() == MshElemType::QUAD) // extrude quads to hexes + else if (sfc_elem->getGeoType() == MshElemType::QUAD) // extrude quads to hexes new_elems[elem_offset+i] = new MeshLib::Hex(e_nodes, mat_id); } else { std::cout << "Warning in MshLayerMapper::CreateLayers() - Method can only handle 2D mesh elements ..." << std::endl; - std::cout << "Skipping Element " << i << " of type \"" << MshElemType2String(sfc_elem->getType()) << "\"." << std::endl; + std::cout << "Skipping Element " << i << " of type \"" << MshElemType2String(sfc_elem->getGeoType()) << "\"." << std::endl; } } } diff --git a/Gui/DataView/MshModel.cpp b/Gui/DataView/MshModel.cpp index 34495e5a6ad8b361e9bc0bc16016081984f5fa15..d215e1350a75843d15d2b2e89f38c30b6edcc7ea 100644 --- a/Gui/DataView/MshModel.cpp +++ b/Gui/DataView/MshModel.cpp @@ -68,7 +68,7 @@ void MshModel::addMeshObject(const MeshLib::Mesh* mesh) for (size_t i = 0; i < nElems; i++) { const MeshLib::Element* current_element (elems[i]); - MshElemType::type t (current_element->getType()); + MshElemType::type t (current_element->getGeoType()); QList<QVariant> elemData; if (t != elem_type) { diff --git a/Gui/VtkVis/VtkMeshSource.cpp b/Gui/VtkVis/VtkMeshSource.cpp index ea0a73a5fce5d4d2812b149b97cac0887437c9c6..8114b6496a22ee0fc635c3dc8ed29d75f14bf725 100644 --- a/Gui/VtkVis/VtkMeshSource.cpp +++ b/Gui/VtkVis/VtkMeshSource.cpp @@ -129,7 +129,7 @@ int VtkMeshSource::RequestData( vtkInformation* request, int type(0); const MeshLib::Element* elem (elems[i]); - switch (elem->getType()) + switch (elem->getGeoType()) { case MshElemType::EDGE: type = 3; @@ -153,7 +153,7 @@ int VtkMeshSource::RequestData( vtkInformation* request, type = 14; break; default: // if none of the above can be applied - std::cout << "Error in VtkMeshSource::RequestData() - Unknown element type " << MshElemType2String(elem->getType()) << "." << std::endl; + std::cout << "Error in VtkMeshSource::RequestData() - Unknown element type " << MshElemType2String(elem->getGeoType()) << "." << std::endl; return 0; } diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp index ca7bc18a3c255e4f6dc6c485cbb438c1b911b848..e19affcec61bdd4e1b4e81fada189447122f2d47 100644 --- a/MeshLib/Elements/Element.cpp +++ b/MeshLib/Elements/Element.cpp @@ -117,7 +117,7 @@ const Node* Element::getNode(unsigned i) const { if (i < getNNodes()) return _nodes[i]; - std::cerr << "Error in MeshLib::Element::getNode() - Index " << i << " in " << MshElemType2String(getType()) << " does not exist." << std::endl; + std::cerr << "Error in MeshLib::Element::getNode() - Index " << i << " in " << MshElemType2String(getGeoType()) << " does not exist." << std::endl; return NULL; } diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h index 2d691317198bb34f87351d6e8b709ec49ef82793..6fef4bf7fe436eb18e8a906c24796d924c48d991 100644 --- a/MeshLib/Elements/Element.h +++ b/MeshLib/Elements/Element.h @@ -114,7 +114,7 @@ public: unsigned getNodeIndex(unsigned i) const; /// Get the type of the mesh element (as a MshElemType-enum). - virtual MshElemType::type getType() const = 0; + virtual MshElemType::type getGeoType() const = 0; /// Get the value for this element. unsigned getValue() const { return _value; }; diff --git a/MeshLib/Elements/TemplateEdge.h b/MeshLib/Elements/TemplateEdge.h index 234173c52723bf3c4a96b437d690170d9e67064b..47386c34916a688930e20a82d6c2f2589ebf7c96 100644 --- a/MeshLib/Elements/TemplateEdge.h +++ b/MeshLib/Elements/TemplateEdge.h @@ -82,7 +82,7 @@ public: * Method returns the type of the element. In this case EDGE will be returned. * @return MshElemType::EDGE */ - virtual MshElemType::type getType() const { return MshElemType::EDGE; } + virtual MshElemType::type getGeoType() const { return MshElemType::EDGE; } /// Returns true if these two indices form an edge and false otherwise bool isEdge(unsigned idx1, unsigned idx2) const diff --git a/MeshLib/Elements/TemplateHex.h b/MeshLib/Elements/TemplateHex.h index a42b9f7400ec3dbb714668738a23665274d6d35c..0a67ccf42620ed8beaac1d02305598672b454cfd 100644 --- a/MeshLib/Elements/TemplateHex.h +++ b/MeshLib/Elements/TemplateHex.h @@ -80,7 +80,7 @@ public: * Method returns the type of the element. In this case HEXAHEDRON will be returned. * @return MshElemType::HEXAHEDRON */ - virtual MshElemType::type getType() const { return MshElemType::HEXAHEDRON; } + virtual MshElemType::type getGeoType() const { return MshElemType::HEXAHEDRON; } /// Returns true if these two indices form an edge and false otherwise bool isEdge(unsigned i, unsigned j) const; diff --git a/MeshLib/Elements/TemplatePrism.h b/MeshLib/Elements/TemplatePrism.h index 2a93ae4db41ea9f0b9393b05e936f942103c06b6..f9522d505e8024028da499c8fb70db1b2118b794 100644 --- a/MeshLib/Elements/TemplatePrism.h +++ b/MeshLib/Elements/TemplatePrism.h @@ -78,7 +78,7 @@ public: * Method returns the type of the element. In this case PRISM will be returned. * @return MshElemType::PRISM */ - virtual MshElemType::type getType() const { return MshElemType::PRISM; } + virtual MshElemType::type getGeoType() const { return MshElemType::PRISM; } /// Returns true if these two indeces form an edge and false otherwise bool isEdge(unsigned i, unsigned j) const; diff --git a/MeshLib/Elements/TemplatePyramid.h b/MeshLib/Elements/TemplatePyramid.h index 225ec57004d949c076529ff28ec721cff984fa39..58503f9d64b5123daf82b50984a87d7649015aee 100644 --- a/MeshLib/Elements/TemplatePyramid.h +++ b/MeshLib/Elements/TemplatePyramid.h @@ -76,7 +76,7 @@ public: * Method returns the type of the element. In this case PYRAMID will be returned. * @return MshElemType::PYRAMID */ - virtual MshElemType::type getType() const { return MshElemType::PYRAMID; } + virtual MshElemType::type getGeoType() const { return MshElemType::PYRAMID; } /// Returns true if these two indeces form an edge and false otherwise bool isEdge(unsigned i, unsigned j) const; diff --git a/MeshLib/Elements/TemplateQuad.h b/MeshLib/Elements/TemplateQuad.h index d05ac9239caaacd763d84e4d017fd40ca9c4cf8f..f438c86ebb6946454551457f84a3898e2a92b33f 100644 --- a/MeshLib/Elements/TemplateQuad.h +++ b/MeshLib/Elements/TemplateQuad.h @@ -61,7 +61,7 @@ public: * Method returns the type of the element. In this case QUAD will be returned. * @return MshElemType::QUAD */ - virtual MshElemType::type getType() const { return MshElemType::QUAD; } + virtual MshElemType::type getGeoType() const { return MshElemType::QUAD; } /// Returns true if these two indeces form an edge and false otherwise bool isEdge(unsigned i, unsigned j) const; diff --git a/MeshLib/Elements/TemplateTet.h b/MeshLib/Elements/TemplateTet.h index 39c1da63ca1e80d4422e63dbc18ad368ff02b034..802568e56efbfb3803648d300ad62addb8769e15 100644 --- a/MeshLib/Elements/TemplateTet.h +++ b/MeshLib/Elements/TemplateTet.h @@ -75,7 +75,7 @@ public: * Method returns the type of the element. In this case TETRAHEDRON will be returned. * @return MshElemType::TETRAHEDRON */ - virtual MshElemType::type getType() const { return MshElemType::TETRAHEDRON; } + virtual MshElemType::type getGeoType() const { return MshElemType::TETRAHEDRON; } /// Returns true if these two indeces form an edge and false otherwise bool isEdge(unsigned i, unsigned j) const; diff --git a/MeshLib/Elements/TemplateTri.h b/MeshLib/Elements/TemplateTri.h index 1bbdc31672dc010f1b978f134f4a22be17e7b0c0..50ba490d0fe1918b4b4d65e86c781f00de4b3f0e 100644 --- a/MeshLib/Elements/TemplateTri.h +++ b/MeshLib/Elements/TemplateTri.h @@ -68,7 +68,7 @@ public: * Method returns the type of the element. In this case TRIANGLE will be returned. * @return MshElemType::TRIANGLE */ - virtual MshElemType::type getType() const { return MshElemType::TRIANGLE; } + virtual MshElemType::type getGeoType() const { return MshElemType::TRIANGLE; } /// Returns true if these two indices form an edge and false otherwise bool isEdge(unsigned idx1, unsigned idx2) const; diff --git a/MeshLib/Mesh.cpp b/MeshLib/Mesh.cpp index 2db846e49945a7011a862729f3b0e7f06f2b447d..8e168fac8fc7c64629d5c906e5fd9eec3321d1cc 100644 --- a/MeshLib/Mesh.cpp +++ b/MeshLib/Mesh.cpp @@ -170,7 +170,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->getType() != MshElemType::EDGE) + if (element->getGeoType() != MshElemType::EDGE) { const size_t nNodes (element->getNNodes()); for (unsigned n(0); n<nNodes; ++n) @@ -183,7 +183,7 @@ void Mesh::setElementsConnectedToElements() for (unsigned i(0); i<nNeighbors; ++i) { - if (element->addNeighbor(neighbors[i]) && neighbors[i]->getType() != MshElemType::EDGE) + if (element->addNeighbor(neighbors[i]) && neighbors[i]->getGeoType() != MshElemType::EDGE) { neighbors[i]->addNeighbor(element); } diff --git a/MeshLib/MeshQuality/MeshQualityChecker.cpp b/MeshLib/MeshQuality/MeshQualityChecker.cpp index 47fb72aade65403e0ede9c9677f88dace99847bf..72a51a9265852f6378b32927f83fbde2bbdaa4ab 100644 --- a/MeshLib/MeshQuality/MeshQualityChecker.cpp +++ b/MeshLib/MeshQuality/MeshQualityChecker.cpp @@ -37,7 +37,7 @@ BASELIB::Histogram<double> MeshQualityChecker::getHistogram (size_t nclasses) co void MeshQualityChecker::errorMsg (const Element* elem, size_t idx) const { ERR ("Error in MeshQualityChecker::check() - Calculated value of element is below double precision minimum."); - ERR ("Points of %s-Element %d: ", MshElemType2String(elem->getType()).c_str(), idx); + ERR ("Points of %s-Element %d: ", MshElemType2String(elem->getGeoType()).c_str(), idx); for (size_t i(0); i < elem->getNNodes(); i++) { const double* coords = elem->getNode(i)->getCoords(); diff --git a/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp b/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp index 041a1550c94d029e67757a901755658b1d5ae717..e8507a16b9a3bf4879cc29656965d03475f0a2b6 100644 --- a/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp +++ b/MeshLib/MeshQuality/MeshQualityEquiAngleSkew.cpp @@ -42,7 +42,7 @@ void MeshQualityEquiAngleSkew::check () for (size_t k(0); k < nElements; k++) { const Element* elem (elements[k]); - switch (elem->getType()) + switch (elem->getGeoType()) { case MshElemType::EDGE: _mesh_quality_measure[k] = -1.0; diff --git a/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp b/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp index 3bd5560d9314ec7d23c2c9ba139620e9a5169d44..17cf68347b55d9453db7d1e1d992a914066ef7d8 100644 --- a/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp +++ b/MeshLib/MeshQuality/MeshQualityShortestLongestRatio.cpp @@ -29,7 +29,7 @@ void MeshQualityShortestLongestRatio::check() for (size_t k(0); k < nElements; k++) { const Element* elem (elements[k]); - switch (elem->getType()) + switch (elem->getGeoType()) { case MshElemType::EDGE: _mesh_quality_measure[k] = 1.0; @@ -62,7 +62,7 @@ void MeshQualityShortestLongestRatio::check() } default: ERR ("MeshQualityShortestLongestRatio::check () check for element type %s not implemented.", - MshElemType2String(elem->getType()).c_str()); + MshElemType2String(elem->getGeoType()).c_str()); } } } diff --git a/MeshLib/MeshQuality/MeshQualityVolume.cpp b/MeshLib/MeshQuality/MeshQualityVolume.cpp index 114a3c1e0b4b69ec2666e14dfd7d942dfae9205f..961c1c9660e47e1a803f8ce426d825341f07e9b0 100644 --- a/MeshLib/MeshQuality/MeshQualityVolume.cpp +++ b/MeshLib/MeshQuality/MeshQualityVolume.cpp @@ -32,7 +32,7 @@ void MeshQualityVolume::check() for (size_t k(0); k < nElements; k++) { const Element* elem (elements[k]); - MshElemType::type elem_type (elem->getType()); + MshElemType::type elem_type (elem->getGeoType()); if (elem_type == MshElemType::EDGE || elem_type == MshElemType::TRIANGLE || elem_type == MshElemType::QUAD) diff --git a/MeshLib/MshEditor.cpp b/MeshLib/MshEditor.cpp index 0c61b7044c01a739b0ef6b4fd6bfef7f6aa44d93..0759971cd250444bd952fcb01e367f19b269ef71 100644 --- a/MeshLib/MshEditor.cpp +++ b/MeshLib/MshEditor.cpp @@ -44,7 +44,7 @@ void MshEditor::getSurfaceAreaForNodes(const MeshLib::Mesh* mesh, std::vector<do for (size_t i=0; i<nConnElems; ++i) { const MeshLib::Element* elem (conn_elems[i]); - const unsigned nElemParts = (elem->getType() == MshElemType::TRIANGLE) ? 3 : 4; + const unsigned nElemParts = (elem->getGeoType() == MshElemType::TRIANGLE) ? 3 : 4; const double area = conn_elems[i]->getContent() / nElemParts; node_area += area; total_area += area; @@ -134,7 +134,7 @@ MeshLib::Mesh* MshEditor::getMeshSurface(const MeshLib::Mesh &mesh, const double for (unsigned i=0; i<nNewElements; ++i) { MeshLib::Element* elem (sfc_elements[i]); - if (elem->getType() == MshElemType::TRIANGLE) { + if (elem->getGeoType() == MshElemType::TRIANGLE) { MeshLib::Node** tri_nodes = new MeshLib::Node*[3]; for (unsigned k(0); k<3; k++) tri_nodes[k] = sfc_nodes[node_id_map[elem->getNode(k)->getID()]]; @@ -198,7 +198,7 @@ void MshEditor::get2DSurfaceElements(const std::vector<MeshLib::Element*> &all_e continue; } - if (face->getType() == MshElemType::TRIANGLE) + if (face->getGeoType() == MshElemType::TRIANGLE) sfc_elements.push_back(new MeshLib::Tri(*static_cast<const MeshLib::Tri*>(face))); else sfc_elements.push_back(new MeshLib::Quad(*static_cast<const MeshLib::Quad*>(face)));