GPLIB++
Iso1DMTObjective.cpp
Go to the documentation of this file.
1 #include "Iso1DMTObjective.h"
2 #include "Adaptors.h"
3 
4 namespace gplib
5  {
7  C1DMTObjective(LocalMTData)
8  {
9  }
10 
12  const Iso1DMTObjective& source)
13  {
14  if (this == &source)
15  return *this;
17  IsoMTSynth = source.IsoMTSynth;
18  return *this;
19  }
20 
22  C1DMTObjective(Old), IsoMTSynth(Old.IsoMTSynth)
23  {
24 
25  }
26 
28  {
29  }
30 
31  void Iso1DMTObjective::CalcSynthData(const ttranscribed &member)
32  {
33  const int nlayers = member.size() / 2; //the model has the format resistivity/thickness
34  // so the actual numer of layers is half the length
35  trealdata res(nlayers, 0);
36  trealdata thick(nlayers, 0);
37  transform(member.begin(), member.begin() + nlayers, res.begin(),
38  boost::bind(gplib::fopow<double, double>(), 10., _1)); //member contains log resistivity
39  // transform to normal resistivity
40  copy(member.begin() + nlayers, member.end(), thick.begin()); //copy thickness values
41  IsoMTSynth.SetThicknesses(thick); //set them in the MTSynth object for forward calculation
42  IsoMTSynth.SetResistivities(res);
43  IsoMTSynth.CalcSynthetic(); // do forward calculation
44  }
45  }
ublas::vector< double > ttranscribed
Definition: gentypes.h:21
Iso1DMTObjective & operator=(const Iso1DMTObjective &source)
The class MTStation is used to store the transfer functions and related information for a MT-site...
Definition: MTStation.h:17
void SetThicknesses(const trealdata &thick)
Read only access to the vector of layer thicknesses for the 1D model from top to bottom in km...
Iso1DMTObjective(const MTStation &LocalMTData)
virtual void CalcSynthetic()
Calculate the synthetic data given the previously set parameters.
C1DMTObjective & operator=(const C1DMTObjective &source)
void SetResistivities(const trealdata &res)
Read-write access to the vector of resistivities for the 1D model from top to bottom in Ohmm...
This class implements the forward calculation for a 1D isotropic MT model.
C1DMTObjective is the base class for MT misfit calculations from 1D models, it provides common functi...