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

Adaptive mesh refinement on eigenvalue problem

+1 vote

Hello,
I would like to use adaptive mesh refinement for a few eigenvalues around zero. I use SLEPc solver in Fenics for elastodynamics problem. Please, is it possible to use Fenics functionality?

Petr

asked Jan 14, 2016 by petrH FEniCS Novice (580 points)

1 Answer

+1 vote

I tried the same but for maxwell. I could not do it with the tools directly given by fenics. You will have to iterate through all the cells and evaluate some error-function that you defined.

cell_markers = CellFunction("bool", mesh)
cell_markers.set_all(False)
for cell in cells(mesh):
    if error_function==True:
        cell_markers[cell] = True
mesh = refine(mesh, cell_markers)  

I know that this is not really an answer, but i hope it helps for you. The error function depends to much on your exact application to give an answer.

answered Feb 1, 2016 by jh600 FEniCS Novice (900 points)
...