Skip to content
Snippets Groups Projects
Commit 34efbc71 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

cleanup

parent 30655922
No related branches found
No related tags found
No related merge requests found
// $Id: Box.cpp,v 1.50 2008-03-23 21:42:56 geuzaine Exp $ // $Id: Box.cpp,v 1.51 2008-04-13 18:52:51 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -80,31 +80,25 @@ int GMSHBOX(int argc, char *argv[]) ...@@ -80,31 +80,25 @@ int GMSHBOX(int argc, char *argv[])
new GModel; new GModel;
OpenProject(CTX.filename); OpenProject(CTX.filename);
if(gmsh_yyerrorstate) for(unsigned int i = 1; i < CTX.files.size(); i++)
ParUtil::Instance()->Abort(); MergeFile(CTX.files[i].c_str());
else { if(CTX.bgm_filename) {
for(unsigned int i = 1; i < CTX.files.size(); i++) MergeFile(CTX.bgm_filename);
MergeFile(CTX.files[i].c_str()); if(PView::list.size())
if(CTX.bgm_filename) { GModel::current()->getFields()->set_background_mesh(PView::list.size() - 1);
MergeFile(CTX.bgm_filename); else
if(PView::list.size()) fprintf(stderr, ERROR_STR "Invalid background mesh (no view)\n");
GModel::current()->getFields()->set_background_mesh(PView::list.size() - 1);
else
fprintf(stderr, ERROR_STR "Invalid background mesh (no view)\n");
}
if(CTX.batch > 0) {
GModel::current()->mesh(CTX.batch);
CreateOutputFile(CTX.output_filename, CTX.mesh.format);
}
else if(CTX.batch == -1)
CreateOutputFile(CTX.output_filename, FORMAT_GEO);
ParUtil::Instance()->Barrier(__LINE__, __FILE__);
return 1;
} }
if(CTX.batch > 0) {
GModel::current()->mesh(CTX.batch);
CreateOutputFile(CTX.output_filename, CTX.mesh.format);
}
else if(CTX.batch == -1)
CreateOutputFile(CTX.output_filename, FORMAT_GEO);
ParUtil::Instance()->Barrier(__LINE__, __FILE__); ParUtil::Instance()->Barrier(__LINE__, __FILE__);
GmshFinalize(); GmshFinalize();
return 1; return 1;
} }
......
// $Id: Main.cpp,v 1.126 2008-03-23 21:42:57 geuzaine Exp $ // $Id: Main.cpp,v 1.127 2008-04-13 18:52:51 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -78,34 +78,30 @@ int main(int argc, char *argv[]) ...@@ -78,34 +78,30 @@ int main(int argc, char *argv[])
if(CTX.batch) { if(CTX.batch) {
Msg(INFO, "'%s' started on %s", cmdline.c_str(), currtime.c_str()); Msg(INFO, "'%s' started on %s", cmdline.c_str(), currtime.c_str());
OpenProject(CTX.filename); OpenProject(CTX.filename);
if(gmsh_yyerrorstate) for(unsigned int i = 1; i < CTX.files.size(); i++)
exit(1); MergeFile(CTX.files[i].c_str());
else { if(CTX.post.combine_time)
for(unsigned int i = 1; i < CTX.files.size(); i++) PView::combine(true, 2, CTX.post.combine_remove_orig);
MergeFile(CTX.files[i].c_str()); if(CTX.bgm_filename) {
if(CTX.post.combine_time) MergeFile(CTX.bgm_filename);
PView::combine(true, 2, CTX.post.combine_remove_orig); if(PView::list.size())
if(CTX.bgm_filename) { GModel::current()->getFields()->set_background_mesh(PView::list.size() - 1);
MergeFile(CTX.bgm_filename); else
if(PView::list.size()) Msg(GERROR, "Invalid background mesh (no view)");
GModel::current()->getFields()->set_background_mesh(PView::list.size() - 1);
else
Msg(GERROR, "Invalid background mesh (no view)");
}
if(CTX.batch == 4) {
AdaptMesh(GModel::current());
CreateOutputFile(CTX.output_filename, CTX.mesh.format);
}
else if(CTX.batch > 0) {
GModel::current()->mesh(CTX.batch);
CreateOutputFile(CTX.output_filename, CTX.mesh.format);
}
else if(CTX.batch == -1)
CreateOutputFile(CTX.output_filename, FORMAT_GEO);
else if(CTX.batch == -2)
GModel::current()->checkMeshCoherence();
exit(0);
} }
if(CTX.batch == 4) {
AdaptMesh(GModel::current());
CreateOutputFile(CTX.output_filename, CTX.mesh.format);
}
else if(CTX.batch > 0) {
GModel::current()->mesh(CTX.batch);
CreateOutputFile(CTX.output_filename, CTX.mesh.format);
}
else if(CTX.batch == -1)
CreateOutputFile(CTX.output_filename, FORMAT_GEO);
else if(CTX.batch == -2)
GModel::current()->checkMeshCoherence();
exit(0);
} }
// Interactive Gmsh // Interactive Gmsh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment