gctl_toolkits/archive/gmshinfo/main.cpp
2024-09-10 20:25:18 +08:00

34 lines
626 B
C++

#include "func.h"
void disp_help()
{
cout<<"gmshinfo 0.1 - inspect a Gmsh .msh file and show relative infomation"<<endl<<endl
<<"syntax: gmshinfo <filename> [filename ...]"<<endl
<<" The program takes at least one filename for the input information, and it only support ASCII format."<<endl;
}
int main(int argc, char* argv[])
{
char* filename;
if (argc == 1)
{
disp_help();
}
else
{
for (int i = 1; i < argc; ++i)
{
MshInfo meshone;
filename = argv[i];
meshone.init();
if(!meshone.readmsh(filename))
{
meshone.relese_node_id();
meshone.showinfo();
}
}
}
return 0;
}