12 #include "VectorOptions.h"
13 #include <boost/program_options.hpp>
15 #include <boost/tokenizer.hpp>
20 using namespace boost::program_options;
33 DummyVec<double> Test;
35 options_description desc(
"Joint inversion options");
36 desc.add_options()(
"outputbase", value<std::string> (&outputbase),
37 "The start of the name of the output files")(
"verbose", value(
38 &verbose)->default_value(
false),
"")(
"poisson", value<double> (
39 &poisson),
"Poisson's ration")(
"usevrefmodel",
40 value(&usevrefmodel)->default_value(
false),
"")(
"vrefmodel", value(
41 &vrefmodel),
"")(
"thickbase", value<DummyVec<double> > (),
"")(
42 "thickstep", value<DummyVec<double> > (),
"")(
"thicksizes", value<
43 DummyVec<int> > (),
"")(
"resbase", value<DummyVec<double> > (),
"")(
44 "resstep", value<DummyVec<double> > (),
"")(
"ressizes", value<
45 DummyVec<int> > (),
"")(
"svelbase", value<DummyVec<double> > (),
"")(
46 "svelstep", value<DummyVec<double> > (),
"")(
"svelsizes", value<
47 DummyVec<int> > (),
"")(
"weights", value<DummyVec<double> > (),
"");
50 store(parse_config_file(instream, desc,
true), vm);
53 if (vm.count(
"thickbase"))
55 thickbase = vm[
"thickbase"].as<DummyVec<double> > ().VecVal;
57 if (vm.count(
"thickstep"))
59 thickstep = vm[
"thickstep"].as<DummyVec<double> > ().VecVal;
61 if (vm.count(
"thicksizes"))
63 thicksizes = vm[
"thicksizes"].as<DummyVec<int> > ().VecVal;
66 if (vm.count(
"resbase"))
68 resbase = vm[
"resbase"].as<DummyVec<double> > ().VecVal;
70 if (vm.count(
"resstep"))
72 resstep = vm[
"resstep"].as<DummyVec<double> > ().VecVal;
74 if (vm.count(
"ressizes"))
76 ressizes = vm[
"ressizes"].as<DummyVec<int> > ().VecVal;
79 if (vm.count(
"svelbase"))
81 svelbase = vm[
"svelbase"].as<DummyVec<double> > ().VecVal;
83 if (vm.count(
"svelstep"))
85 svelstep = vm[
"svelstep"].as<DummyVec<double> > ().VecVal;
87 if (vm.count(
"svelsizes"))
89 svelsizes = vm[
"svelsizes"].as<DummyVec<int> > ().VecVal;
92 if (vm.count(
"weights"))
94 weights = vm[
"weights"].as<DummyVec<double> > ().VecVal;
void GetData(std::ifstream &instream)