MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include "TestUtil.hpp"
#include "Mesquite.hpp"
#include "MeshImpl.hpp"
#include "MsqError.hpp"
#include <iostream>
#include <cstdlib>
#include "ShapeImprovementWrapper.hpp"
#include "MsqTimer.hpp"
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 63 of file shape_improvement.cpp.
References mesh, MBMesquite::print_timing_diagnostics(), MBMesquite::MeshImpl::read_vtk(), and MBMesquite::IQInterface::run_instructions().
{ MBMesquite::MsqPrintError err( cout ); std::string file_name = TestDir + "unittest/mesquite/3D/vtk/tets/untangled/tire.vtk"; // command line arguments if( argc == 1 ) { cout << "No command line argument given for mesh file.\n" << "Defaulting to " << file_name << "\n"; } else if( argc > 2 ) cout << "Too many command line arguments.\n" << endl; else if( argc == 2 ) { cout << " given 1 command line arguments.\n"; file_name = argv[1]; } MBMesquite::MeshImpl mesh; mesh.read_vtk( file_name.c_str(), err ); // creates a wrapper ShapeImprovementWrapper wrapper; // mesh->write_vtk("original_mesh",err); MSQ_CHKERR(err); // launches optimization on mesh_set1 wrapper.run_instructions( &mesh, err ); if( err ) return 1; // mesh->write_vtk("smoothed_mesh", err); MSQ_CHKERR(err); print_timing_diagnostics( cout ); return 0; }