On Feb 6, 2013, at 10:47 AM, Laurence wrote:

> I've set up a 3D Gmsh such that there is a convenient surface
> at Y==0.  
> 
> Therefore, in this 3D mesh there are many faces on this
> plane.  
> 
> At every step in my transient equation, I want to take the values
> on the faces on this plane, and view them in a 2D viewer.
> 
> Basically, the purpose of this all is to create a movie of a centered
> 2D splice of my 3D mesh.
> 
> I've got a boolean array of all the faces which have faceCenter_Y==0.
> However, I'm having difficulty imposing the values, applicable to the
> True values in the array, in the 3D mesh on a 2D mesh.

FiPy doesn't have any facilities to do that directly. About the closest you can 
get, I think, is:

>>> x2D, y2D = mesh2D.cellCenters
>>> var2D.value = var3D((x2D, [0] * mesh2D.numberOfCells, y2D), order=1)

which will interpolate the values from the 3D mesh onto the 2D mesh. There 
really isn't any way to take randomly located values from one mesh and assign 
them to random locations in another.


Instead, I would be inclined to take a slice with a visualization tool. See 

  
http://www.ctcms.nist.gov/fipy/examples/cahnHilliard/generated/examples.cahnHilliard.sphere.html

The image on the webpage is old. If you run it now, you should see a sphere 
with a section cut out of it using Mayavi. It's also possible to export via Vtk 
to ParaView or VisIt.







_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to