Commit 111a6e6b by Francois Gygi

cleanup headers


git-svn-id: http://qboxcode.org/svn/qb/trunk@488 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 875475cb
// $Id: testjacobi.C,v 1.1 2006-07-21 17:40:24 fgygi Exp $
// $Id: testjacobi.C,v 1.2 2007-03-17 01:09:04 fgygi Exp $
//
// test jacobi
//
......@@ -14,7 +14,6 @@
#include <fstream>
#include <valarray>
#include <algorithm>
using namespace std;
#include "Timer.h"
......@@ -25,6 +24,7 @@ using namespace std;
#include "Context.h"
#include "Matrix.h"
#include "jacobi.h"
using namespace std;
double aa(int i, int j) { return 1.0/(i+1)+2.0*i/(j+1); }
double frank(int n, int i, int j) { return n - max(i,j); }
......@@ -109,7 +109,8 @@ int main(int argc, char **argv)
const int maxsweep = 30;
tm.start();
int nsweep = jacobi(maxsweep,1.e-6,a,u,e);
double tol = 1.e-10;
int nsweep = jacobi(maxsweep,tol,a,u,e);
tm.stop();
if ( ctxt.onpe0() ) cout << " nsweep: " << nsweep << endl;
if (ctxt.mype() == 0) cout << "Jacobi time: " << tm.real() << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment