Local mesh refinement combined with the mesh smoothing is broken

Bug #941233 reported by Murtazo Nazarov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
New
Undecided
Unassigned

Bug Description

Local mesh refinement using "regular_cut" combined with mesh.smooth() gives the following error:

 *** -------------------------------------------------------------------------
*** Error: Unable to find edge for bisection.
*** Reason: Internal error in algorithm; bisection edge not found.
*** Where: This error was encountered inside RegularCutRefinement.cpp.
*** -------------------------------------------------------------------------

However, "recursive_bisection" works without any problem.

Here is the code to test:

#include <dolfin.h>

using namespace dolfin;

int main()
{
  // Create mesh of unit square
  UnitSquare unit_square(10, 10);
  Mesh mesh(unit_square);

  parameters["refinement_algorithm"] = "regular_cut";

  // Refine mesh close to x = (0.5, 0.5)
  Point p(0.5, 0.5);
  for (unsigned int i = 0; i < 2; i++)
  {
    // Mark cells for refinement
    MeshFunction<bool> cell_markers(mesh, mesh.topology().dim(), false);
    for (CellIterator c(mesh); !c.end(); ++c)
      {
        if (c->midpoint().distance(p) < 0.1)
          cell_markers[*c] = true;
      }

    mesh = refine(mesh, cell_markers);
    mesh.smooth(); // everything works if this line is disabled.
  }

  return 0;
}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.