Hello all,
does anybody have an idea how to perform integration of fipy
CellVariables over one of the "variables" representing cell centers of
2D mesh?
For example:
dx=0.1
dy=0.2
nx=10
ny=10
mesh_xy=Grid2D(dx = dx, dy = dy, nx = nx, ny = ny)
xc,yc=mesh_xy.getCellCenters()
def F(x,y):
return x+y
N=CellVariable(mesh=mesh_xy, value=F(xc,yc))
F(x,y) is for illustrative purposes only. In general N will be a
solution of conv-diff. problem at given time.
I'd like to know int_A^B N*yc*dy, A and B are some limits. I would
also like the result be of ndarray type (i.e., representing the
integrated value at each xc).
With best regards,
Igor.