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

[NodePartitionedMesh] Changed the condition of isGhostNode

parent 7ef7245f
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,6 @@ NodePartitionedMesh::NodePartitionedMesh( ...@@ -38,7 +38,6 @@ NodePartitionedMesh::NodePartitionedMesh(
Properties properties, Properties properties,
const std::size_t n_global_base_nodes, const std::size_t n_global_base_nodes,
const std::size_t n_global_nodes, const std::size_t n_global_nodes,
const std::size_t n_active_base_nodes,
const std::size_t n_active_nodes, const std::size_t n_active_nodes,
std::vector<std::size_t>&& n_active_base_nodes_at_rank, std::vector<std::size_t>&& n_active_base_nodes_at_rank,
std::vector<std::size_t>&& n_active_high_order_nodes_at_rank) std::vector<std::size_t>&& n_active_high_order_nodes_at_rank)
...@@ -46,7 +45,6 @@ NodePartitionedMesh::NodePartitionedMesh( ...@@ -46,7 +45,6 @@ NodePartitionedMesh::NodePartitionedMesh(
_global_node_ids(glb_node_ids), _global_node_ids(glb_node_ids),
_n_global_base_nodes(n_global_base_nodes), _n_global_base_nodes(n_global_base_nodes),
_n_global_nodes(n_global_nodes), _n_global_nodes(n_global_nodes),
_n_active_base_nodes(n_active_base_nodes),
_n_active_nodes(n_active_nodes), _n_active_nodes(n_active_nodes),
_n_active_base_nodes_at_rank(std::move(n_active_base_nodes_at_rank)), _n_active_base_nodes_at_rank(std::move(n_active_base_nodes_at_rank)),
_n_active_high_order_nodes_at_rank( _n_active_high_order_nodes_at_rank(
...@@ -60,16 +58,7 @@ NodePartitionedMesh::NodePartitionedMesh( ...@@ -60,16 +58,7 @@ NodePartitionedMesh::NodePartitionedMesh(
bool NodePartitionedMesh::isGhostNode(const std::size_t node_id) const bool NodePartitionedMesh::isGhostNode(const std::size_t node_id) const
{ {
if (node_id < _n_active_base_nodes) return node_id >= _n_active_nodes;
{
return false;
}
if (!isBaseNode(*_nodes[node_id], getElementsConnectedToNode(node_id)) &&
node_id < getLargestActiveNodeID())
{
return false;
}
return true;
} }
std::size_t NodePartitionedMesh::getMaximumNConnectedNodesToNode() const std::size_t NodePartitionedMesh::getMaximumNConnectedNodesToNode() const
......
...@@ -36,7 +36,6 @@ public: ...@@ -36,7 +36,6 @@ public:
_global_node_ids(mesh.getNumberOfNodes()), _global_node_ids(mesh.getNumberOfNodes()),
_n_global_base_nodes(mesh.getNumberOfBaseNodes()), _n_global_base_nodes(mesh.getNumberOfBaseNodes()),
_n_global_nodes(mesh.getNumberOfNodes()), _n_global_nodes(mesh.getNumberOfNodes()),
_n_active_base_nodes(mesh.getNumberOfBaseNodes()),
_n_active_nodes(mesh.getNumberOfNodes()), _n_active_nodes(mesh.getNumberOfNodes()),
_is_single_thread(true) _is_single_thread(true)
{ {
...@@ -59,7 +58,6 @@ public: ...@@ -59,7 +58,6 @@ public:
\param properties Mesh property. \param properties Mesh property.
\param n_global_base_nodes Number of the base nodes of the global mesh. \param n_global_base_nodes Number of the base nodes of the global mesh.
\param n_global_nodes Number of all nodes of the global mesh. \param n_global_nodes Number of all nodes of the global mesh.
\param n_active_base_nodes Number of the active base nodes.
\param n_active_nodes Number of all active nodes. \param n_active_nodes Number of all active nodes.
\param n_active_base_nodes_at_rank Numbers of the active base nodes of \param n_active_base_nodes_at_rank Numbers of the active base nodes of
all previous ranks. all previous ranks.
...@@ -75,7 +73,6 @@ public: ...@@ -75,7 +73,6 @@ public:
Properties properties, Properties properties,
const std::size_t n_global_base_nodes, const std::size_t n_global_base_nodes,
const std::size_t n_global_nodes, const std::size_t n_global_nodes,
const std::size_t n_active_base_nodes,
const std::size_t n_active_nodes, const std::size_t n_active_nodes,
std::vector<std::size_t>&& n_active_base_nodes_at_rank, std::vector<std::size_t>&& n_active_base_nodes_at_rank,
std::vector<std::size_t>&& n_active_high_order_nodes_at_rank); std::vector<std::size_t>&& n_active_high_order_nodes_at_rank);
...@@ -94,24 +91,11 @@ public: ...@@ -94,24 +91,11 @@ public:
return _global_node_ids[node_id]; return _global_node_ids[node_id];
} }
/// Get the number of the active nodes of the partition for linear elements.
std::size_t getNumberOfActiveBaseNodes() const
{
return _n_active_base_nodes;
}
/// Get the number of all active nodes of the partition. /// Get the number of all active nodes of the partition.
std::size_t getNumberOfActiveNodes() const { return _n_active_nodes; } std::size_t getNumberOfActiveNodes() const { return _n_active_nodes; }
/// Check whether a node with ID of node_id is a ghost node /// Check whether a node with ID of node_id is a ghost node
bool isGhostNode(const std::size_t node_id) const; bool isGhostNode(const std::size_t node_id) const;
/// Get the largest ID of active nodes for higher order elements in a
/// partition.
std::size_t getLargestActiveNodeID() const
{
return getNumberOfBaseNodes() + _n_active_nodes - _n_active_base_nodes;
}
std::size_t getNumberOfActiveBaseNodesAtRank(int const partition_id) const std::size_t getNumberOfActiveBaseNodesAtRank(int const partition_id) const
{ {
return _n_active_base_nodes_at_rank[partition_id]; return _n_active_base_nodes_at_rank[partition_id];
...@@ -146,9 +130,6 @@ private: ...@@ -146,9 +130,6 @@ private:
/// Number of all nodes of the global mesh. /// Number of all nodes of the global mesh.
std::size_t _n_global_nodes; std::size_t _n_global_nodes;
/// Number of the active nodes for linear interpolations
std::size_t _n_active_base_nodes;
/// Number of the all active nodes. /// Number of the all active nodes.
std::size_t _n_active_nodes; std::size_t _n_active_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