GPLIB++
MTInvConf.cpp
Go to the documentation of this file.
1 //============================================================================
2 // Name : MTInvConf.cpp
3 // Author : Apr 8, 2010
4 // Version :
5 // Copyright : 2010, mmoorkamp
6 //============================================================================
7 
8 
9 #include "MTInvConf.h"
10 #include <boost/program_options.hpp>
11 
12 namespace gplib
13  {
14  namespace po = boost::program_options;
16  {
17  }
18 
20  {
21  }
22 
23 
24 
25  void MTInvConf::GetData(std::ifstream &instream)
26  {
27  po::options_description desc("MT inversion options");
28  desc.add_options()("mtinputdata", po::value<std::string>(&mtinputdata),
29  "The name of the MT data file")("mtfit", po::value<std::string>(
30  &mtfit)->default_value("berd"), "The type of data to fit")(
31  "mode",
32  po::value<std::string>(&mode)->default_value("xy"),
33  "The mode xy or yx to fit")(
34  "mtfitexponent", po::value<int>(&mtfitexponent)->default_value(2),
35  "The exponent in the misfit functional")("tensorerror",
36  po::value<double>(&tensorerror)->default_value(0.02),
37  "The error floor for fitting tensor data")(
38  "reserror", po::value<double>(&reserror)->default_value(0.02),
39  "The error floor for fitting apperent resistivity data")(
40  "phaseerror", po::value<double>(&phaseerror)->default_value(0.02),
41  "The error floor for fitting phase data");
42 
43  po::variables_map vm;
44  po::store(po::parse_config_file(instream, desc, true), vm);
45  po::notify(vm);
46 
47  }
48 
49  }
double reserror
Definition: MTInvConf.h:23
double tensorerror
Definition: MTInvConf.h:22
double phaseerror
Definition: MTInvConf.h:24
virtual ~MTInvConf()
Definition: MTInvConf.cpp:19
void GetData(std::ifstream &instream)
Definition: MTInvConf.cpp:25
std::string mtfit
Definition: MTInvConf.h:27
std::string mode
Definition: MTInvConf.h:26
std::string mtinputdata
Definition: MTInvConf.h:28