GPLIB++
Multi1DRecObjective.h
Go to the documentation of this file.
1 #ifndef MULTI1DRECOBJECTIVE_H_
2 #define MULTI1DRECOBJECTIVE_H_
3 
4 #include "PlottableObjective.h"
5 #include <vector>
6 #include "C1DRecObjective.h"
7 #include "AbsVelRecObjective.h"
8 #include <boost/shared_ptr.hpp>
9 
10 namespace gplib
11  {
12  //! This class is used to model several receiver functions simultaneously
14  {
15  private:
16  std::vector<boost::shared_ptr<C1DRecObjective> > Objectives;
17  public:
18  //! return a pointer to a copy of the current object
19  virtual Multi1DRecObjective *clone() const
20  {
21  return new Multi1DRecObjective(*this);
22  }
23  //! Set the start and end time in s for the part we want to fit
24  void SetTimeWindow(const double start, const double end);
25  //! Set Poisson's ratio to calculate P velocities from S-Velocities
26  void SetPoisson(const double ratio);
27  //! Add another reciever function to fit
28  void AddRecFunction(boost::shared_ptr<const SeismicDataComp> TheRecData,
29  int myshift, double mysigma, double myc,
30  double myslowness, RecCalc::trfmethod method,
31  double errorlevel, bool normalized, ResPkModel::WaveType InWave);
32  //! Add another receiver function with absolute velocity transformation
33  void AddAbsVelFunction(
34  boost::shared_ptr<const SeismicDataComp> TheRecData,
35  SurfaceWaveData &AbsVel, const int myshift, const double mysigma,
36  const double myc, const double myslowness,
37  const RecCalc::trfmethod method, const double errorlevel,
38  const bool normalized, const double absvelweight,
39  const double recweight);
40  //! The operations that have to be done before the parallel part
41  virtual void PreParallel(const ttranscribed &member);
42  //! The operations that have to be done after the parallel part
43  virtual double PostParallel(const ttranscribed &member);
44  //! The operations that safely can be done in parallel
45  virtual void SafeParallel(const ttranscribed &member);
46  //! Write out all the data, endings will be appended automatically
47  virtual void WriteData(const std::string &filename);
48  //! Write the current model to ascii file for calculations
49  void WriteModel(const std::string &filename);
50  //! Write the current model to ascii file for plotting
51  void WritePlot(const std::string &filename);
55  virtual ~Multi1DRecObjective();
56  };
57  }
58 #endif /*MULTI1DRECOBJECTIVE_H_*/
trfmethod
There are several ways to calculate receiver functions.
Definition: RecCalc.h:18
ublas::vector< double > ttranscribed
Definition: gentypes.h:21
void SetPoisson(const double ratio)
Set Poisson's ratio to calculate P velocities from S-Velocities.
void AddRecFunction(boost::shared_ptr< const SeismicDataComp > TheRecData, int myshift, double mysigma, double myc, double myslowness, RecCalc::trfmethod method, double errorlevel, bool normalized, ResPkModel::WaveType InWave)
Add another reciever function to fit.
virtual Multi1DRecObjective * clone() const
return a pointer to a copy of the current object
virtual void SafeParallel(const ttranscribed &member)
The operations that safely can be done in parallel.
void AddAbsVelFunction(boost::shared_ptr< const SeismicDataComp > TheRecData, SurfaceWaveData &AbsVel, const int myshift, const double mysigma, const double myc, const double myslowness, const RecCalc::trfmethod method, const double errorlevel, const bool normalized, const double absvelweight, const double recweight)
Add another receiver function with absolute velocity transformation.
This only adds a few plotting functions to GeneralObjective to define a common interface.
void WriteModel(const std::string &filename)
Write the current model to ascii file for calculations.
This class is used to model several receiver functions simultaneously.
virtual void PreParallel(const ttranscribed &member)
The operations that have to be done before the parallel part.
A class to read, write and store fundamental mode surface wave dispersion data.
Multi1DRecObjective & operator=(const Multi1DRecObjective &source)
void WritePlot(const std::string &filename)
Write the current model to ascii file for plotting.
virtual void WriteData(const std::string &filename)
Write out all the data, endings will be appended automatically.
virtual double PostParallel(const ttranscribed &member)
The operations that have to be done after the parallel part.
void SetTimeWindow(const double start, const double end)
Set the start and end time in s for the part we want to fit.