[petsc-users] Matrix Sparsity

domenico.borzacchiello at univ-st-etienne.fr domenico.borzacchiello at univ-st-etienne.fr
Wed Apr 13 05:02:31 CDT 2011


> On Wed, Apr 13, 2011 at 11:08,
> <domenico.borzacchiello at univ-st-etienne.fr>wrote:
>
>> [0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 500
>>
>
> What discretization are you using?
>
>

I'm still testing the code over small grids so I'm using a 9x9x9 grid (1
lev) at present time.

>>
>> How can I make sure that the correct sparsity patter is formed while
>> still
>> using the DMMG interface? The same thing happens either if I use the FD
>> approximation of the jacobian or a specific FormJacobianFunction
>> routine.
>>
>
> Did you the stencil width and shape (box or star) correctly?
>

I checked it and noticed that I was using an unnecessary stencil width of
2 (Box) and having 4 DOFs gave me a 4x5^3 = 500 non zero entries per row.
But even if I set it to 1 and Star it'll result in 4x7 = 28 nnz while I
need 17 at most. This means my matrices will always be double the needed
size (roughly). How can I control this?





More information about the petsc-users mailing list