 double sol(double x, double y)  { return sin( x)*sin(y);}
 double der(double x, double y)  { return cos( x)*sin(y);}
 
+//TODO list
+//1. Show that the thing reliably converges (the first trick seems to be that
+// the Chebyshev smoother smoothes on VAx=Vb instead of Ax=b even though this
+// should be the same? Maybe has something to do with how the weights cancel
+// the second trick was to increase the jumps but take care to have enough
+// smoothing steps)
+//2. Can we use this with fixed number of smooting and 1 FMG cycle in simulations?
+// (it seems that the number of smoothing steps influences execution time very
+// little which means that the CG on the coarse grid dominates time; but why
+// does the number of stages influence the error in both nested iterations and
+// the multigrid? )
 
 int main()
 {

    err = nc_def_var( ncid, "b_num", NC_DOUBLE, 3, dim3d, &bID);
    err = nc_def_var( ncid, "r_num", NC_DOUBLE, 3, dim3d, &rID);
    ////////////////////////////////////////////////////
    std::cout << "Type nu1 (3), nu2 (3) gamma (1) max_iter (3)\n";
    unsigned nu1, nu2, gamma;
    int max_iter = 3;
    std::cin >> nu1 >> nu2 >> gamma >> max_iter;
    x = dg::evaluate( initial, grid);
    const dg::DVec solution = dg::evaluate( sol, grid);
    for( int i=0; i<max_iter; i++)
    {
        multigrid.solve(multi_pol, x, b, multi_ev, nu1, nu2, gamma, eps);

    std::vector<double> multi_ev(stages);
    for(unsigned u=0; u<stages; u++)
    {
        multi_pol[u].construct( multigrid.grid(u), dg::not_normed, dg::centered, 10*jfactor);
        multi_eve[u].construct( multi_chi[u]);
        multi_pol[u].set_chi( multi_chi[u]);
        counter = multi_eve[u]( multi_pol[u], multi_x[u], multi_b[u],
            multi_ev[u], eps_ev);
        w2d = dg::create::weights( multigrid.grid(u));
        multi_ev[u]/=hxhy;
        std::cout << "Eigenvalue estimate eve: "<<multi_ev[u]<<"\n";
        hxhy*=4;
    }
    //////////////////////////////setup and write netcdf//////////////////
    err = nc_create( "multigrid.nc", NC_NETCDF4|NC_CLOBBER, &ncid);
