MOAB: Mesh Oriented datABase  (version 5.4.1)
vtk_to_exo.cpp
Go to the documentation of this file.
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     double OF_value = 1.;
00064 
00065     // command line arguments
00066     if( argc != 3 )
00067     {
00068         cout << "Input meshfile name needed as first argument.\n"
00069                 "Output meshfile name needed as second argument.\n"
00070              << endl;
00071         return -1;
00072     }
00073     else
00074     {
00075         cout << " given 2 command line arguments.\n";
00076         strcpy( in_file_name, argv[1] );
00077         strcpy( out_file_name, argv[2] );
00078     }
00079 
00080     MBMesquite::MeshImpl* mesh = new MBMesquite::MeshImpl;
00081     cout << "\nReading VTK file.\n";
00082     mesh->read_vtk( in_file_name, err );
00083     if( err ) return 1;
00084     cout << "Writing Exodus file.\n";
00085     mesh->write_exodus( out_file_name, err );
00086     if( err ) return 1;
00087 
00088     return 0;
00089 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines