From: Benjamin K. <ben...@na...> - 2008-03-19 13:47:48
|
> Hi, Libmesh Users > I find the stiffness matrix assembling is very slow at the first time. But > it is very quickly at the second time and laters for the same system. > It needs 2 hours to assemble the stiffness matrix of the 3d stokes system > with 15,000 dofs. How to speed up the process of assembling the system > stiffness matrix at the first time? > I find the similar question in the maillist. The title is "assembling a > PetscMatrix". > Can you verify that ex11 runs quickly? It is important that the PETSc sparse matrices be efficiently preallocated, otherwise matrix insertion can cause a cascade of dynamic memory operations. In this case all subsequent assemblies will be fast because the memory is already allocated. You can verify that this is working by running the code with -info (at least for PETSc 2.3.3) You should see something like: [0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0 -Ben |