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

[MeL] Rewrite use isBaseNode in isGhostNode query.

Replace first part of the query with isBaseNode() as in
previous commits.
Use getNumberOfBaseNodes in calculation of "active" (regular) nodes.
parent d42cf408
No related branches found
No related tags found
No related merge requests found
...@@ -109,18 +109,21 @@ public: ...@@ -109,18 +109,21 @@ public:
bool isGhostNode(const std::size_t node_id) const bool isGhostNode(const std::size_t node_id) const
{ {
if (node_id < _n_active_base_nodes) if (node_id < _n_active_base_nodes)
{
return false; return false;
else if (node_id >= _n_base_nodes && node_id < getLargestActiveNodeID()) }
if (!isBaseNode(*_nodes[node_id]) && node_id < getLargestActiveNodeID())
{
return false; return false;
else }
return true; return true;
} }
/// Get the largest ID of active nodes for higher order elements in a /// Get the largest ID of active nodes for higher order elements in a
/// partition. /// partition.
std::size_t getLargestActiveNodeID() const std::size_t getLargestActiveNodeID() const
{ {
return _n_base_nodes + _n_active_nodes - _n_active_base_nodes; return getNumberOfBaseNodes() + _n_active_nodes - _n_active_base_nodes;
} }
// TODO I guess that is a simplified version of computeSparsityPattern() // TODO I guess that is a simplified version of computeSparsityPattern()
......
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