This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

adapt based on mesh function

+1 vote

Hi all,

I have the following problem when I tried to refine mesh. Here is the code:

mesh1=UnitSquareMesh(2,2)
f=CellFunction("bool",mesh)
f.set_all(False)
f.array()[0]=True
mesh2=refine(mesh,f)

I expected the mesh2 is the one obtained after the only standard refine the first cell in mesh1, which means the first cell is split up into 4 cells, and other does not change. However, it is not. why is this and is there any way to get the mesh just refining the first one?(I guess adapt would be one choose, but it does not work now for me.) Any help would be appreciated. Thanks very much.

asked Aug 18, 2013 by jying FEniCS User (2,020 points)
edited Aug 20, 2013 by jying

1 Answer

+1 vote
 
Best answer

Dolfin does not support hanging nodes
Refining a mesh in just one cell is therefore not possible.

answered Aug 19, 2013 by chris_richardson FEniCS Expert (31,740 points)
selected Aug 21, 2013 by Jan Blechta
...