Skip to content
Snippets Groups Projects
Commit 17f2173c authored by Norihiro Watanabe's avatar Norihiro Watanabe
Browse files

change std::vector<MeshLib::Element const*> to std::vector<MeshLib::Element*>

parent 91308b59
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ LocalToGlobalIndexMap::LocalToGlobalIndexMap(
LocalToGlobalIndexMap::LocalToGlobalIndexMap(
std::vector<MeshLib::MeshSubsets*> const& mesh_subsets,
std::vector<MeshLib::Element const*> const& elements,
std::vector<MeshLib::Element*> const& elements,
AssemblerLib::MeshComponentMap&& mesh_component_map,
AssemblerLib::ComponentOrder const order)
: _mesh_subsets(mesh_subsets), _mesh_component_map(std::move(mesh_component_map))
......@@ -58,7 +58,7 @@ LocalToGlobalIndexMap::LocalToGlobalIndexMap(
LocalToGlobalIndexMap*
LocalToGlobalIndexMap::deriveBoundaryConstrainedMap(
std::vector<MeshLib::MeshSubsets*> const& mesh_subsets,
std::vector<MeshLib::Element const*> const& elements,
std::vector<MeshLib::Element*> const& elements,
AssemblerLib::ComponentOrder const order) const
{
DBUG("Construct reduced local to global index map.");
......
......@@ -64,7 +64,7 @@ public:
/// \note The elements are not necessary those used in the mesh_subsets.
LocalToGlobalIndexMap* deriveBoundaryConstrainedMap(
std::vector<MeshLib::MeshSubsets*> const& mesh_subsets,
std::vector<MeshLib::Element const*> const& elements,
std::vector<MeshLib::Element*> const& elements,
AssemblerLib::ComponentOrder const order =
AssemblerLib::ComponentOrder::BY_COMPONENT) const;
......@@ -87,7 +87,7 @@ private:
/// this construtor.
explicit LocalToGlobalIndexMap(
std::vector<MeshLib::MeshSubsets*> const& mesh_subsets,
std::vector<MeshLib::Element const*> const& elements,
std::vector<MeshLib::Element*> const& elements,
AssemblerLib::MeshComponentMap&& mesh_component_map,
AssemblerLib::ComponentOrder const order);
......
......@@ -50,7 +50,7 @@ std::vector<std::size_t> getConnectedNodeIDs(const std::vector<MeshLib::Element*
}
std::vector<Node*>
selectNodes(std::vector<Element const*> const& elements)
selectNodes(std::vector<Element*> const& elements)
{
std::set<Node*> nodes_set;
for (auto e : elements)
......
......@@ -36,7 +36,7 @@ std::vector<std::size_t> getConnectedElementIDs(MeshLib::Mesh const& msh, const
std::vector<std::size_t> getConnectedNodeIDs(const std::vector<MeshLib::Element*> &elements);
/// Create a vector of unique nodes used by given elements.
std::vector<Node*> selectNodes(std::vector<Element const*> const& elements);
std::vector<Node*> selectNodes(std::vector<Element*> const& elements);
} // end namespace MeshLib
......
......@@ -167,7 +167,7 @@ private:
/// Vector of lower-dimensional elements on which the boundary condition is
/// defined.
std::vector<MeshLib::Element const*> _elements;
std::vector<MeshLib::Element*> _elements;
MeshLib::MeshSubset const* _mesh_subset_all_nodes = nullptr;
std::vector<MeshLib::MeshSubsets*> _all_mesh_subsets;
......
......@@ -83,9 +83,9 @@ TEST_F(AssemblerLibLocalToGlobalIndexMapTest, SubsetByComponent)
// Select some elements from the full mesh.
std::array<std::size_t, 3> const ids = {{ 0, 5, 8 }};
std::vector<MeshLib::Element const*> some_elements;
std::vector<MeshLib::Element*> some_elements;
for (std::size_t id : ids)
some_elements.push_back(mesh->getElement(id));
some_elements.push_back(const_cast<MeshLib::Element*>(mesh->getElement(id)));
// Find unique node ids of the selected elements for testing.
std::vector<MeshLib::Node*> selected_nodes = MeshLib::selectNodes(some_elements);
......
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