Skip to content
Snippets Groups Projects
Commit aa70c20f authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

NWMP; Renames and shortcuts in processPartition.

parent d785386d
No related branches found
No related tags found
No related merge requests found
...@@ -291,20 +291,19 @@ findGhostNodesInPartition( ...@@ -291,20 +291,19 @@ findGhostNodesInPartition(
void NodeWiseMeshPartitioner::processPartition( void NodeWiseMeshPartitioner::processPartition(
std::size_t const part_id, const bool is_mixed_high_order_linear_elems) std::size_t const part_id, const bool is_mixed_high_order_linear_elems)
{ {
std::vector<MeshLib::Node*> extra_nodes; auto& partition = _partitions[part_id];
std::tie(_partitions[part_id].nodes, extra_nodes) = std::vector<MeshLib::Node*> higher_order_regular_nodes;
std::tie(partition.nodes, higher_order_regular_nodes) =
findNonGhostNodesInPartition(part_id, is_mixed_high_order_linear_elems, findNonGhostNodesInPartition(part_id, is_mixed_high_order_linear_elems,
_mesh->getNumberOfBaseNodes(), _mesh->getNumberOfBaseNodes(),
_mesh->getNodes(), _nodes_partition_ids); _mesh->getNodes(), _nodes_partition_ids);
_partitions[part_id].number_of_non_ghost_base_nodes = partition.number_of_non_ghost_base_nodes = partition.nodes.size();
_partitions[part_id].nodes.size(); partition.number_of_non_ghost_nodes =
_partitions[part_id].number_of_non_ghost_nodes = partition.number_of_non_ghost_base_nodes +
_partitions[part_id].number_of_non_ghost_base_nodes + higher_order_regular_nodes.size();
extra_nodes.size();
std::tie(_partitions[part_id].regular_elements, std::tie(partition.regular_elements, partition.ghost_elements) =
_partitions[part_id].ghost_elements) =
findElementsInPartition(part_id, _mesh->getElements(), findElementsInPartition(part_id, _mesh->getElements(),
_nodes_partition_ids); _nodes_partition_ids);
std::vector<MeshLib::Node*> base_ghost_nodes; std::vector<MeshLib::Node*> base_ghost_nodes;
...@@ -322,8 +321,9 @@ void NodeWiseMeshPartitioner::processPartition( ...@@ -322,8 +321,9 @@ void NodeWiseMeshPartitioner::processPartition(
if (is_mixed_high_order_linear_elems) if (is_mixed_high_order_linear_elems)
{ {
partition.nodes.insert(partition.nodes.end(), extra_nodes.begin(), std::copy(begin(higher_order_regular_nodes),
extra_nodes.end()); end(higher_order_regular_nodes),
std::back_inserter(partition.nodes));
std::copy(begin(higher_order_ghost_nodes), std::copy(begin(higher_order_ghost_nodes),
end(higher_order_ghost_nodes), end(higher_order_ghost_nodes),
std::back_inserter(partition.nodes)); std::back_inserter(partition.nodes));
......
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