#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
SolverCG<PETScWrappers::MPI::Vector> solver(control,mem);
PreconditionIdentity preconditioner;
- check_solve (solver, control, A,u,f, preconditioner);
+
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 42, 44);
}
GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii8SolverCGINS_13PETScWrappers3MPI6VectorEEE
-DEAL:cg::Starting value 31.00
-DEAL:cg::Convergence step 43 value 0.0008189
-DEAL::Solver stopped after 43 iterations
+DEAL::Solver stopped within 42 - 44 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- check_solver_within_range(
- solver.solve(A,u,f,P),
- solver_control.last_step(), 48, 51);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-}
-
int main(int argc, char **argv)
{
GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
SolverBicgstab<PETScWrappers::MPI::Vector> solver(control,mem);
PreconditionIdentity preconditioner;
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 48, 51);
}
GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
SolverGMRES<PETScWrappers::MPI::Vector> solver(control,mem);
PreconditionIdentity preconditioner;
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 74, 76);
}
GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii11SolverGMRESINS_13PETScWrappers3MPI6VectorEEE
-DEAL:GMRES::Starting value 31.00
-DEAL:GMRES::Convergence step 75 value 0.0008096
-DEAL::Solver stopped after 75 iterations
+DEAL::Solver stopped within 74 - 76 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
SolverMinRes<PETScWrappers::MPI::Vector> solver(control,mem);
PreconditionIdentity preconditioner;
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 42, 44);
}
GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii12SolverMinResINS_13PETScWrappers3MPI6VectorEEE
-DEAL:minres::Starting value 31.0000
-DEAL:minres::Convergence step 43 value 0.000691560
-DEAL::Solver stopped after 43 iterations
+DEAL::Solver stopped within 42 - 44 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
SolverQMRS<PETScWrappers::MPI::Vector> solver(control,mem);
PreconditionIdentity preconditioner;
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 45, 47);
}
GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii10SolverQMRSINS_13PETScWrappers3MPI6VectorEEE
-DEAL:QMRS::Starting value 31.0000
-DEAL:QMRS::Convergence step 46 value 0.000906349
-DEAL::Solver stopped after 46 iterations
+DEAL::Solver stopped within 45 - 47 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 40, 42);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 7.750
-DEAL::Convergence step 41 value 0.0006730
-DEAL::Solver stopped after 41 iterations
+DEAL::Solver stopped within 40 - 42 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- std::cout << e.what() << std::endl;
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionNone preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 42, 44);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 31.00
-DEAL::Convergence step 43 value 0.0008189
-DEAL::Solver stopped after 43 iterations
+DEAL::Solver stopped within 42 - 44 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionEisenstat preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 19, 21);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 60.26
-DEAL::Convergence step 20 value 0.0006908
-DEAL::Solver stopped after 20 iterations
+DEAL::Solver stopped within 19 - 21 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionICC preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 16, 18);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 48.96
-DEAL::Convergence step 17 value 0.0004044
-DEAL::Solver stopped after 17 iterations
+DEAL::Solver stopped within 16 - 18 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionILU preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 16, 18);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 48.96
-DEAL::Convergence step 17 value 0.0004044
-DEAL::Solver stopped after 17 iterations
+DEAL::Solver stopped within 16 - 18 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-
- // we use a direct solver as a
- // preconditioner. this should
- // converge in one step!
- Assert (solver_control.last_step() == 1,
- ExcInternalError());
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionLU preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 1, 1);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 1351.
-DEAL::Convergence step 1 value 0
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionParaSails preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 18, 20);
}
}
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionSOR preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 18, 20);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 29.45
-DEAL::Convergence step 19 value 0.0005731
-DEAL::Solver stopped after 19 iterations
+DEAL::Solver stopped within 18 - 20 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCG solver(control);
PETScWrappers::PreconditionSSOR preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 18, 20);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 29.45
-DEAL::Convergence step 19 value 0.0005731
-DEAL::Solver stopped after 19 iterations
+DEAL::Solver stopped within 18 - 20 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverBiCG solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 40, 42);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers10SolverBiCGE
-DEAL::Starting value 7.750
-DEAL::Convergence step 41 value 0.0006730
-DEAL::Solver stopped after 41 iterations
+DEAL::Solver stopped within 40 - 42 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverGMRES solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 47, 49);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers11SolverGMRESE
-DEAL::Starting value 7.750
-DEAL::Convergence step 48 value 0.0009841
-DEAL::Solver stopped after 48 iterations
+DEAL::Solver stopped within 47 - 49 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- deallog.depth_file(0);
- solver.solve(A,u,f,P);
- deallog.depth_file(3);
- }
- catch (std::exception &e)
- {
- deallog.depth_file(3);
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverBicgstab solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 32, 34);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers14SolverBicgstabE
-DEAL::Solver stopped after 33 iterations
+DEAL::Solver stopped within 32 - 34 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCGS solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 39, 41);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers9SolverCGSE
-DEAL::Starting value 7.750
-DEAL::Convergence step 40 value 0.0007519
-DEAL::Solver stopped after 40 iterations
+DEAL::Solver stopped within 39 - 41 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverTFQMR solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 39, 41);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers11SolverTFQMRE
-DEAL::Starting value 7.750
-DEAL::Convergence step 40 value 0.0008680
-DEAL::Solver stopped after 40 iterations
+DEAL::Solver stopped within 39 - 41 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverTCQMR solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 43, 45);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers11SolverTCQMRE
-DEAL::Starting value 7.750
-DEAL::Starting value 7.750
-DEAL::Convergence step 44 value 0.0007016
-DEAL::Solver stopped after 44 iterations
+DEAL::Solver stopped within 43 - 45 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
- try
- {
- solver.solve(A,u,f,P);
- }
- catch (std::exception &e)
- {
- deallog << e.what() << std::endl;
- abort ();
- }
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverCR solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 40, 42);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers8SolverCRE
-DEAL::Starting value 7.750
-DEAL::Convergence step 41 value 0.0005700
-DEAL::Solver stopped after 41 iterations
+DEAL::Solver stopped within 40 - 42 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- u = 0.;
- f = 1.;
-
- solver.solve(A,u,f,P);
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::SolverPreOnly solver(control);
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 1, 11);
//run twice because this errored out at some point
- check_solve (solver, control, A,u,f, preconditioner);
+ u = 0.;
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 1, 1);
}
}
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Convergence step 1 value 0
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 11 iterations
DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
#include <deal.II/lac/vector_memory.h>
#include <typeinfo>
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType &solver,
- const SolverControl &solver_control,
- const MatrixType &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
-{
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- solver.solve(A,u,f,P);
-
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
-}
-
int main(int argc, char **argv)
{
PETScWrappers::PreconditionJacobi preconditioner(A);
- check_solve (solver, control, A,u,f, preconditioner);
-
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,u,f,preconditioner),
+ control.last_step(), 1, 1);
deallog << u.l2_norm() << std::endl;
- check_solve (solver, control, A,t,u, preconditioner);
-
+ deallog << "Solver type: " << typeid(solver).name() << std::endl;
+ check_solver_within_range(solver.solve(A,t,u,preconditioner),
+ control.last_step(), 1, 1);
deallog << t.l2_norm() << std::endl;
u = 0;
DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Convergence step 1 value 0
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
DEAL::7.750
DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
DEAL::1.938
DEAL::7.750
DEAL::1.938