MOAB: Mesh Oriented datABase  (version 5.4.1)
exo_to_vtk.cpp File Reference
#include <iostream>
#include <cstdlib>
#include "Mesquite.hpp"
#include "MeshImpl.hpp"
#include "MsqError.hpp"
+ Include dependency graph for exo_to_vtk.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 exo_to_vtk.cpp.

References mesh, MBMesquite::MeshImpl::read_exodus(), and MBMesquite::MeshImpl::write_vtk().

{
    MBMesquite::MsqPrintError err( cout );
    char in_file_name[256];
    char out_file_name[256];

    // 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 Exodus file.\n";
    mesh->read_exodus( in_file_name, err );
    if( err ) return 1;
    cout << "Writing VTK file.\n";
    mesh->write_vtk( out_file_name, err );
    if( err ) return 1;

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