From: Alexander Grayver Date: Mon, 11 Dec 2017 15:33:52 +0000 (+0100) Subject: Remove coin flip X-Git-Tag: v9.0.0-rc1~665^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6f86f73effd71fa813cd04020077916dff6e0dc;p=dealii.git Remove coin flip --- 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; } }