binary-mesh-to-text.C

Go to the documentation of this file.
00001 #ifdef HAVE_CONFIG_H
00002 #  include "tumble-conf.h"
00003 #endif
00004 
00005 #include "meshio.h"
00006 #include "simulation.h"
00007 #include <iostream>
00008 
00009 int main(int argc, char **argv) {
00010   Simulation sim;
00011 
00012   if (argc != 2) {
00013     std::cerr << "USAGE: " << argv[0] << " binarymesh.geo\n";
00014     exit(1);
00015   }
00016 
00017   MeshBinaryInput mi(&sim);
00018   if (!mi.read(argv[1])) {
00019     exit(1);
00020   }
00021 
00022   char *position = strstr(argv[1], ".geo");
00023   *position = '\0';
00024 
00025   MeshOutput mo(sim.get_bezier_mesh(), sim.get_boundary_mesh());
00026   if (!mo.write(argv[1])) {
00027     exit(1);
00028   }
00029 
00030   return 0;
00031 }

Generated on Mon May 24 09:53:30 2010 for TUMBLE by  doxygen 1.5.2