From: Guido Kanschat Date: Fri, 8 Apr 2005 12:29:11 +0000 (+0000) Subject: subset of lac/solver.cc X-Git-Tag: v8.0.0~14117 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae869ebb83af6643e8c26429cfc6cda39edc2462;p=dealii.git subset of lac/solver.cc git-svn-id: https://svn.dealii.org/trunk@10430 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/deal_solver_06.cc b/tests/bits/deal_solver_06.cc deleted file mode 100644 index 177577b75d..0000000000 --- a/tests/bits/deal_solver_06.cc +++ /dev/null @@ -1,91 +0,0 @@ - -//---------------------------- deal_solver_06.cc --------------------------- -// $Id$ -// Version: $Name$ -// -// 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. -// -//---------------------------- deal_solver_06.cc --------------------------- - -// test the Richardson solver - - -#include "../tests.h" -#include "../lac/testmatrix.h" -#include -#include -#include -#include -#include -#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; - } - - deallog << "Solver stopped after " << solver.control().last_step() - << " iterations" << std::endl; -} - - -int main() -{ - std::ofstream logfile("deal_solver_06.output"); - logfile.precision(4); - deallog.attach(logfile); - deallog.depth_console(0); - - GrowingVectorMemory<> mem; - - const unsigned int size = 32; - unsigned int dim = (size-1)*(size-1); - SolverControl control(10000, 1.e-3); - - deallog << "Size " << size << " Unknowns " << dim << std::endl; - - // Make matrix - FDMatrix testproblem(size, size); - SparsityPattern structure(dim, dim, 5); - testproblem.five_point_structure(structure); - structure.compress(); - SparseMatrix A(structure); - testproblem.five_point(A); - - Vector f(dim); - Vector u(dim); - f = 1.; - - SolverRichardson<> solver(control, mem); - PreconditionIdentity preconditioner; - check_solve (solver, A,u,f, preconditioner); -} -