[petsc-users] Assembly of local Mat's to a parallel Mat
Jed Brown
jedbrown at mcs.anl.gov
Fri Apr 12 10:22:35 CDT 2013
Hui Zhang <mike.hui.zhang at hotmail.com> writes:
> Assembly it directly. I just found MatGetSubMatricesParallel.
This is not a private implementation function so it's not a good place
to learn. It also doesn't do what you want.
For your purpose, you can either loop over the entries of A_i inserting
them according to the R_i or you can create a block diagonal parallel
matrix A_i constructed by joining together all the diagonal blocks.
Presumably R is already parallel, so then you can use MatPtAP to
assemble the product.
Note that you might be able to assemble the block diagonal A directly.
> Maybe I can learn from the source codes of this function but I can not
> find where they are.
For navigating source code, see the manual section about setting up GNU
Global tags or etags. PETSc functions are named to tab complete well
with tags.
More information about the petsc-users
mailing list