On Tuesday 17 June 2008, you wrote: > Nuno David Lopes wrote: > > I hope it works. > > > > On Tuesday 17 June 2008, Nuno David Lopes wrote: > >> For time-dependent problems were we don't change the system > >> Matrix, it makes sense to apply Boundary conditions only to > >> right-hand vector b? > >> I've simplified the function: > >> void apply(GenerecMatrix& A,GenericVector& b, const GenericVector* x, > >> const DofMap& dof_map, const ufc::form& form); > >> and added > >> void apply(GenericVector& b, const GenericVector* x, > >> const DofMap& dof_map, const ufc::form& form); > >> so inside a loop we don't need to touch in the system matrix again. > > As far as I know, setting dirichlet conditions only changes the matrix > the first time. The row that corresponds to the boundary dof is zeroed > out and a one is put on the diagonal. Does it really do this again the > second time around? Is there actually any computational cost associated > with it? Probably right...now i get no time differences in my tests i was thinking that when // Modify linear system (A_ii = 1) A.ident(boundary_values.size(), dofs); and A.apply() are called that the matrix was changed again... (And I really don't understand why don't, but i'm at a superficial level of the code)
On the other hand saving results on the raw format, saves much time. in 50 iterations on my laptop with a 40121x40121 system i get: 110seconds wrinting 25 iterations of 14Mb vtu files and 96seconds wrinting the same 25 iterations with 592k files. > In my code I assemble the matrix once and factorize it (using UMFPACK). > In the time-loop I only need to assemble the right-hand side and solve > with the pre-computed factors (which takes no time at all). > > Anyway, I'm guessing that Anders will want to sort out the bug in the > dirichlet bcs before he takes in your patch. I'll have use for it when > that happens :) > > /Dag (PhD student, KTH (Sweden)) > > >> I'll create a bundle and send it, also with the RAWFile.h and > >> RAWFile.cpp, for Xd3d format. > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > DOLFIN-dev mailing list > > [email protected] > > http://www.fenics.org/mailman/listinfo/dolfin-dev -- Nuno David Lopes e-mail:[EMAIL PROTECTED] (FCUL/CMAF) [EMAIL PROTECTED] (ISEL) http://ptmat.ptmat.fc.ul.pt/%7Endl/ Tue Jun 17 13:38:41 WEST 2008 _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
