Hi Jon, Thank you for the wonderful links. I've noticed that all of them use a circular mesh built on Gmsh. Unfortunately, I've been having serious trouble getting the latter package speak to python on my 64-bit OS X. But, for my need to generate a bivariate normal, would regular Grid2D not be enough?
Thanks! Yun On Thu, Apr 26, 2012 at 6:25 AM, Jonathan Guyer <[email protected]> wrote: > > On Apr 25, 2012, at 4:22 PM, Yun Tao wrote: > > > I'm trying to generate the diffusion pattern of a bivariate_normal. > However, so far a main obstacle is to form the distribution on top of a 2D > mesh. The bivariate_normal function from matplotlib.mlab takes axial > arguments that are spit out by numpy.meshgrid. But it's clear that the > underlying mesh construction of meshgrid is different from Grid2D from fipy: > > There are several examples that show how to obtain the coordinates of the > cell centers, e.g., > > > http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.anisotropy.html?highlight=getcellcenters > > http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.circle.html?highlight=getcellcenters > > http://www.ctcms.nist.gov/fipy/examples/levelSet/generated/examples.levelSet.advection.circle.html?highlight=getcellcenters > > http://www.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.anisotropy.html?highlight=getcellcenters > > The only difference I can see is that np.meshgrid() returns a shaped > result, where as FiPy's .getCellCenters() just returns lists of numbers. > That's just fine; matplotlib.mlab.bivariate_normal() will return z in the > same shape as X and Y and FiPy wants its values unshaped. > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > -- Graduate Group of Ecology Doctoral Candidate Department of Environmental Science and Policy Center for Population Biology University of California, Davis
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
