rm main.cpp
This commit is contained in:
parent
266169698e
commit
7a44ac39ea
@ -498,3 +498,35 @@ void magtet::routine(const char *para_file)
|
||||
RUN_ECHO(write_text(gopt_.get_value(OBSFILE)), "Writing outputs");
|
||||
return;
|
||||
}
|
||||
|
||||
// Here starts the main function
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
if (argc == 1)
|
||||
{
|
||||
std::clog << "Magnetic gradient tensors of homologous tetrahedrons.\n";
|
||||
std::clog << "Usage: ./magtet <para-file>\n";
|
||||
std::clog << "Option format:\n";
|
||||
std::clog << "<option> = <value>\n";
|
||||
std::clog << "Available options:\n";
|
||||
std::clog << "tet-file: 3D model file. this option needs both .node and .ele files generated by Tetgen. No file extension is needed\n";
|
||||
std::clog << "mag-file: magnetization vectors. Line format: <magz-x> <magz-y> <magz-z>\n";
|
||||
std::clog << "site-file: observation points. format1: <filename> format2: <xmin>/<xmax>/<ymin>/<ymax>/<z>/<xnum>/<ynum>\n";
|
||||
std::clog << "site-file: line format: <x> <y> <z>\n";
|
||||
std::clog << "obs-file: output observation files. No file extension is needed\n";
|
||||
std::clog << "cal-type: available calculating types: potential, gradient and tensor\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// declare a new object
|
||||
magtet mt;
|
||||
mt.routine(argv[1]);
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
32
src/main.cpp
32
src/main.cpp
@ -1,32 +0,0 @@
|
||||
#include "magtet.h"
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
if (argc == 1)
|
||||
{
|
||||
std::clog << "Magnetic gradient tensors of homologous tetrahedrons.\n";
|
||||
std::clog << "Usage: ./magtet <para-file>\n";
|
||||
std::clog << "Option format:\n";
|
||||
std::clog << "<option> = <value>\n";
|
||||
std::clog << "Available options:\n";
|
||||
std::clog << "tet-file: 3D model file. this option needs both .node and .ele files generated by Tetgen. No file extension is needed\n";
|
||||
std::clog << "mag-file: magnetization vectors. Line format: <magz-x> <magz-y> <magz-z>\n";
|
||||
std::clog << "site-file: observation points. format1: <filename> format2: <xmin>/<xmax>/<ymin>/<ymax>/<z>/<xnum>/<ynum>\n";
|
||||
std::clog << "site-file: line format: <x> <y> <z>\n";
|
||||
std::clog << "obs-file: output observation files. No file extension is needed\n";
|
||||
std::clog << "cal-type: available calculating types: potential, gradient and tensor\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// declare a new object
|
||||
magtet mt;
|
||||
mt.routine(argv[1]);
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user