> On Oct 24, 2024, at 9:02 PM, Matthew Knepley <knep...@gmail.com> wrote: > > On Thu, Oct 24, 2024 at 8:49 PM Diego Magela Lemos via petsc-users > <petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>> wrote: >> Is there something similar to SciPy sparse block_array >> (https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.block_array.html*scipy.sparse.block_array__;Iw!!G_uCfscf7eWS!fxhgjj4X8vHGK28Zh3l6x6nmnLOI-7wwIouvNhI9v3RCPvUzL_4KWGY0ZgCaMugPhFAn7AyDI7t7nCHZJ4waON0$ >> >> <https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.block_array.html*scipy.sparse.block_array__;Iw!!G_uCfscf7eWS!YANe4IC4s7Ki7CYmRbt0miQwrrFq7e-6_btfizr9d4vir0dzWIncCQBkH3Cbr94Y_jxGNSAhJh59aSOHAHRESglgg7A$>) >> or bmat >> (https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.bmat.html__;!!G_uCfscf7eWS!fxhgjj4X8vHGK28Zh3l6x6nmnLOI-7wwIouvNhI9v3RCPvUzL_4KWGY0ZgCaMugPhFAn7AyDI7t7nCHZcQ6q2Uk$ >> >> <https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.bmat.html__;!!G_uCfscf7eWS!YANe4IC4s7Ki7CYmRbt0miQwrrFq7e-6_btfizr9d4vir0dzWIncCQBkH3Cbr94Y_jxGNSAhJh59aSOHAHREvOCba0s$>) >> in PETSc? > > Yes, MATNEST, but it does not convert the result to CSR.
PetscCall(MatConvert(nest, MATAIJ, MAT_INITIAL_MATRIX, &aij)); will do a conversion if needed. > > Matt > -- > 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fxhgjj4X8vHGK28Zh3l6x6nmnLOI-7wwIouvNhI9v3RCPvUzL_4KWGY0ZgCaMugPhFAn7AyDI7t7nCHZzB0hsUo$ > > <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!dZFqpGVfNQMRHO5CeKFJ1fh9RlQt32Q_DyPYhfwuFy6Xv40dl94COZfQKFh7xywfE8Z0FeFIBUrNHnl7ZGWP$>