Hi,

i try to get the solution of a AdaptiveNonlinearVariationalSolver as arrays of the refined mesh coordinates and the solution.

This is my code:

from dolfin import *

mesh = IntervalMesh(100, 0, 10)

V = FunctionSpace(mesh, “CG”, 1)def boundary(x, on_boundary):

return on_boundary and near(x[0], 0)uL = Constant(1)

bcL = DirichletBC(V, uL, boundary)u = TrialFunction(V)

v = TestFunction(V)a = -inner(grad(u), grad(v)) * dx

L = 1./20. * (exp(10 * u)-exp(-20 * u)) * v * dxu_ = Function(V)

M = u_*dx()

tol = 1.e-5

F = a-L

F = action(F, u_)

J = derivative(F, u_, u)problem = NonlinearVariationalProblem(F, u_, bcL, J)

solver = AdaptiveNonlinearVariationalSolver(problem, M)

solver.solve(tol)

solution_array = u_.leaf_node().compute_vertex_values()

Analogously to the last line, I tried to get the refined mesh coordinates using

mesh.leaf_node()

And I got the error message

AttributeError: ‘dolfin.cpp.generation.IntervalMesh’ object has no attribute ‘leaf_node’

How do I get the refined mesh then? Online I only found the way using leaf_node, which doesn’t seem to work for my problem…

Thanks for helping me out!