On Thu, Mar 29, 2018 at 3:28 PM, Manav Bhatia <bhatiama...@gmail.com> wrote:
> Hi, > > I have quick questions about MatCreateSubMatrix: > > — Once the sub matrix is created, do I need to keep the IS (isrow and > iscol) in memory till this matrix is active, or can I destroy it > immediately after the creation of the matrix and continue to use the matrix? > You can destroy it. > — Is the assembly begin/end supposed to be called on the submatrix or the > original full matrix? Is it a problem is I call this on both? > The SubMatrix is not a view. Its a fully independent matrix. > — If I modify values in the sub matrix, would these be reflected in the > original matrix after assembly begin/end, or do I need to do something else > for that to happen? > No. Do you want something like this http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html Thanks, Matt > Thanks, > Manav > > > -- 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 https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>