<div dir="ltr">Hello, I have some doubts.<br><br>I'm trying to create a submatrix (MatCreateSubMatrix). I have an identity matrix A. Then, in each process, I select some indices (owned in this process but in global numbering) that i need to remove (only columns) from the matrix A. These indices are storage in an PetscInt array (arr_cols), created with PetscMalloc1 (size: n_cols). My goal is to use the index set tool (IS). For this purpose, i did the next:<br><br>1. I defined the sub-matrix (submat, specifying the size)<br>2. I created the IS for the rows, in this case taking into account the MatGetOwnershipRange(A,&row_low,&row_high);<br>ISCreateGeneral(COMMUNICATOR,n_rows,arr_rows,PETSC_COPY_VALUES,&is_rows);. This consider all the rows owned by the process.<br>2. I created the IS for columns: ISCreateGeneral(COMMUNICATOR,n_cols,arr_col,PETSC_COPY_VALUES,&is_col);<br>The range for the is_col, was defined taking into account the the columns that will be in IT's "diagonal part", using MatGetOwnershipRangeColumn(A,&col_low,&col_high);<br>3. I create the submatrix: MatCreateSubMatrix(A,is_row,is_col,MAT_INITIAL_MATRIX,&submat); <br><br>Questions:<br><br>a. Which communicator i need to use, MPI_COMM_SELF or PETSC_COMM_WORLD? and why?<br>b. Moreover, my approach to create the submatrix is ok? <br>c. In the example:<br><a href="https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex49.c.html">https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex49.c.html</a><br>there is a line <br>1239:   ISSetBlockSize(is,2);<br><div>what is the meaning of this line?</div><div><br></div><div>Best regards.<br></div></div>