Hello,
I created a new thread, thought would it be more appropriate (and is a
continuation of my previous post). I want to construct the below K matrix
(which is composed of submatrices)
K = [A P^T
P 0]
Where K is of type MatMPIAIJ. I first constructed the top left [A] using
MatSetValues().
Now, I would like to construct the bottom left [p] and top right [p^T] using
MatSetValuesLocal().
To use MatSetValuesLocal(), I first have to create a local-to-global mapping
using ISLocalToGlobalMappingCreate. I have created two mapping row_mapping and
column_mapping.
Q1) At what point should I declare MatSetLocalToGlobalMapping – is it just
before I use MatSetValuesLocal()?
I will use MatSetLocalToGlobalMapping(K, row_mapping, column_mapping) to build
the bottom left [P].
Q2) Can now I reset the mapping as MatSetLocalToGlobalMapping(K,
column_mapping, row_mapping) to build the top right [P^T]?
Many thanks!
Kind regards,
Karthik.