[petsc-users] matrix-matrix addition
Hong Zhang
hzhang at mcs.anl.gov
Mon Sep 27 09:47:34 CDT 2010
Boyce,
> The easiest way I can think of to handle this is to make P^T C P, then
> extract the nonzero
> structure with Mat with GetIJ() and create B. You would have to explicitly
> put zeros in B
> too or else AssemblyEnd() will shrink it. Maybe someone else can think of an
> easier way.
This is what I would suggest as well.
>> A tangentially related question is: is there any way to find out the
>> actual fill (or fill ratio) following a call to MatPtAP?
You may run your code with option '-info' and grep MatPtAP to get
actual fill, e.g.,
src/mat/examples/tests>./ex93 -info |grep MatPtAP
[0] MatPtAPSymbolic_SeqAIJ_SeqAIJ(): Reallocs 0; Fill ratio: given 4 needed 1.6.
[0] MatPtAPSymbolic_SeqAIJ_SeqAIJ(): Use MatPtAP(A,P,MatReuse,1.6,&C)
for best performance.
Hong
>>
>> Thanks in advance for any suggestions!
>>
>> -- Boyce
>
>
>
> --
> What most experimenters take for granted before they begin their experiments
> is infinitely more interesting than any results to which their experiments
> lead.
> -- Norbert Wiener
>
More information about the petsc-users
mailing list