diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9f13a3f2a..99bb8c571 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -60,9 +60,6 @@ endif() util_exe_func(render render.cc) util_exe_func(renderClass renderClass.cc) util_exe_func(render_ascii render_ascii.cc) -if(ENABLE_VIZ) - test_exe_func(viz_test viz.cc) -endif() # Aniso statistic ans size-field visualization utilities util_exe_func(measureAnisoStats measureAnisoStats.cc) diff --git a/test/viz.cc b/test/viz.cc deleted file mode 100644 index 58a122b5e..000000000 --- a/test/viz.cc +++ /dev/null @@ -1,110 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include "../viz/viz.h" - -namespace { - const char* modelFile = 0; - const char* meshFile = 0; - - void freeMesh(apf::Mesh* m) - { - m->destroyNative(); - apf::destroyMesh(m); - } - - void getConfig(int argc, char** argv) - { - PCU_ALWAYS_ASSERT(argc==3); - modelFile = argv[1]; - meshFile = argv[2]; - } - Color misColor(apf::Mesh* m) { - int neighborDim = m->getDimension()-1; - int misNumber = Parma_MisNumbering(m,neighborDim); - Color colors[9] = - {RED,BLUE,GREEN,PURPLE,ORANGE,YELLOW,BROWN,PINK,GREY}; - return colors[misNumber%9]; - } -} -int main(int argc, char** argv) -{ - int provided; - pcu::Init_thread(&argc,&argv,MPI_THREAD_MULTIPLE,&provided); - PCU_ALWAYS_ASSERT(provided==MPI_THREAD_MULTIPLE); - { - pcu::PCU PCUObj; - lion_set_verbosity(1); - gmi_register_mesh(); - getConfig(argc,argv); - apf::Mesh2* m = apf::loadMdsMesh(modelFile,meshFile,&PCUObj); - - - Visualization v; - - char output[128]; - snprintf(output,128,"%d",PCUObj.Self()); - std::string part_num(output); - - apf::MeshIterator* itr; - apf::MeshEntity* ent; - v.watchMesh(m); - v.breakpoint("The whole mesh"); - - for (int i=0;i<3;i++) { - v.watchDimension(m,2,misColor(m)); - v.watchDimension(m,0); - itr = m->begin(1); - while ((ent=m->iterate(itr))!=0) { - if (m->isShared(ent)) - v.watchEntity(m,ent); - - } - v.markPart(m,part_num); - snprintf(output,128,"Testing MIS %d",i); - v.breakpoint(std::string(output)); - } - - v.watchDimension(m,1,BYPART); - v.breakpoint(); - - Color c = misColor(m); - itr=m->begin(2); - int i=0; - while((ent=m->iterate(itr))!=0) { - if (i==0) - v.watchEntity(m,ent,c); - i++; - i%=3; - } - - v.breakpoint("Every third face"); - - itr = m->begin(0); - i=0; - while((ent=m->iterate(itr))!=0) { - if (i==0) - v.watchEntity(m,ent,BYPART); - i++; - i%=2; - } - v.breakpoint(); - - v.watchBoundary(m,1,BLACK); - itr = m->begin(2); - while ((ent=m->iterate(itr))!=0) { - if (m->isShared(ent)) - v.watchEntity(m,ent); - } - - v.showAxis(); - v.breakpoint("Part Boundaries"); - - freeMesh(m); - } - pcu::Finalize(); -}