MeshKit  1.0
test_assygen.cpp
Go to the documentation of this file.
00001 
00007 #include "meshkit/MKCore.hpp"
00008 #include "meshkit/MeshOp.hpp"
00009 #include "meshkit/ModelEnt.hpp"
00010 #include "meshkit/AssyGen.hpp"
00011 #include "TestUtil.hpp"
00012 #include "meshkit/CAMALTetMesher.hpp"
00013 #include "meshkit/CopyGeom.hpp"
00014 
00015 using namespace MeshKit;
00016 
00017 MKCore *mk;
00018 
00019 void test_assygen_default(int argc, char **argv);
00020 
00021 int main(int argc, char *argv[])
00022 {
00023   mk = new MKCore();
00024   test_assygen_default(argc, argv);
00025   delete mk;
00026   return 0;
00027 }
00028 
00029 void test_assygen_default(int argc, char **argv)
00030 {
00031   // create a model entity vector for construting assygen meshop, note that NO model entities are required for assygen meshop.
00032   MEntVector volso;
00033 
00034   // construct the meshop and set name
00035   AssyGen *ag = (AssyGen*) mk->construct_meshop("AssyGen", volso);
00036   ag->set_name("assygen");
00037 
00038   // setup input/output assygen files for creating the 'Reactor Assembly' geometry
00039   ag->PrepareIO(argc, argv, TestDir);
00040   ag->setup_this();
00041   ag->execute_this();
00042 
00043 //  // now populate model ents to get the geometry created
00044 //  mk->populate_model_ents(0, -1, -1);
00045 
00046 //  MEntVector vols;
00047 //  mk->get_entities_by_dimension(3, vols);
00048 
00049 //  CopyGeom *cg = (CopyGeom*) mk->construct_meshop("CopyGeom", vols);
00050 //  cg->set_name("copy_move_geom");
00051 
00052 //  // set the location
00053 //  Vector<3> dx; dx[0] = 23.5; dx[1] = 0; dx[2] = 0;
00054 //  cg->set_location(dx);
00055 //  cg->setup_this();
00056 //  cg->execute_this();
00057 
00058 //  // merge and imprint the o/p geometry
00059 //  std::vector<iBase_EntityHandle> entities_out;
00060 //  mk->igeom_instance()->getEntities(0, iBase_REGION, entities_out);
00061 //  double dTol = 1.0e-2;
00062 //  mk->igeom_instance()->mergeEnts(&entities_out[0],entities_out.size(), dTol);
00063 
00064 //  //  mk->save_geometry("t.sat");
00065 //  // TODO: mesh using camal and parallel mesher
00066 
00067 //  delete cg;
00068   delete ag;
00069 }
00070 
00071 
00072 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines