[petsc-users] Handling dense matrices in RBF interpolation

Hong hzhang at mcs.anl.gov
Fri Oct 24 09:42:59 CDT 2014


Florian:
>
>
> However, trying to preallocate C, which is of type MATSBAIJ fails for me:
>
>   ierr = MatSeqSBAIJSetPreallocation(_matrixC.matrix, n, n, NULL);
>

                ^
The 2nd input parameter is block size:
MatSeqSBAIJSetPreallocation(Mat B,PetscInt bs,PetscInt nz,const PetscInt
nnz[])
You input block size bs=n, which I guess should be 1.

Hong

>
> results in:
>
>   [0]PETSC ERROR: Arguments are incompatible
>   [0]PETSC ERROR: Cannot change block size 1 to 503
>
> What would you advise me to do here? How can I make the KSPSolve faster
> when it is a dense matrix?
>
> I could guess the preallocation. Create a list of possible basis functions
> and if they produce sparse or dense matrices. Preallocate full or select
> MATDENSE type for dense matrices.
>
> Any ideas?
>
> Thanks a lot,
> Florian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141024/39e75ff5/attachment.html>


More information about the petsc-users mailing list