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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Opm mailing list Opm@opm-project.org http://opm-project.org/cgi-bin/mailman/listinfo/opm