Anders Logg skrev den 11/12-2007 følgende: > On Tue, Dec 11, 2007 at 02:58:58PM +0000, Garth N. Wells wrote: > > > > > > Ola Skavhaug wrote: > > > Hi, > > > > > > I'm trying to assemble dolfin/FFC forms into a user given matrix format > > > CRSNew, which inherits GenericTensor as it should. However, the > > > assemble.py in > > > src/python in dolfin does not allow this. > > > > > > > assembly.py has rather limited functionality compared to > > dolfin::assemble. Does assembly into CRSNew using c++ work?. > > Yes, assemble() in PyDOLFIN currently assumes that you give it an FFC > form and a Mesh. It then calls the JIT compiler on the form and then > calls the wrapped C++ assembler on the generated UFC code. > > Does it work if you use cpp_assemble() instead of assemble()? > > We should try and extend assemble() in Python so it can recognize > various combinations of input arguments (an FFC form or a UFC etc). > > The assemble() function is just a few lines of code and it's defined > in assemble.py in src/pydolfin/.
I have made assembler more general now. There are still some difficulties regarding the type information across the user defined linear algebra backend (CRS in PyCC) and dolfin, but I don't think this will be too hard to fix. A central question is what to send to assemble from Python. I vote for sending a factory, since the rank of the assembled tensor is defined by the form (and hence should not be given as input by the user). Ola > -- > Anders > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
