Merge pull request #4780 from akva2/ecltracermodel_no_iostream

EclTracerModel: replace cout with OpmLog
This commit is contained in:
Arne Morten Kvarving 2023-08-07 19:22:35 +02:00 committed by GitHub
commit 58a498c7d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,12 +30,13 @@
#include <ebos/eclgenerictracermodel.hh>
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/models/utils/propertysystem.hh>
#include <opm/simulators/utils/VectorVectorDataHandle.hpp>
#include <array>
#include <iostream>
#include <memory>
#include <stdexcept>
#include <string>
@ -492,8 +493,9 @@ protected:
dx[tIdx] = 0.0;
bool converged = this->linearSolveBatchwise_(*tr.mat, dx, tr.residual_);
if (!converged)
std::cout << "### Tracer model: Warning, linear solver did not converge. ###" << std::endl;
if (!converged) {
OpmLog::warning("### Tracer model: Linear solver did not converge. ###");
}
for (int tIdx = 0; tIdx < tr.numTracer(); ++tIdx) {
tr.concentration_[tIdx] -= dx[tIdx];