diff --git a/opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp b/opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp index 2becba999..8bad8e90c 100644 --- a/opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp +++ b/opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp @@ -107,7 +107,8 @@ public: std::string filename = prm.get("weights_filename", "impes_weights.txt"); std::ofstream outfile(filename); if (!outfile) { - OPM_THROW(std::ofstream::failure, "Could not write weights to file " << filename << "."); + OPM_THROW(std::ofstream::failure, + "Could not write weights to file " + filename + "."); } Dune::writeMatrixMarket(weights_, outfile); } @@ -139,7 +140,8 @@ public: auto filename = prm.get("weights_filename", "impes_weights.txt"); std::ofstream outfile(filename); if (!outfile) { - OPM_THROW(std::ofstream::failure, "Could not write weights to file " << filename << "."); + OPM_THROW(std::ofstream::failure, + "Could not write weights to file " + filename + "."); } Dune::writeMatrixMarket(weights_, outfile); }