MOAB: Mesh Oriented datABase  (version 5.2.1)
vtk_to_exo.cpp File Reference
#include <iostream>
#include <cstdlib>
#include "Mesquite.hpp"
#include "MeshImpl.hpp"
#include "MsqError.hpp"
+ Include dependency graph for vtk_to_exo.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 58 of file vtk_to_exo.cpp.

References mesh, MBMesquite::MeshImpl::read_vtk(), and MBMesquite::MeshImpl::write_exodus().

{
    MBMesquite::MsqPrintError err( cout );
    char in_file_name[256];
    char out_file_name[256];
    double OF_value = 1.;

    // command line arguments
    if( argc != 3 )
    {
        cout << "Input meshfile name needed as first argument.\n"
                "Output meshfile name needed as second argument.\n"
             << endl;
        return -1;
    }
    else
    {
        cout << " given 2 command line arguments.\n";
        strcpy( in_file_name, argv[1] );
        strcpy( out_file_name, argv[2] );
    }

    MBMesquite::MeshImpl* mesh = new MBMesquite::MeshImpl;
    cout << "\nReading VTK file.\n";
    mesh->read_vtk( in_file_name, err );
    if( err ) return 1;
    cout << "Writing Exodus file.\n";
    mesh->write_exodus( out_file_name, err );
    if( err ) return 1;

    return 0;
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines