MOAB: Mesh Oriented datABase
(version 5.4.1)
|
00001 /* ***************************************************************** 00002 MESQUITE -- The Mesh Quality Improvement Toolkit 00003 00004 Copyright 2004 Sandia Corporation and Argonne National 00005 Laboratory. Under the terms of Contract DE-AC04-94AL85000 00006 with Sandia Corporation, the U.S. Government retains certain 00007 rights in this software. 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2.1 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License 00020 (lgpl.txt) along with this library; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 00023 [email protected], [email protected], [email protected], 00024 [email protected], [email protected], [email protected] 00025 00026 ***************************************************************** */ 00027 // -*- Mode : c++; tab-width: 3; c-tab-always-indent: t; indent-tabs-mode: nil; c-basic-offset: 3 00028 // -*- 00029 // 00030 // SUMMARY: 00031 // USAGE: 00032 // 00033 // ORIG-DATE: 19-Feb-02 at 10:57:52 00034 // LAST-MOD: 23-May-03 at 18:04:38 by Thomas Leurent 00035 // 00036 // 00037 // DESCRIPTION: 00038 // ============ 00039 /*! \file main.cpp 00040 00041 describe main.cpp here 00042 00043 */ 00044 // DESCRIP-END. 00045 // 00046 00047 #include <iostream> 00048 using std::cout; 00049 using std::endl; 00050 #include <cstdlib> 00051 00052 #include "Mesquite.hpp" 00053 #include "MeshImpl.hpp" 00054 #include "MsqError.hpp" 00055 00056 using namespace MBMesquite; 00057 00058 int main( int argc, char* argv[] ) 00059 { 00060 MBMesquite::MsqPrintError err( cout ); 00061 char in_file_name[256]; 00062 char out_file_name[256]; 00063 00064 // command line arguments 00065 if( argc != 3 ) 00066 { 00067 cout << "Input meshfile name needed as first argument.\n" 00068 "Output meshfile name needed as second argument.\n" 00069 << endl; 00070 return -1; 00071 } 00072 else 00073 { 00074 cout << " given 2 command line arguments.\n"; 00075 strcpy( in_file_name, argv[1] ); 00076 strcpy( out_file_name, argv[2] ); 00077 } 00078 00079 MBMesquite::MeshImpl* mesh = new MBMesquite::MeshImpl; 00080 cout << "\nReading Exodus file.\n"; 00081 mesh->read_exodus( in_file_name, err ); 00082 if( err ) return 1; 00083 cout << "Writing VTK file.\n"; 00084 mesh->write_vtk( out_file_name, err ); 00085 if( err ) return 1; 00086 00087 return 0; 00088 }