polycellint.m¶
Basic Information¶
USAGE: [Acell, RAcell, ARcell] = polycellint(rg,zg,rp,zp)
PURPOSE: Calculate how much area of each cell in grid rg, zg
is inside the polygon rp, zp
INPUTS: rg, zg, coordinates for centers of rectangles
rp, zp, coordinates defining a polygon
OUTPUTS: Acell, area of cells that are inside the polygon
RAcell, surface integral of R over inside area
ARcell, surface integral of 1/R over inside area
All output sizes are [length(zg),length(rg)]