1 0 GfsSimulation GfsBox GfsGEdge {} {
  Time { end = 0.25 }
  AdvectionParams { cfl = 0.9 }
  ApproxProjectionParams { tolerance = 1e-5 }
  ProjectionParams { tolerance = 1e-5 }
  Refine {
    double r = sqrt(x*x + y*y);
    switch (LEVEL) {
    case 6: return r > 0.25 ? 4 : r > 0.15 ? 5 : 6;
    case 7: return r > 0.25 ? 4 : r > 0.2 ? 5 : r > 0.15 ? 6 : 7;
    case 8: return r > 0.25 ? 4 : r > 0.2 ? 5 : r > 0.175 ? 6 : r > 0.15 ? 7 : 8;
    case 9: return r > 0.25 ? 4 : r > 0.2 ? 5 : r > 0.175 ? 6 : r > 0.1625 ? 7 : r > 0.15 ? 8 : 9;
    }
  }
  InitVorticity {} {
    double vortex (double xo, double yo, double s) {
      double r = sqrt ((x - xo)*(x - xo) + (y - yo)*(y - yo));
      return s*(1. + tanh (100.*(0.03 - r)))/2.;
    }
    return vortex (0., 0., -150.) + 
           vortex (0.09, 0., 50.) + 
           vortex (-0.045, 0.0779422863406, 50.) +
           vortex (-0.045, -0.0779422863406, 50.);
  }
  AdaptVorticity { istep = 1 } { maxlevel = LEVEL cmax = 4e-3 }
  OutputSimulation { start = 0.05 } stdout
  EventScript { start = 0.05 } {
    echo Clear
    cat levels.gfv
    echo Save tm_0_05.eps { format = EPS line_width = 0.1 }
    echo Clear
    cat vorticity.gfv
    echo Save tv_0_05.eps { format = EPS line_width = 0.1 }
  }
  OutputSimulation { start = 0.15 } stdout
  EventScript { start = 0.15 } {
    echo Clear
    cat levels.gfv
    echo Save tm_0_15.eps { format = EPS line_width = 0.1 }
    echo Clear
    cat vorticity.gfv
    echo Save tv_0_15.eps { format = EPS line_width = 0.1 }
  }
  OutputSimulation { start = 0.25 } stdout
  EventScript { start = 0.25 } {
    echo Clear
    cat levels.gfv
    echo Save tm_0_25.eps { format = EPS line_width = 0.1 }
    echo Clear
    cat vorticity.gfv
    echo Save tv_0_25.eps { format = EPS line_width = 0.1 }
  }
  OutputSimulation { start = 0.25 } SIM
}
GfsBox {}