[petsc-users] Mat_AllocAIJ_CSR in petsc4py

D D driver.dan12 at yahoo.com
Wed Apr 26 12:35:45 CDT 2017


Thanks. 

    On Wednesday, April 26, 2017 1:28 PM, Matthew Knepley <knepley at gmail.com> wrote:
 

 On Wed, Apr 26, 2017 at 12:10 PM, D D <driver.dan12 at yahoo.com> wrote:

Why does MatAlloc_AIJ_CSR make two preallocation calls?

        CHKERR( MatSeqAIJSetPreallocationCSR( A, i, j, v) )
        CHKERR( MatMPIAIJSetPreallocationCSR( A, i, j, v) )

I am assuming memory if preallocated twice, once for sequential and another for MPI. So each matrix created with createAIJ will have a sequential and MPI structure.
Is this for convenience when switching from sequential to MPI?

Only one function will actually take affect, depending on the type of matrix A is. This is like Objective-C rather than C++.
  Thanks,
     Matt 
Thanks,Dale




-- 
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

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


More information about the petsc-users mailing list