On Nov 7, 2008, at 11:21 AM, Angus Hendrick wrote:

The pyamg test code also does not build a very complicated matrix, using a pyamg "poisson" function that takes only a domain size as an argument to deliver the sparse matrix.

I think what Daniel is suggesting is that it's not surprising that there's not much difference in speed since neither is spending very much time building the matrix and both are solving the matrix with the same (or similar) fast code. We're still working on improving FiPy's speed at building matrices, but we're glad you're happy with the results you're getting so far.

> I can extract all the problem
> related arrays without much difficulty, but the boundary conditions are more > vexing since in the forms I can readily access, the locations where each > boundary condition is applied live as unresolved union and intersection of > boolean arrays buried inside the FixedValue or FixedFlux instances. Is
> there an approved method for extracting and resolving this location
> information?  If not, is there an easy hack I can use?

This is not particularly "approved", but not particularly "disapproved", either:

As you've found, bc.faces contains a binOp Variable representing whatever conditions defined the boundary, so, e.g.,

   >>> bc = FixedValue(faces=mesh.getFacesLeft() & (Y > 2.), value=1.)
   >>> bc.faces

will dump a mess like

(FaceVariable(value=array([False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, True, False, False, False, True, False, False, False], dtype=bool), mesh=UniformGrid2D(dx=1.0, dy=1.0, nx=3, ny=3)) & [False False False False False False False False False True True True False False False False False False False False True True True True])

but

   >>> bc.faces.getValue()

will return a mask array.

That's hopefully what you needed?


Reply via email to