examples/hdf5_Convert.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <fstream>
00003 #include "pbe.h"
00004 #include "debugmeshbuilder.h"
00005 #include "netgenreader.h"
00006 
00007 #include "HDF5FileBuilder.h"
00008 
00009 using namespace std;
00010 
00011 int main(int argc, char *argv[]) {
00012   
00013     char *outputFile;
00014     char *inputFile; 
00015  
00016     //Parse input args for file to read and file to write
00017     if (argc == 3) {
00018         inputFile = argv[1];
00019         outputFile = argv[2];   
00020     } else {
00021         cout << "Usage: hdf5_Convert inputfile outputfile.h5" << endl;
00022         return 0;
00023     }
00024 
00025 
00026     cout << "Open file '" << inputFile << "': ";
00027     ifstream istr(inputFile);
00028     //Test that the file exists!!
00029     if (istr.fail()) {
00030         cout << "FAILED!" << endl;
00031         return 0;
00032     } else 
00033         cout << "OK" << endl;
00034 
00035     
00036     HDF5FileBuilder* builder = new HDF5FileBuilder(outputFile);
00037     NetgenReader* reader(0);
00038     reader = new NetgenReader(&istr, builder);
00039     reader->read(); 
00040 
00041 }
00042 

Generated on Fri Oct 26 13:35:11 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7