diff --git a/MeshLib/ElementStatus.cpp b/MeshLib/ElementStatus.cpp index a825faf7d57a6872e2038eea39623a8c7c1bcc7c..bd10860e5d52584e0a10cf9d764d4c1de59e12aa 100644 --- a/MeshLib/ElementStatus.cpp +++ b/MeshLib/ElementStatus.cpp @@ -31,7 +31,7 @@ ElementStatus::ElementStatus(Mesh const* const mesh, bool hasAnyInactive) } ElementStatus::ElementStatus(Mesh const* const mesh, - std::vector<unsigned> const& vec_inactive_matIDs) + std::vector<int> const& vec_inactive_matIDs) : ElementStatus(mesh, !vec_inactive_matIDs.empty()) { auto materialIds = mesh->getProperties().getPropertyVector<int>("MaterialIDs"); diff --git a/MeshLib/ElementStatus.h b/MeshLib/ElementStatus.h index c3c196c584766b3951ab7989250d3812e184f240..43567ffb2b7f96e37869666ba5a537385e519043 100644 --- a/MeshLib/ElementStatus.h +++ b/MeshLib/ElementStatus.h @@ -31,7 +31,8 @@ public: bool hasAnyInactive = false); /// Constructor taking a vector of inactive material IDs - ElementStatus(MeshLib::Mesh const*const mesh, std::vector<unsigned> const& vec_inactive_matIDs); + ElementStatus(MeshLib::Mesh const* const mesh, + std::vector<int> const& vec_inactive_matIDs); /// Returns a vector of active element IDs std::vector<MeshLib::Element*> const& getActiveElements() const; diff --git a/Tests/MeshLib/TestElementStatus.cpp b/Tests/MeshLib/TestElementStatus.cpp index 06dbfc0cdc29d2cbdccd835ca42d6af0d5dd90f2..5987ec55b00c625f45e34127d9322a082efb3e6f 100644 --- a/Tests/MeshLib/TestElementStatus.cpp +++ b/Tests/MeshLib/TestElementStatus.cpp @@ -53,14 +53,14 @@ TEST(MeshLib, ElementStatus) { // set material 1 to false - std::vector<unsigned> inactiveMat{1}; + std::vector<int> inactiveMat{1}; MeshLib::ElementStatus status(mesh.get(), inactiveMat); ASSERT_EQ (elements.size()-elements_per_side, status.getNActiveElements()); } { // set material 0 and 1 to false - std::vector<unsigned> inactiveMat{0, 1}; + std::vector<int> inactiveMat{0, 1}; MeshLib::ElementStatus status(mesh.get(), inactiveMat); ASSERT_EQ (elements.size()-(2*elements_per_side), status.getNActiveElements());