2 #include <boost/bind.hpp>
5 #include <boost/shared_ptr.hpp>
25 MeasuredData = source.MeasuredData;
26 SynthData = source.SynthData;
27 Synthetic = source.Synthetic;
28 errorlevel = source.errorlevel;
29 poisson = source.poisson;
35 Old.SynthData), Synthetic(Old.Synthetic)
37 errorlevel = Old.errorlevel;
38 poisson = Old.poisson;
47 const unsigned int nfulllayers = member.size() / 2;
49 ttranscribed thickness(nfulllayers), velocity(nfulllayers);
50 copy(member.begin(), member.begin() + nfulllayers, thickness.begin());
51 copy(member.begin() + nfulllayers, member.begin() + 2 * nfulllayers,
54 copy(thickness.begin(), thickness.end(), back_inserter(
57 copy(velocity.begin(), velocity.end(), back_inserter(
59 copy(velocity.begin(), velocity.end(), back_inserter(
62 transform(velocity.begin(), velocity.end(), back_inserter(
65 transform(velocity.begin(), velocity.end(), back_inserter(
71 fill_n(back_inserter(Model.
SetEta()), nfulllayers, 1.0);
72 fill_n(back_inserter(Model.
SetQmu()), nfulllayers, 100.0);
73 fill_n(back_inserter(Model.
SetQkappa()), nfulllayers, 99999.00);
93 assert(errorlevel > 1e-4);
99 double returnvalue = 0;
101 for (
unsigned int i = 0; i < ndata; ++i)
const trealdata & GetPeriods() const
Read-only access to the vector of periods for the phase velocities.
ublas::vector< double > ttranscribed
void PreParallel(const std::string &filename)
For a parallel execution, these are things that have to be done before any parallel block...
const trealdata & GetPhVelocities() const
SurfaceWaveData SafeParallel(const std::string &filename)
Operations that are safe to perform in parallel.
trealdata & SetDensities()
Calculate density from a given S-velocity, the formula is taken from Owen et al. JGR 89...
This class can write files specific for the synthetic surface wave codes that are part of the compute...
This only adds a few plotting functions to GeneralObjective to define a common interface.
This class calculates the misfit between observed surface wave dispersion data and the data calculate...
const trealdata & GetPhaseVelocities() const
Read-only access to the vector of phase velocities.
void SetCalculationPeriods(const trealdata &c)
Set the vector of periods in s for which we want to calculate phase velocities.
virtual double PostParallel(const ttranscribed &member)
Some operations cannot be done in parallel, these are done after, returns the misfit value...
A class to read, write and store fundamental mode surface wave dispersion data.
virtual ~SurfaceWaveObjective()
int GetFitExponent()
Get the Fit exponent.
trealdata & SetShVelocities()
double CalcMisfit(const double measured, const double predicted, const double measerror, const double errorlevel, const int index)
SurfaceWaveObjective & operator=(const SurfaceWaveObjective &source)
trealdata & SetSvVelocities()
const std::string & GetParallelID()
Derived classes need to read the ParallelId for their forward calculations.
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.
void SetModel(const Sdisp96Model &m)
Set the model for which we want to calculate the data.
const trealdata & GetCalculationPeriods() const
Get the vector of periods in s for which we want to calculate phase velocities.
tdata & SetSynthData()
Only derived classes can write access the Synthetic data.
SurfaceWaveObjective(const SurfaceWaveObjective &Old)
tmisfit & SetMisfit()
Only derived classes can write access the Misfit.
trealdata & SetThicknesses()
trealdata & SetPvVelocities()
PlottableObjective & operator=(const PlottableObjective &source)
virtual void PreParallel(const ttranscribed &member)
Some operations cannot be done in parallel, these are done before.
void SetRMS(const double x)
trealdata & SetPhVelocities()