source: anuga_work/development/anugavis/src/anugavis_simple_cxx.cc @ 5598

Last change on this file since 5598 was 5598, checked in by jack, 16 years ago

Progress on height quantities.

File size: 773 bytes
Line 
1#include <iostream>
2#include <sstream>
3#include <SDL.h>
4#include "anugavis.hh"
5#include "output.hh"
6
7using std::cout;
8using std::endl;
9using std::ostringstream;
10
11extern "C"
12int main(int argc, char *argv[]){
13  if(argc != 2){
14    ostringstream ss;
15    ss << "Usage: " << argv[0] << " sww_file_name";
16    output_string(ss.str());
17    return 1;
18  }
19  try{
20    AnugaVis anuga(argv[1], 640, 480);
21    HeightQuantity elevation("elevation", 0, 1, 0.5, 0.5, 0.5);
22    HeightQuantity stage("stage", 0, 1, 0, 0, 0.8);
23    anuga.add_HeightQuantity(elevation);
24    anuga.add_HeightQuantity(stage);
25    anuga.run();
26  }catch(const char *str){
27    output_string(string(str));
28  }catch(string &str){
29    output_string(str);
30    return 1;
31  }
32  return 0;
33}
Note: See TracBrowser for help on using the repository browser.