[Opm] Extracting matrices and right-hand sides
Andreas Lauser
and at poware.org
Fri May 19 22:16:49 UTC 2017
Hi,
On Freitag, 19. Mai 2017 22:05:34 CEST Alan King wrote:
> I'd like to be able to extract the matrices and right-hand sides that are
> sent to the solvers. Does anyone have some pointers on where in the code I
> can look to write a dump routine?
Easy, look here:
https://github.com/OPM/opm-simulators/blob/master/opm/autodiff/
BlackoilModelEbos.hpp#L451
The residual can be printed simply by using
std::cout << ebosResid;
For its Jacobian matrix, I recommend
Dune::printSparseMatrix(std::cout, ebosJac, "J", "row");
Because you probably don't want to be flooded by dozens of millions of boring
zero entries. If I remember correctly, there are also some routines in Dune
which output matrices and vectors to standardized format like MatrixMarket. I
haven't personally used them yet, though.
cheers
Andreas
--
Just because a patch doesn't solve world hunger isn't really a good
reason to reject it.
-- Daniel Vetter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <//opm-project.org/pipermail/opm/attachments/20170520/4b983daf/attachment.sig>
More information about the Opm
mailing list