Skip to content
Snippets Groups Projects
Commit 9af7d048 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MeL/SurfaceExtraction] Use copyElement.

parent 982cceff
No related branches found
No related tags found
No related merge requests found
...@@ -131,29 +131,8 @@ std::vector<MeshLib::Element*> createSfcElementVector( ...@@ -131,29 +131,8 @@ std::vector<MeshLib::Element*> createSfcElementVector(
new_elements.reserve(sfc_elements.size()); new_elements.reserve(sfc_elements.size());
for (auto sfc_element : sfc_elements) for (auto sfc_element : sfc_elements)
{ {
unsigned const n_elem_nodes(sfc_element->getNumberOfBaseNodes()); new_elements.push_back(
auto** new_nodes = new MeshLib::Node*[n_elem_nodes]; MeshLib::copyElement(sfc_element, sfc_nodes, &node_id_map));
for (unsigned k(0); k < n_elem_nodes; k++)
{
new_nodes[k] =
sfc_nodes[node_id_map[sfc_element->getNode(k)->getID()]];
}
switch (sfc_element->getGeomType())
{
case MeshElemType::TRIANGLE:
new_elements.push_back(new MeshLib::Tri(new_nodes));
break;
case MeshElemType::QUAD:
new_elements.push_back(new MeshLib::Quad(new_nodes));
break;
case MeshElemType::LINE:
new_elements.push_back(new MeshLib::Line(new_nodes));
break;
default:
OGS_FATAL(
"createSfcElementVector Unknown element type '%s'.",
MeshElemType2String(sfc_element->getGeomType()).c_str());
}
} }
return new_elements; return new_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