How to evaluate inner(grad(u), grad(u))
Asked by
Vladimir Dergachev
After extracting data from eigenvalue solver:
....
r, c, rx, cx = solution.
u = Function(V)
u.vector()[:] = rx
I would like to compute the norm of its gradient (to try an implement adaptive mesh refinement), so the code is something like
but now I don't know how to convert w to CellFunction(
Any suggestions ?
Thank you !
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Anders Logg
- Solved:
- Last query:
- Last reply:
To post a message you must log in.