Iso1DMTObjective.cpp

Go to the documentation of this file.
00001 #include "Iso1DMTObjective.h"
00002 #include "Adaptors.h"
00003 
00004 namespace gplib
00005   {
00006     Iso1DMTObjective::Iso1DMTObjective(const MTStation &LocalMTData) :
00007       C1DMTObjective(LocalMTData)
00008       {
00009       }
00010 
00011     Iso1DMTObjective& Iso1DMTObjective::operator=(
00012         const Iso1DMTObjective& source)
00013       {
00014         if (this == &source)
00015           return *this;
00016         C1DMTObjective::operator=(source);
00017         IsoMTSynth = source.IsoMTSynth;
00018         return *this;
00019       }
00020 
00021     Iso1DMTObjective::Iso1DMTObjective(const Iso1DMTObjective &Old) :
00022       C1DMTObjective(Old), IsoMTSynth(Old.IsoMTSynth)
00023       {
00024 
00025       }
00026 
00027     Iso1DMTObjective::~Iso1DMTObjective()
00028       {
00029       }
00030 
00031     void Iso1DMTObjective::CalcSynthData(const ttranscribed &member)
00032       {
00033         const int nlayers = member.size() / 2; //the model has the format resistivity/thickness
00034         // so the actual numer of layers is half the length
00035         trealdata res(nlayers, 0);
00036         trealdata thick(nlayers, 0);
00037         transform(member.begin(), member.begin() + nlayers, res.begin(),
00038             boost::bind(gplib::fopow<double, double>(), 10., _1)); //member contains log resistivity
00039         // transform to normal resistivity
00040         copy(member.begin() + nlayers, member.end(), thick.begin()); //copy thickness values
00041         IsoMTSynth.SetThicknesses(thick); //set them in the MTSynth object for forward calculation
00042         IsoMTSynth.SetResistivities(res);
00043         IsoMTSynth.GetData(); // do forward calculation
00044       }
00045   }

Generated on Tue Nov 3 13:24:14 2009 for GPLIB++ by  doxygen 1.5.8