Skip to content

Commit

Permalink
phasta convert fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
flagdanger committed Aug 7, 2024
1 parent a904f02 commit 77812e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion phasta/ph_convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ int main(int argc, char** argv)
M_release(sim_mesh);
postConvert(mesh);
mesh->writeNative(smb_path);
std::string restartPath = ph::setupOutputDir();
std::string restartPath = ph::setupOutputDir(mesh->getPCU());
ph::Input phIn;
phIn.openfile_read = openFileRead;
ph::Output phOut;
Expand Down
10 changes: 5 additions & 5 deletions test/convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,26 +120,26 @@ void getConfig(int argc, char** argv, pcu::PCU *pcu_obj) {
gmi_native_path = optarg;
break;
case '?':
if (!pcu_obj.get()->Self())
if (!pcu_obj->Self())
printf ("warning: skipping unrecognized option \'%s\'\n", argv[optind-1]);
break;
default:
if (!pcu_obj.get()->Self())
if (!pcu_obj->Self())
printf("Usage %s %s", argv[0], usage);
exit(EXIT_FAILURE);
}
}

if(argc-optind != 3) {
if (!pcu_obj.get()->Self())
if (!pcu_obj->Self())
printf("Usage %s %s", argv[0], usage);
exit(EXIT_FAILURE);
}
int i=optind;
gmi_path = argv[i++];
sms_path = argv[i++];
smb_path = argv[i++];
if (!pcu_obj.get()->Self()) {
if (!pcu_obj->Self()) {
printf ("fix_pyramids %d attach_order %d enable_log %d extruRootPath %s\n",
should_fix_pyramids, should_attach_order, should_log, extruRootPath);
printf ("native-model \'%s\' model \'%s\' simmetrix mesh \'%s\' output mesh \'%s\'\n",
Expand Down Expand Up @@ -359,7 +359,7 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
int* fatherIdPtr;
const int exists = EN_getDataPtr((pEntity)vrts[i],myFather,(void**)&fatherIdPtr);
if(!exists) {
if(!PCU_Comm_Self())
if(!simApfMesh->getPCU()->Self())
fprintf(stderr, "Error: father id data pointer does not exist... exiting\n");
exit(EXIT_FAILURE);
}
Expand Down

0 comments on commit 77812e5

Please sign in to comment.