DirichletBC crashes in 64-bit when global index over 2^31

Issue #370 resolved
Chris Richardson created an issue

node can overflow in this code.

+++ b/dolfin/fem/DirichletBC.cpp
@@ -289,9 +289,9 @@ void DirichletBC::gather(Map& boundary_values) const
       }
       else
       {
        const std::div_t div = std::div(_vec[i].first, bs);
        const int node = div.quot;
        const int component = div.rem;

         // Case 1: dof is not owned by this process
         auto it = std::find(dofmap.local_to_global_unowned().begin(),

Comments (3)

  1. Log in to comment