integrating Poisson Equation solution over its domain

Asked by Payman Tohidifar on 2013-02-13

Dear all,
I was wondering if I can compute integral of the solution for Poisson equation over an arbitrary domain. Dolfin is able to compute derivatives at each point by defining a vector function space but I don't know how to compute integral of solution function over the domain. I would be thankful if you help me out.

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Marie Rognes
Solved:
2013-02-13
Last query:
2013-02-13
Last reply:
2013-02-13
Christian Waluga (chris-1) said : #1

Try assemble(uh*dx), where uh is your solution. Is that what you want?

Best Marie Rognes (meg-simula) said : #2

If u is your solution, try

M = assemble(u*dx)

M is then the value of the integral of the solution over the mesh.

Payman Tohidifar (payman-che) said : #3

Thank you very much guys. It worked pretty well.

Payman Tohidifar (payman-che) said : #4

Thanks Marie Rognes, that solved my question.