Thanks for this, Martin. The .plot() and ._plot() methods of many of the Viewers can give an idea on how a particular CellVariable should be transformed into physical space.
> On Sep 29, 2019, at 11:01 AM, Martinus WERTS <[email protected]> > wrote: > > Dear Justin, > > Independently of the mesh, the cells in FiPy are stored in a 1D array (a > vector). > > The coordinates of each cell are also available as 1D arrays. E.g., for > a "UniformGrid3D" mesh, one can obtain these as > > X, Y, Z = mesh.cellCenters > > In the case of structured meshes, it is possible (but perhaps not > desirable) to create a 'reshaped' view on these 1D vectors. For 3D (but > should be adaptable for 2D): > > X.reshape(Nz, Ny, Nx) > Y.reshape(Nz, Ny, Nx) > Z.reshape(Nz, Ny, Nx) > CellVariable.value.reshape(Nz, Ny, Nx) > > Nz, Ny, and Nx are the number of cells in the z, y, and x direction > respectively. > > Best wishes, > Martin > > > > On 27/09/2019 20:03, Guyer, Jonathan E. Dr. (Fed) via fipy wrote: >>> On Sep 26, 2019, at 7:29 PM, Justin Pothoof <[email protected]> wrote: >>> >>> I noticed that if i print(shape(CellVariable.value)) after defining a >>> CellVariable I get the output (2000,) for example.. which isn't a 2D array. >> FiPy is designed for unstructured meshes, so there is no internal structure >> to the Variable data. Geometry and topology is defined by the Mesh. >> _______________________________________________ >> fipy mailing list >> [email protected] >> http://www.ctcms.nist.gov/fipy >> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
