On Jun 7, 2012, at 1:23 PM, Jonathan Guyer wrote: > On Jun 6, 2012, at 7:57 PM, Yun Tao wrote:
>> 4. Regarding my effort to generate a fixed point advection, I have consulted >> this old exchange on the listserve: >> http://comments.gmane.org/gmane.comp.python.fipy/1412. The command given by >> Jonathan worked like a charm (see it in action in s-cd1dx.mp4). However, >> three years after the post, it appears that simple getCellCenters() and >> getFaceCenters() still don't return the proper mesh variables but only >> arrays of the same shape. Is the interim solution at the end of that link a >> permanent one then due to numerical complication? > > getFaceCenters() apparently never got updated, but getCellCenters() has > returned a CellVariable for about two years. What version of FiPy are you > running? > > I filed ticket:445 on getFaceCenters() and if there aren't any unintended > consequences, it should return a FaceVariable in the next release. I see the confusion. `m.getCellCenters()` returns a rank-1 CellVariable and `m.getCellCenters()[0]` returns a rank-0 CellVariable, but `x, y = m.getCellCenters()` gives you a pair of NumPy arrays in x and y. I've filed http://matforge.org/fipy/ticket/447 to try to figure out what to do about this. _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
