13 string version =
"$Id: randaniso.cpp 1844 2010-04-12 11:34:25Z mmoorkamp $";
15 cout <<
"Program " << version << endl;
17 <<
"Generates completely random anisotropic models and writes their response "
25 const unsigned int nlayers = 15;
26 const unsigned int nmodels = 100;
27 const double minres = -1;
28 const double maxres = 3;
29 const double minthick = 10;
30 const double maxthick = 30;
31 const double minangle = 0;
32 const double maxangle = 90;
33 trealdata currthick(nlayers);
34 trealdata currrho1(nlayers);
35 trealdata currrho2(nlayers);
36 trealdata currstrike(nlayers);
37 trealdata zeros(nlayers);
38 for (
unsigned int i = 0; i < nlayers; ++i)
42 string mttfilename =
"out";
43 const float ten = 10.0;
45 for (
unsigned int i = 0; i < nmodels; ++i)
47 for (
unsigned int j = 0; j < nlayers; ++j)
49 currthick.at(j) = Random.
GetNumber(minthick, maxthick);
50 currrho1.at(j) = std::pow(ten, Random.
GetNumber(minres, maxres));
51 currrho2.at(j) = std::pow(ten, Random.
GetNumber(minres, maxres));
52 currstrike.at(j) = Random.
GetNumber(minangle, maxangle);
60 Synthetic.
WriteAsMtt(mttfilename + stringify(i));
64 cerr << e.what() << endl;
void SetRho1(const trealdata &a)
Set the first principal resistivity for each layer in Ohm.m.
void SetThicknesses(const trealdata &thick)
Set the thicknes in km.
virtual void GetData()
Calculate the synthetic data given the previously set parameters.
void SetRho2(const trealdata &a)
Set the second principal resistivity for each layer in Ohm.m.
Calculate response of a 1D anisotropic model, code is based on Pek and Santos fortran code...
void SetStrikes(const trealdata &a)
Set the anisotropy strike for each layer in degree.
void WriteAsMtt(const std::string filename)
Write data in goettingen .mtt format.
void SetDips(const trealdata &a)
Set the anisotropy dip for each layer in degree.
void SetSlants(const trealdata &a)
Set the anisotropy slant for each layer in degree.
void SetRho3(const trealdata &a)
Set the first principal resistivity for each layer in Ohm.m.
The basic exception class for all errors that arise in gplib.