diff --git a/.gitignore b/.gitignore index a49a0a6..adfdfb0 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,5 @@ *.app build/ -.DS_Store \ No newline at end of file +.DS_Store +.vscode/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9c00106 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,80 @@ +{ + "files.associations": { + "__bit_reference": "cpp", + "__bits": "cpp", + "__config": "cpp", + "__debug": "cpp", + "__errc": "cpp", + "__hash_table": "cpp", + "__locale": "cpp", + "__mutex_base": "cpp", + "__node_handle": "cpp", + "__nullptr": "cpp", + "__split_buffer": "cpp", + "__string": "cpp", + "__threading_support": "cpp", + "__tree": "cpp", + "__tuple": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "chrono": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "complex": "cpp", + "concepts": "cpp", + "condition_variable": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "exception": "cpp", + "initializer_list": "cpp", + "ios": "cpp", + "iosfwd": "cpp", + "istream": "cpp", + "limits": "cpp", + "locale": "cpp", + "map": "cpp", + "memory": "cpp", + "mutex": "cpp", + "new": "cpp", + "numbers": "cpp", + "numeric": "cpp", + "optional": "cpp", + "ostream": "cpp", + "queue": "cpp", + "random": "cpp", + "ratio": "cpp", + "semaphore": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "thread": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "typeinfo": "cpp", + "unordered_map": "cpp", + "variant": "cpp", + "vector": "cpp", + "*.tcc": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory_resource": "cpp", + "utility": "cpp", + "stop_token": "cpp" + } +} \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 357a1af..bd30812 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,7 +51,7 @@ DeltaT, DeltaTx, DeltaTy, DeltaTz, Hax, Hay and Za for magnetic data.", &noise_para, &forward_type, &mag_field_para, &dimension, &logfile_name}); if (logfile_name == "NULL") logfile_name = "gm3d.history.txt"; if (in_mshname != "NULL") build_model = false; - if (!fp.set_opt('r')) remove_null = true; + if (fp.set_opt('r')) remove_null = true; // 查看是否通过强制参数检查 if (!fp.pass_mandatory()) return 0; @@ -60,7 +60,7 @@ DeltaT, DeltaTx, DeltaTy, DeltaTz, Hax, Hay and Za for magnetic data.", if (build_model) { gm3d_instance.BuildRegularGrid(dimension.c_str()); - gm3d_instance.AddModels(modelname.c_str()); + if (modelname != "NULL") gm3d_instance.AddModels(modelname.c_str()); gm3d_instance.RegisteredOuput(remove_null); gm3d_instance.OutMshFile(out_mshname.c_str(), elename); }