This Message Is From an External Sender
This message came from outside your organization.
On Fri, 01 Mar 2024 12:51:45 -0600, Junchao Zhang wrote: >> The preferred method then is to use MatSetValues() for the copies (or >> possibly MatSetValuesRow() or MatSetValuesBlocked())? > MatSetValuesRow()
Thanks >> The term "Preallocation" is confusing to me. For example, >> MatCreateMPIBAIJWithArrays clearly states in the doc that arrays are copied >> (https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatCreateMPIBAIJWithArrays/__;!!G_uCfscf7eWS!cls7psuvaRuDYuXpUpmU7lcEhX9AO0bb3qTpszwuTNP8LPPrJkCzoaHIdJCzxPR36D7SLYs9MKCxqMBKRnSQc8s$), I >> would then assume PETSc maintains internal storage for it. If something is >> preallocated, I would not make that assumption. >"Preallocation" in petsc means "tell petsc sizes of rows in a matrix", so that >petsc can preallocate the memory before you do MatSetValues(). This is clearer >in https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatMPIAIJSetPreallocation/__;!!G_uCfscf7eWS!cls7psuvaRuDYuXpUpmU7lcEhX9AO0bb3qTpszwuTNP8LPPrJkCzoaHIdJCzxPR36D7SLYs9MKCxqMBKrYGemdo$ Thanks for the clarification! All best, -- fabs