Commit 3508688e authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1443 Remove dev code.

parent c8c3ad6f
......@@ -32,9 +32,7 @@ namespace MoReFEM
const NumberingSubset::const_shared_ptr& column_numbering_subset_ptr,
const connectivity_type& connectivity,
const NodeBearer::vector_shared_ptr& processor_wise_node_bearer_list,
const NdofHolder& Ndof_holder,
std::optional<std::reference_wrapper<NodeBearer::vector_shared_ptr>> ghost_like_node_bearer_list,
bool do_print)
const NdofHolder& Ndof_holder)
: row_numbering_subset_(row_numbering_subset_ptr),
column_numbering_subset_(column_numbering_subset_ptr)
{
......@@ -97,10 +95,7 @@ namespace MoReFEM
if (!node.DoBelongToNumberingSubset(column_numbering_subset))
continue;
if (ghost_like_node_bearer_list.has_value())
ghost_like_node_bearer_list.value().get().push_back(connected_node_bearer_ptr);
const auto& dof_list = node.GetDofList();
decltype(auto) dof_list = node.GetDofList();
for (const auto& dof_ptr : dof_list)
{
......@@ -145,55 +140,6 @@ namespace MoReFEM
matrix_pattern_ =
std::make_unique<::MoReFEM::Wrappers::Petsc::MatrixPattern>(content_for_each_local_row);
if (ghost_like_node_bearer_list.has_value())
{
auto& vector = ghost_like_node_bearer_list.value().get();
Utilities::EliminateDuplicate(vector,
Utilities::PointerComparison::Less<NodeBearer::shared_ptr>(),
Utilities::PointerComparison::Equal<NodeBearer::shared_ptr>());
NodeBearer::vector_shared_ptr ret;
std::set_difference(vector.cbegin(),
vector.cend(),
processor_wise_node_bearer_list.cbegin(),
processor_wise_node_bearer_list.cend(),
std::back_inserter(ret),
Utilities::PointerComparison::Less<NodeBearer::shared_ptr>());
#ifndef NDEBUG
{
if (!processor_wise_node_bearer_list.empty())
{
// std::cout << "SIZE = " << processor_wise_node_bearer_list.size() << std::endl;
decltype(auto) first_node_bearer_ptr = *processor_wise_node_bearer_list.cbegin();
assert(!(!first_node_bearer_ptr));
const auto mpi_rank = first_node_bearer_ptr->GetProcessor();
auto belong_to_rank = [mpi_rank](const auto& node_bearer_ptr)
{
assert(!(!node_bearer_ptr));
return node_bearer_ptr->GetProcessor() == mpi_rank;
};
assert(std::all_of(processor_wise_node_bearer_list.cbegin(),
processor_wise_node_bearer_list.cend(),
belong_to_rank));
assert(std::none_of(ret.cbegin(),
ret.cend(),
belong_to_rank));
}
}
#endif // NDEBUG
std::swap(ret, vector);
//std::cout << "MATRIX PATTERN Nghost_like = " << ret.size() << std::endl;
}
}
......
......@@ -111,9 +111,7 @@ namespace MoReFEM
const NumberingSubset::const_shared_ptr& column_numbering_subset,
const connectivity_type& connectivity,
const NodeBearer::vector_shared_ptr& processor_wise_node_bearer_list,
const NdofHolder& Ndof_holder,
std::optional<std::reference_wrapper<NodeBearer::vector_shared_ptr>> ghost_like_node_bearer_list = std::nullopt,
bool do_print = false); // TMP #1443
const NdofHolder& Ndof_holder);
/*!
* \brief Computes the number of diagonal and off-diagonal terms for each row of a dof matrix.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment