Skip to content

Commit da146de

Browse files
committed
mner: specify model on command line
1 parent 65f661a commit da146de

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

test/matchedNodeElmReader.cc

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -732,9 +732,10 @@ int main(int argc, char** argv)
732732
PCU_Comm_Init();
733733
lion_set_verbosity(1);
734734
int noVerify=0; // maintain default of verifying if not explicitly requesting it off
735-
if( argc < 10 ) {
735+
if( argc < 11 ) {
736736
if( !PCU_Comm_Self() ) {
737-
printf("Usage: %s <ascii mesh connectivity .cnn> "
737+
printf("Usage: %s <input dmg model> "
738+
"<ascii mesh connectivity .cnn> "
738739
"<ascii vertex coordinates .crd> "
739740
"<ascii vertex matching flag .match> "
740741
"<ascii vertex classification flag .class> "
@@ -755,7 +756,7 @@ int main(int argc, char** argv)
755756

756757
double t0 = PCU_Time();
757758
MeshInfo m;
758-
readMesh(argv[1],argv[2],argv[3],argv[4],argv[5],argv[6],argv[7],m);
759+
readMesh(argv[2],argv[3],argv[4],argv[5],argv[6],argv[7],argv[8],m);
759760

760761
bool isMatched = true;
761762
if( !strcmp(argv[3], "NULL") )
@@ -764,9 +765,7 @@ int main(int argc, char** argv)
764765
if(!PCU_Comm_Self())
765766
fprintf(stderr, "isMatched %d\n", isMatched);
766767

767-
//gmi_model* model = gmi_load(".null");
768-
gmi_model* model = gmi_load("outModelr.dmg");
769-
// gmi_model* model = apf::makeMdsBox(2,2,2,1,1,1,0);
768+
gmi_model* model = gmi_load(argv[1]);
770769
apf::Mesh2* mesh = apf::makeEmptyMdsMesh(model, m.dim, isMatched);
771770
apf::GlobalToVert outMap;
772771
PCU_Debug_Open();
@@ -786,17 +785,6 @@ int main(int argc, char** argv)
786785
}
787786
apf::MeshTag* tc = setMappedTag(mesh, "classification", m.classification, 1,
788787
m.localNumVerts, outMap);
789-
{ //debug - some verts don't have the classification tag...
790-
apf::MeshEntity* v;
791-
apf::MeshIterator* verts = mesh->begin(0);
792-
int i=0;
793-
while ((v = mesh->iterate(verts))) {
794-
if(!mesh->hasTag(v,tc)) {
795-
PCU_Debug_Print("%d missing tag\n", i);
796-
}
797-
i++;
798-
}
799-
}
800788
setClassification(model,mesh,tc);
801789
apf::removeTagFromDimension(mesh, tc, 0);
802790
mesh->destroyTag(tc);
@@ -836,9 +824,9 @@ int main(int argc, char** argv)
836824
if(noVerify != 1) mesh->verify();
837825

838826
outMap.clear();
839-
gmi_write_dmg(model, argv[8]);
827+
gmi_write_dmg(model, argv[9]);
840828
apf::writeVtkFiles("rendered",mesh);
841-
mesh->writeNative(argv[9]);
829+
mesh->writeNative(argv[10]);
842830
if(noVerify != 1) mesh->verify();
843831

844832
mesh->destroyNative();

0 commit comments

Comments
 (0)