Refine given mesh and return the refined mesh.
Examples of usage
mesh = refine(mesh)To only refine cells with too large error, define a boolean MeshFunction over the mesh and mark the cells to be refined as True.
cell_markers = CellFunction("bool", mesh) cell_markers.set_all(False) for cell in cells(mesh): # set cell_markers[cell] = True if the cell's error # indicator is greater than some criterion. mesh = refine(mesh, cell_markers)