[petsc-users] BDDC assembly question

Barry Smith bsmith at mcs.anl.gov
Sun Jun 4 18:48:38 CDT 2017


> On Jun 4, 2017, at 5:51 PM, Hoang Giang Bui <hgbk2008 at gmail.com> wrote:
> 
> Hello
> 
> I obtained two different matrices when assembling with MATIS and MATMPIAIJ. With MATIS I used MatISSetPreallocation to allocate and MatSetLocalToGlobalMapping to provide the mapping. However I still used MatSetValues and MatAssemblyBegin/End with MATIS. Is it the correct way to do so? In case that BDDC required assembling the matrix using local index, is there a way to assemble using global index to keep the same assembly interface as MATMPIAIJ?

   You can use MatSetValuesLocal() in both cases; this the efficient way.

  Barry

> 
> Thanks
> Giang



More information about the petsc-users mailing list