> 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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to