MeshKit  1.0
test_meshoptemplate.cpp
Go to the documentation of this file.
00001 
00008 #include "meshkit/MKCore.hpp"
00009 #include "meshkit/MeshOp.hpp"
00010 #include "meshkit/MeshOpTemplate.hpp"
00011 #include "meshkit/TFIMapping.hpp"
00012 #include "meshkit/OneToOneSwept.hpp"
00013 #include "meshkit/EdgeMesher.hpp"
00014 #include <algorithm>
00015 
00016 using namespace MeshKit;
00017 
00018 #include "TestUtil.hpp"
00019 
00020 MKCore *mk;
00021 
00022 bool save_mesh = false;
00023 void test_mesh_op_template();
00024 
00025 int main(int argc, char **argv)
00026 {
00027   mk = new MKCore();
00028   int num_fail = 0;
00029 
00030   num_fail += RUN_TEST(test_mesh_op_template);
00031 
00032   delete mk;
00033   return num_fail;
00034 }
00035 
00036 void test_mesh_op_template()
00037 {
00038   // Make the brick!                                                           // v Don't need this
00039   MeshOpTemplate *mot = (MeshOpTemplate*) mk->construct_meshop("MeshOpTemplate", MEntVector());
00040   mot->set_name("MeshOpTemplate");
00041 
00042   // Do work!
00043   mk->setup();
00044   mk->execute();
00045   mk->clear_graph();
00046 
00047   if(save_mesh) {
00048     #ifdef HAVE_ACIS
00049       mk->save_geometry("un_meshed_brick.sat");
00050       mk->save_mesh("meshed_brick.exo");
00051     #elif defined(HAVE_OCC)
00052       mk->save_geometry("un_meshed_brick.stp");
00053       mk->save_mesh("meshed_brick.exo");
00054     #endif
00055   }
00056 
00057   return;
00058 }
00059 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines