[petsc-users] a naive question about assembly

huaibao zhang paulhuaizhang at gmail.com
Mon May 5 20:14:44 CDT 2014


	
Hello,

I looked up the manual, but still felt  quite confused about why have to do assembly. Does it have to do with parallelization? Since all of the processors are loading the data at the same time, they need to a pause before one can use the whole vector? 

See a piece of code: 

                        for (int c=0;c<grid[gid].cellCount;++c) {
                                row=grid[gid].myOffset+c;
                                value=p;
                                VecSetValues(soln_n,1,&row,&value,INSERT_VALUES);
                        }
                        VecAssemblyBegin(soln_n); VecAssemblyEnd(soln_n);


Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140505/ef107b5b/attachment.html>


More information about the petsc-users mailing list