Yes you are right. Now how can I get the constant value on each cell? Because I need to have an array in order to sort and mark some of them to refine. I'm quite new to python and firedrake. So sorry if my questions are too simple. Many thanks for answering. ----- Original Message ----- From: Lawrence Mitchell ( [lawrence.mitchell@imperial.ac.uk] (mailto:lawrence.mitchell@imperial.ac.uk) ) Date: 11/05/97 07:20 To: [firedrake@imperial.ac.uk] (mailto:firedrake@imperial.ac.uk) Subject: Re: [firedrake] .array() > On 1 Aug 2018, at 18:41, Amireh Mousavi < [amireh.mousavi@math.iut.ac.ir] (mailto:amireh.mousavi@math.iut.ac.ir) > wrote: > > sigma, u = w.split() > Re = assemble((div(sigma)+f)*(div(sigma)+f)*dx).array() Here you assemble a functional. So it is just a number. If you want the cellwise value of this expression write: P0 = FunctionSpace(mesh, "DG", 0) Re = project(expr, P0) Where expr is the integrals of your expression above. Thanks, Lawrence _______________________________________________ firedrake mailing list [firedrake@imperial.ac.uk] (mailto:firedrake@imperial.ac.uk) [https://mailman.ic.ac.uk/mailman/listinfo/firedrake] (https://mailman.ic.ac.uk/mailman/listinfo/firedrake)