From a6f86f73effd71fa813cd04020077916dff6e0dc Mon Sep 17 00:00:00 2001 From: Alexander Grayver Date: Mon, 11 Dec 2017 16:33:52 +0100 Subject: [PATCH] Remove coin flip --- source/dofs/dof_tools.cc | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index c115da2d80..d58d735a82 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -1459,10 +1459,6 @@ namespace DoFTools std::vector local_dof_indices; local_dof_indices.reserve (max_dofs_per_cell(dof_handler)); - // pseudo-randomly assign variables which lie on the interface between - // subdomains to each of the two or more - bool coin_flip = true; - // loop over all cells and record which subdomain a DoF belongs to. // toss a coin in case it is on an interface typename DoFHandlerType::active_cell_iterator @@ -1476,18 +1472,16 @@ namespace DoFTools cell->get_dof_indices (local_dof_indices); // set subdomain ids. if dofs already have their values set then - // they must be on partition interfaces. in that case randomly - // assign them to either the previous association or the current - // one, where we take "random" to be "once this way once that way" + // they must be on partition interfaces. in that case assign them + // to either the previous association or the current processor + // with the smaller subdomain id. for (unsigned int i=0; i subdomain_id) { - if (coin_flip == true) - subdomain_association[local_dof_indices[i]] = subdomain_id; - coin_flip = !coin_flip; + subdomain_association[local_dof_indices[i]] = subdomain_id; } } -- 2.39.5