[petsc-users] Loading only upper + MatSetOption(A,MAT_SYMMETRIC,PETSC_TRUE);

Klaus Burkart k_burkart at yahoo.com
Mon Mar 4 07:03:13 CST 2019


Hello,

I want to solve many symmetric linear systems one after another in parallel using boomerAMG + KSPCG  and need to make the matrix transfer more efficient. Matrices are symmetric in structure and values. boomerAMG + KSPCG work fine.

So far I have been loading the entire matrices but I read in a paper, that it's sufficient to load the upper part only and tell petsc that the matrix is symmetric using MatSetOption(A,MAT_SYMMETRIC,PETSC_TRUE); Unfortunately all computations fail if I load only the upper values and use MatSetOption(A,MAT_SYMMETRIC,PETSC_TRUE);
The idea is:
    if (matrix_.symmetric())
    {
        MatSetOption(A,MAT_SYMMETRIC,PETSC_TRUE);
       //load only upper part of the matrix MatSetValues(...)

   }else //asymmetric matrix
           {               //load the entire matrix MatSetValues(...)
           }

Is it possible at all? 

Klaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190304/30f52cb5/attachment.html>


More information about the petsc-users mailing list