Hello Jed/Barry/Petsc friends I am trying to assemble a block matrix with 3x3 in 2D and 4x4 blocks in 3D coming from the fully coupled NS equation.
I am not sure I am understanding the example provided here: https://petsc.org/main/docs/manualpages/Mat/MatSetValuesBlocked/ The description says that " *v -* a logically two-dimensional array of values", while in the example is passed as a 1D array. Should I pass a 2D array like v(1:nComp,1:nComp) or an array v(1:nComp*nComp) to MatSetValuesBlocked (I am using fortran that's why I start form 1 in my arrays) ? Are *idxm *and *idxn *the global index of each block right? I guess PETSc will correctly assign each block row and column as it knows the matrix has a given structure. Thank you as always!
