On Jan 23, 2013, at 1:30 PM, Laurence wrote: > I've only started using Fipy and this is my first post.
Welcome. > > I would like to take a mesh I have imported from Gmsh, and create a subset > mesh of certain cells within certain X,Y limits. The mesh imports > fine, and I have my cells referenced through an A = X<? B = X>? C > = Y<?, D = Y>?, new_mesh = A & B & C & D. This does not make a new mesh; it makes a mask on the existing mesh > However, if I want to create a cell variable which uses this subset > of cells, how do I either define a new mesh variable which is of > these cells, or define it properly in the mesh = ? part of the > CellVariable definition. If you do var = CellVariable(mesh=mesh, value=1.) var.setValue(2., where=A & B & C & D) then var will be valued 2. in your area of interest and 1. everywhere else. There is no way to actually subset a mesh and FiPy wouldn't know what to do with it if you did; it expects to solve all equations on the same mesh. _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
