]> https://gitweb.dealii.org/ - dealii.git/commitdiff
subset of ;ac/splver.cc
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 8 Apr 2005 13:14:56 +0000 (13:14 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 8 Apr 2005 13:14:56 +0000 (13:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@10431 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/deal_solver_01.cc [deleted file]

diff --git a/tests/bits/deal_solver_01.cc b/tests/bits/deal_solver_01.cc
deleted file mode 100644 (file)
index 259d6cb..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-//----------------------------  deal_solver_01.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_01.cc  ---------------------------
-
-// test the CG solver
-
-
-#include "../tests.h"
-#include "../lac/testmatrix.h"
-#include <cmath>
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <base/logstream.h>
-#include <lac/sparse_matrix.h>
-#include <lac/vector.h>
-#include <lac/vector_memory.h>
-#include <lac/solver_control.h>
-#include <lac/solver_cg.h>
-#include <lac/solver_gmres.h>
-#include <lac/solver_bicgstab.h>
-#include <lac/solver_richardson.h>
-#include <lac/solver_qmrs.h>
-#include <lac/precondition.h>
-#include <typeinfo>
-
-template<class SOLVER, class MATRIX, class VECTOR, class PRECONDITION>
-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()
-{
-  std::ofstream logfile("deal_solver_01.output");
-  logfile.precision(4);
-  deallog.attach(logfile);
-  deallog.depth_console(0);
-  
-  GrowingVectorMemory<> mem;
-  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);
-  SparsityPattern structure(dim, dim, 5);
-  testproblem.five_point_structure(structure);
-  structure.compress();
-  SparseMatrix<double>  A(structure);
-  testproblem.five_point(A);
-
-  Vector<double>  f(dim);
-  Vector<double>  u(dim);
-  f = 1.;
-
-  SolverCG<> solver(control, mem);
-  PreconditionIdentity preconditioner;
-  check_solve (solver, A,u,f, preconditioner);
-}
-

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.