From ccb83a8503bc8690f43f4aad1e82ba787e852d29 Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Fri, 16 May 2014 14:53:49 +0800 Subject: [PATCH] Initialize Petsc from constructor. Remove private members for initializing Petsc. --- opm/core/linalg/LinearSolverPetsc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opm/core/linalg/LinearSolverPetsc.cpp b/opm/core/linalg/LinearSolverPetsc.cpp index 4e5108541..fcb9b1270 100644 --- a/opm/core/linalg/LinearSolverPetsc.cpp +++ b/opm/core/linalg/LinearSolverPetsc.cpp @@ -21,6 +21,7 @@ #include "config.h" #include #include +#include #include namespace Opm { @@ -32,7 +33,7 @@ namespace Opm LinearSolverPetsc::LinearSolverPetsc(const parameter::ParameterGroup& param) - , ksp_type_("gmres") + : ksp_type_("gmres") , pc_type_("sor") , view_ksp_(false) , rtol_(1e-5) @@ -90,7 +91,7 @@ namespace Opm break; } } - call_Petsc(size, nonzeros, ia, ja, sa, rhs, solution, argc_, argv_, ksp_type, pc_type, rtol_, atol_, dtol_, maxits_, view_ksp_); + call_Petsc(size, nonzeros, ia, ja, sa, rhs, solution, ksp_type, pc_type, rtol_, atol_, dtol_, maxits_, view_ksp_); LinearSolverReport rep = {}; rep.converged = true; return rep;