Local mesh refinement combined with the mesh smoothing is broken
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 RegularCutRefin
*** -------
However, "recursive_
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[
// 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
MeshFunctio
for (CellIterator c(mesh); !c.end(); ++c)
{
if (c->midpoint(
}
mesh = refine(mesh, cell_markers);
mesh.smooth(); // everything works if this line is disabled.
}
return 0;
}