Skip to content
Snippets Groups Projects
Commit dad59045 authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov
Browse files

[MeL] Consistent mesh property types; signedness.

parent 4a922463
No related branches found
No related tags found
No related merge requests found
......@@ -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");
......
......@@ -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;
......
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment