mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
The output for the first Newton iteration
output the matrix, residual and the solution for the first Newton iteration in opm/autodiff/NewtonIterationBlackoilSimple.cpp
This commit is contained in:
parent
5c6503848e
commit
fecc161d7e
@ -16,12 +16,15 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#define PAEANDEBUG 1
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <opm/autodiff/NewtonIterationBlackoilSimple.hpp>
|
#include <opm/autodiff/NewtonIterationBlackoilSimple.hpp>
|
||||||
#include <opm/autodiff/AutoDiffHelpers.hpp>
|
#include <opm/autodiff/AutoDiffHelpers.hpp>
|
||||||
#include <opm/core/utility/ErrorMacros.hpp>
|
#include <opm/core/utility/ErrorMacros.hpp>
|
||||||
|
#if PAEANDEBUG
|
||||||
|
#include <fstream>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
@ -57,6 +60,19 @@ namespace Opm
|
|||||||
= linsolver_.solve(matr.rows(), matr.nonZeros(),
|
= linsolver_.solve(matr.rows(), matr.nonZeros(),
|
||||||
matr.outerIndexPtr(), matr.innerIndexPtr(), matr.valuePtr(),
|
matr.outerIndexPtr(), matr.innerIndexPtr(), matr.valuePtr(),
|
||||||
total_residual.value().data(), dx.data());
|
total_residual.value().data(), dx.data());
|
||||||
|
#if PAEANDEBUG
|
||||||
|
std::ofstream filestream("matrix.out");
|
||||||
|
filestream << matr;
|
||||||
|
filestream.close();
|
||||||
|
std::ofstream filestream2("sol.out");
|
||||||
|
filestream2 << dx;
|
||||||
|
filestream2.close();
|
||||||
|
std::ofstream filestream3("r.out");
|
||||||
|
filestream3 << total_residual.value();
|
||||||
|
filestream3.close();
|
||||||
|
std::cout << " output the information for the first iteration " << std::endl;
|
||||||
|
std::cin.ignore();
|
||||||
|
#endif
|
||||||
if (!rep.converged) {
|
if (!rep.converged) {
|
||||||
OPM_THROW(std::runtime_error,
|
OPM_THROW(std::runtime_error,
|
||||||
"FullyImplicitBlackoilSolver::solveJacobianSystem(): "
|
"FullyImplicitBlackoilSolver::solveJacobianSystem(): "
|
||||||
|
Loading…
Reference in New Issue
Block a user