Is there something similar to SciPy sparse block_array ( https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/genera... ) or bmat ( https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/genera... ) in PETSc?
Perhaps this is what you are looking for https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MATNEST... ?
On Oct 24, 2024, at 8:48 PM, Diego Magela Lemos via petsc-users <[email protected]> wrote:
Is there something similar to SciPy sparse block_array (https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/genera... <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/genera... <https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.bmat.html__;!!G_uCfscf7eWS!YANe4IC4s7Ki7CYmRbt0miQwrrFq7e-6_btfizr9d4vir0dzWIncCQBkH3Cbr94Y_jxGNSAhJh59aSOHAHREvOCba0s$>) in PETSc?
On Thu, Oct 24, 2024 at 8:49 PM Diego Magela Lemos via petsc-users < [email protected]> wrote:
Is there something similar to SciPy sparse block_array ( https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/genera... <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/genera... <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. 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_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
On Oct 24, 2024, at 9:02 PM, Matthew Knepley <[email protected]> wrote:
On Thu, Oct 24, 2024 at 8:49 PM Diego Magela Lemos via petsc-users <[email protected] <mailto:[email protected]>> wrote:
Is there something similar to SciPy sparse block_array (https://urldefense.us/v3/__https://docs.scipy.org/doc/scipy/reference/genera... <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/genera... <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_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!dZFqpGVfNQMRHO5CeKFJ1fh9RlQt32Q_DyPYhfwuFy6Xv40dl94COZfQKFh7xywfE8Z0FeFIBUrNHnl7ZGWP$>
participants (3)
-
Barry Smith -
Diego Magela Lemos -
Matthew Knepley