On Sat, 2008-06-28 at 20:55 +0200, Johan Hake wrote: > Hello! > > I tried to compile an advection diffusion form using Streamline Upwind Petrow > Galerkin stabilazing method, similar to the one introduced in DOLFIN 0.6.4. > Using 3 dimensional and first degree Lagrange elements, FFC/g++ chokes when > the produced code is compiling. It wont finish compile... Is this a known > problem and a limitation of FFC/g++? > > In PyCC I use DOLFIN to assemble the same system matrix, but instead of using > one form for the whole system I split the form into at least 4 different > forms. These compiles smoothly and after I have assembled the matrices I just > add them together. > > This approach is not possible using the present DOLFIN linear algebra > interface, as sum of matrices is not supported. Is this something we want for > the future? > > Johan
If the matrices come from the same dof_map one "should" be able to add to matrices together (and if not I guess you would not add them toghether). The problem is that the matrices themselves do not know what their created from. However, one could write a function matrix_add(mesh, dof_map, A, B, C); That does the trick in terms of the tabulate_dofs funcition in dof_map and the get, add functions in GenericMatrix. Kent _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
