Thanks for the clarification.
> On Jul 9, 2017, at 7:05 AM, Mark Adams wrote:
>
>
>
> What are the differences between gamg and mg with -pc_mg_galerkin option
> (apart from the default smoother/coarse grid solver options, which I
> identified by comparing the ksp_view
You might consider using
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPreallocateInitialize.html
and
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPreallocateSetLocal.html#MatPreallocateSetLocal
and friends
These take out some of the busywork
Look at the function that begins at line 1050 as the link should redirect to
Il 10 Lug 2017 11:18 AM, "Florian Lindner" ha scritto:
Hey Stefano,
Am 10.07.2017 um 16:36 schrieb Stefano Zampini:
> Florian,
>
> Perhaps you might want to take a look at how this is done for
Hey Stefano,
Am 10.07.2017 um 16:36 schrieb Stefano Zampini:
> Florian,
>
> Perhaps you might want to take a look at how this is done for MatIS
>
> https://bitbucket.org/petsc/petsc/src/f9d5775f43f69cbce5a7014a6ce3b24cc0e1214a/src/mat/impls/is/matis.c?at=master=file-view-default#matis.c-1050
Florian,
Perhaps you might want to take a look at how this is done for MatIS
https://bitbucket.org/petsc/petsc/src/f9d5775f43f69cbce5a7014a6ce3b24cc0e1214a/src/mat/impls/is/matis.c?at=master=file-view-default#matis.c-1050
Stefano
Il 10 Lug 2017 10:23 AM, "Florian Lindner"
Hey,
one more question about preallocation:
I can determine if a column index is diagonal or off-diagonal using that code
if (col >= col_range_start and col < col_range_end)
d_nnz[relative_row]++;
else
o_nnz[relative_row]++;
My code, however uses index sets from which a