Priyank Patel <[email protected]> writes: > Hello, > I am trying to divide the rows between the processes for > MatCreateMPIAIJWithArrays() but I am unable to create a fully functional code > for that. > Is there any easy way to do it or is there anybody who have any ready code > that I can use to divide the rows to use in MatCreateMPIAIJWithArrays().
You should really use MatSetValues. It is unconditionally better for memory usage and flexibility. MatCreateMPIAIJWithArrays exists for people that already made a mistake in their software by manually building these useless arrays (you can't compute with them directly), refuse to update their code, but insist on passing them to PETSc. If you don't already have exactly the right arrays, you definitely shouldn't use the function.
pgpUn97Zqn8Co.pgp
Description: PGP signature
