GPLIB++
MTRoughness.cpp
Go to the documentation of this file.
1 #include "MTRoughness.h"
2 
3 namespace gplib
4  {
6  {
7  }
8 
10  {
11  }
12 
14  {
15  const unsigned int length = member.size() / 3; //we have 3 parameters in the model, so size/3 layers
16  double roughness = 0; // init returnvalue
17  const int fitexp = GetFitExponent();
18 
19  for (unsigned int i = 1; i < length; ++i) // for all layers except the top
20  {
21  roughness += std::pow((member(i) - member(i - 1)), fitexp); // add the squared difference of the values divided by reference
22  }
23  SetRMS(roughness);
24  }
25 
27  {
28  return GetRMS();
29  }
30 
32  GeneralObjective(Old)
33  {
34 
35  }
37  {
38  if (this == &source)
39  return *this;
41  return *this;
42  }
43  }
Calculate the roughness for the MT part of a joint MT-seismic model as used by 1dinvga.
Definition: MTRoughness.h:7
ublas::vector< double > ttranscribed
Definition: gentypes.h:21
virtual double PostParallel(const ttranscribed &member)
Some operations cannot be done in parallel, these are done after, returns the misfit value...
Definition: MTRoughness.cpp:26
GeneralObjective & operator=(const GeneralObjective &source)
int GetFitExponent()
Get the Fit exponent.
double GetRMS()
Get the current RMS.
virtual void SafeParallel(const ttranscribed &member)
The core performance calculation, has to be safe to be done in parallel.
Definition: MTRoughness.cpp:13
The basic object for any objective function, mainly an interface class and some storage.
MTRoughness & operator=(const MTRoughness &source)
Definition: MTRoughness.cpp:36
void SetRMS(const double x)
virtual ~MTRoughness()
Definition: MTRoughness.cpp:9