From: Wolfgang Bangerth Date: Thu, 26 Feb 2004 17:02:06 +0000 (+0000) Subject: New tests. X-Git-Tag: v8.0.0~15739 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36e3808124b5cb9d3a22694439f65aa90cc410e7;p=dealii.git New tests. git-svn-id: https://svn.dealii.org/trunk@8568 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/petsc_solver_01.cc b/tests/bits/petsc_solver_01.cc new file mode 100644 index 0000000000..a2ce35378c --- /dev/null +++ b/tests/bits/petsc_solver_01.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_01.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_01.cc --------------------------- + +// test the PETSc Richardson solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_01.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverRichardson solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_02.cc b/tests/bits/petsc_solver_02.cc new file mode 100644 index 0000000000..4a846ee289 --- /dev/null +++ b/tests/bits/petsc_solver_02.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_02.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_02.cc --------------------------- + +// test the PETSc Chebychev solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_02.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverChebychev solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_03.cc b/tests/bits/petsc_solver_03.cc new file mode 100644 index 0000000000..fd2bbab34b --- /dev/null +++ b/tests/bits/petsc_solver_03.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_03.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_03.cc --------------------------- + +// test the PETSc CG solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_03.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverCG solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_04.cc b/tests/bits/petsc_solver_04.cc new file mode 100644 index 0000000000..39a02f05e0 --- /dev/null +++ b/tests/bits/petsc_solver_04.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_04.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_04.cc --------------------------- + +// test the PETSc BiCG solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_04.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverBiCG solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_05.cc b/tests/bits/petsc_solver_05.cc new file mode 100644 index 0000000000..0d06e80927 --- /dev/null +++ b/tests/bits/petsc_solver_05.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_05.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_05.cc --------------------------- + +// test the PETSc GMRES solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_05.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverGMRES solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_06.cc b/tests/bits/petsc_solver_06.cc new file mode 100644 index 0000000000..d97006e405 --- /dev/null +++ b/tests/bits/petsc_solver_06.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_06.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_06.cc --------------------------- + +// test the PETSc Bicgstab solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_06.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverBicgstab solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_07.cc b/tests/bits/petsc_solver_07.cc new file mode 100644 index 0000000000..936259acd6 --- /dev/null +++ b/tests/bits/petsc_solver_07.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_07.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_07.cc --------------------------- + +// test the PETSc CGS solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_07.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverCGS solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_08.cc b/tests/bits/petsc_solver_08.cc new file mode 100644 index 0000000000..9eb6354efd --- /dev/null +++ b/tests/bits/petsc_solver_08.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_08.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_08.cc --------------------------- + +// test the PETSc TFQMR solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_08.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverTFQMR solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_09.cc b/tests/bits/petsc_solver_09.cc new file mode 100644 index 0000000000..a4953b1206 --- /dev/null +++ b/tests/bits/petsc_solver_09.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_09.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_09.cc --------------------------- + +// test the PETSc TCQMR solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_09.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverTCQMR solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_10.cc b/tests/bits/petsc_solver_10.cc new file mode 100644 index 0000000000..7d65a41bf5 --- /dev/null +++ b/tests/bits/petsc_solver_10.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_10.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_10.cc --------------------------- + +// test the PETSc CR solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_10.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverCR solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} + diff --git a/tests/bits/petsc_solver_11.cc b/tests/bits/petsc_solver_11.cc new file mode 100644 index 0000000000..e5680d0382 --- /dev/null +++ b/tests/bits/petsc_solver_11.cc @@ -0,0 +1,89 @@ +//---------------------------- petsc_solver_11.cc --------------------------- +// $Id$ +// Version: +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_solver_11.cc --------------------------- + +// test the PETSc LSQR solver + + +#include "../tests.h" +#include "../lac/testmatrix.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void +check_solve( SOLVER& solver, const MATRIX& A, + VECTOR& u, VECTOR& 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) +{ + PetscInitialize(&argc,&argv,0,0); + { + std::ofstream logfile("petsc_solver_11.output"); + logfile.precision(4); + deallog.attach(logfile); + deallog.depth_console(0); + + SolverControl control(100, 1.e-3); + + const unsigned int size = 32; + unsigned int dim = (size-1)*(size-1); + + deallog << "Size " << size << " Unknowns " << dim << std::endl; + + // Make matrix + FDMatrix testproblem(size, size); + petsc_wrappers::SparseMatrix A(dim, dim, 5); + testproblem.five_point(A); + + petsc_wrappers::Vector f(dim); + petsc_wrappers::Vector u(dim); + f = 1.; + A.compress (); + f.compress (); + u.compress (); + + petsc_wrappers::SolverLSQR solver(control); + petsc_wrappers::PreconditionJacobi preconditioner(A); + check_solve (solver, A,u,f, preconditioner); + } + PetscFinalize (); +} +