Skip to content

Commit 1a781ea

Browse files
committed
fix
1 parent 1577281 commit 1a781ea

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

SU2_CFD/include/integration/CNewtonIntegration.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,16 @@ class CNewtonIntegration final : public CIntegration {
152152
template<class T, su2enable_if<std::is_same<T,MixedScalar>::value> = 0>
153153
inline unsigned long Preconditioner_impl(const CSysVector<T>& u, CSysVector<T>& v,
154154
unsigned long iters, Scalar& eps) const {
155-
if (iters == 0) {
155+
const auto inner_solver = config->GetKind_Linear_Solver_Inner();
156+
157+
if (iters == 0 || (iters == 1 && inner_solver == LINEAR_SOLVER_INNER::SMOOTHER)) {
156158
(*preconditioner)(u, v);
157159
return 0;
158160
}
159161
auto product = CSysMatrixVectorProduct<MixedScalar>(solvers[FLOW_SOL]->Jacobian, geometry, config);
160162
v = MixedScalar(0.0);
161163
MixedScalar eps_t = eps;
162-
switch (config->GetKind_Linear_Solver_Inner()) {
164+
switch (inner_solver) {
163165
case LINEAR_SOLVER_INNER::NONE:
164166
iters = solvers[FLOW_SOL]->System.FGMRES_LinSolver(u, v, product, *preconditioner, eps, iters, eps_t, false, config);
165167
break;

0 commit comments

Comments
 (0)