> > > > I did a quick comparison using a > > simple Poisson problem between fipy with Aztec00 and a stock Poisson > matrix > > builder solved with pyamg. The fipy code was only about 5% slower, and > > given all the flexibility in fipy versus roll-your-own solutions, that's > > really impressive. > > The Poisson problem will not necessarily capture the inefficiencies in > fipy. The numerical operations required to evaluate the arrays that > are used to populate the matrix are generally thought to be "slow" in > fipy and the Poisson problem has very few of these evaluations so I > wouldn't hold it up as an example of fipy's efficiency. If you add > some extra terms with complicated coefficients to the equations that > that will provide a better test.
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 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? > > Can you clarify, Do you want to know the faces that a boundary > condition is associated with and the locations of those faces given > only the boundary condition object itself? I believe your statement of the problem is correct. I'd like to take some collection of FixedValue or a FixedFlux objects that were used to build a set of boundary conditions and determine what faces they are associated with (getting the values themselves is straightforward). What I imagine eventually saving is six arrays. All will be the same length as the array of x-face coordinates. 1. The x-coordinates of all the faces (saved anyway). 2. The y-coordinates of all the faces (saved anyway). 3. An array that is a mask of booleans showing where Dirichlet boundary conditions are applied. 4. An array of the values of Dirichlet boundary conditions. 5. An array that is a mask of booleans showing where Neuman boundary conditions are applied. 6. An array of the values of Neuman boundary conditions. There's probably a better way to do this, but I want something complete enough that anyone can pick up and solve the same problem using whatever tools they like to check my answers. Best, Angus
