[petsc-users] Can I use MAT_FINAL_ASSEMBLY instead of MAT_FLUSH_ASSEMBLY?

Barry Smith bsmith at mcs.anl.gov
Mon Nov 8 19:57:16 CST 2010

On Nov 8, 2010, at 7:49 PM, Rongliang Chen wrote:

> Hi everyone,
> Can I use MAT_FINAL_ASSEMBLY instead of MAT_FLUSH_ASSEMBLY in the function MatAssemblyBegin/End when switching between ADD_VALUES and INSERT_VALUES in MatSetValues()?  Thank you!
> Regards,
> Rongliang

Yes, but generally there is no reason to. It is best to use the flush until your final assembly because then it doesn't do any work that needs to be redone or prematurely free memory that may be needed later.

Why do you want to do that?


More information about the petsc-users mailing list