// checks with the solver_control
// object we have in this object for
// convergence
- KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
- reinterpret_cast<void *>(&solver_control),
- PETSC_NULL);
+ ierr = KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
+ reinterpret_cast<void *>(&solver_control),
+ PETSC_NULL);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// set the command line option prefix name
// checks with the solver_control
// object we have in this object for
// convergence
- KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
- reinterpret_cast<void *>(&solver_control),
- PETSC_NULL);
+ ierr = KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
+ reinterpret_cast<void *>(&solver_control),
+ PETSC_NULL);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
// set the command line options provided
// by the user to override the defaults
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
// Hand over the absolute
// tolerance and the maximum
// the Richardson iteration,
// where no residual is
// available.
- KSPSetTolerances(ksp, PETSC_DEFAULT, this->solver_control.tolerance(),
- PETSC_DEFAULT, this->solver_control.max_steps()+1);
+ ierr = KSPSetTolerances(ksp, PETSC_DEFAULT, this->solver_control.tolerance(),
+ PETSC_DEFAULT, this->solver_control.max_steps()+1);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
void
SolverTFQMR::set_solver_type (KSP &ksp) const
{
- int ierr;
- ierr = KSPSetType (ksp, KSPTFQMR);
+ int ierr = KSPSetType (ksp, KSPTFQMR);
AssertThrow (ierr == 0, ExcPETScError(ierr));
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
void
SolverCR::set_solver_type (KSP &ksp) const
{
- int ierr;
- ierr = KSPSetType (ksp, KSPCR);
+ int ierr = KSPSetType (ksp, KSPCR);
AssertThrow (ierr == 0, ExcPETScError(ierr));
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// in the deal.II solvers, we always
// honor the initial guess in the
// solution vector. do so here as well:
- KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
void
SolverPreOnly::set_solver_type (KSP &ksp) const
{
- int ierr;
- ierr = KSPSetType (ksp, KSPPREONLY);
+ int ierr = KSPSetType (ksp, KSPPREONLY);
AssertThrow (ierr == 0, ExcPETScError(ierr));
// The KSPPREONLY solver of
// Using the PREONLY solver with
// a nonzero initial guess leads
// PETSc to produce some error messages.
- KSPSetInitialGuessNonzero (ksp, PETSC_FALSE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_FALSE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
* Using a PREONLY solver with a nonzero initial guess leads PETSc to
* produce some error messages.
*/
- KSPSetInitialGuessNonzero (ksp, PETSC_FALSE);
+ ierr = KSPSetInitialGuessNonzero (ksp, PETSC_FALSE);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
void
* convergence monitor function that checks with the solver_control
* object for convergence
*/
- KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
- reinterpret_cast<void *>(&solver_control),
- PETSC_NULL);
+ ierr = KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
+ reinterpret_cast<void *>(&solver_control),
+ PETSC_NULL);
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
/**
* set the software that is to be used to perform the lu