GPLIB++
ResPkModel.h
Go to the documentation of this file.
1 #ifndef CRESPKMODEL_H
2 #define CRESPKMODEL_H
3 
4 #include <vector>
5 #include "SeismicModel.h"
6 
7 namespace gplib
8  {
9  /** \addtogroup seistools Seismic data analysis and modeling */
10  /* @{ */
11 
12  //! This class stores and writes model for the respktn 1D seismic code that we use for receiver function calculations
13  /*! Our joint inversion uses respktn from C. Ammon to calculate synthetics for receiver function inversion.
14  * This class stores the description of this model and provides methods to read such models, write such models
15  * and generate scripts that calculate synthetic for such a model.
16  *
17  */
18  class ResPkModel: public SeismicModel
19  {
20  public:
21  enum WaveType
22  {
24  };
25  private:
26  double slowness;
27  WaveType InputWave;
28  trealdata Strike;
29  trealdata Dip;
30  public:
32  {
33  InputWave = w;
34  }
35  //! Get the slowness in s/km for the synthetic forward calculation
36  double GetSlowness() const
37  {
38  return slowness;
39  }
40  //! Set the slowness in s/km for the synthetic forward calculation
41  void SetSlowness(const double s)
42  {
43  slowness = s;
44  }
45  //! Read-only access to the vector of Strikes in each layer
46  const trealdata &GetStrike() const
47  {
48  return Strike;
49  }
50  //! Read-write access to the vector of Strikes in each layer
51  trealdata &SetStrike()
52  {
53  return Strike;
54  }
55  //! Read-only access to the vector of Dips in each layer
56  const trealdata &GetDip() const
57  {
58  return Dip;
59  }
60  //! Read-write access to the vector of Dips in each layer
61  trealdata &SetDip()
62  {
63  return Dip;
64  }
65  //! Read the model in its native format from a file
66  virtual void ReadModel(const std::string filename);
67  //! Write the model in its native format to a file
68  virtual void WriteModel(const std::string filename);
69  //! Write out a script that performs a forward calculation for the current model
70  virtual void WriteRunFile(const std::string &filename);
71  ResPkModel();
72  ResPkModel(const int nlayers);
73  ResPkModel(const SeismicModel& source);
74  ResPkModel(const ResPkModel& source);
75  ResPkModel& operator=(const ResPkModel& source);
76  virtual ~ResPkModel();
77  };
78  /* @} */
79  }
80 #endif // CRESPKMODEL_H
virtual ~ResPkModel()
Definition: ResPkModel.cpp:16
virtual void ReadModel(const std::string filename)
Read the model in its native format from a file.
Definition: ResPkModel.cpp:92
virtual void WriteRunFile(const std::string &filename)
Write out a script that performs a forward calculation for the current model.
Definition: ResPkModel.cpp:122
const trealdata & GetStrike() const
Read-only access to the vector of Strikes in each layer.
Definition: ResPkModel.h:46
trealdata & SetStrike()
Read-write access to the vector of Strikes in each layer.
Definition: ResPkModel.h:51
double GetSlowness() const
Get the slowness in s/km for the synthetic forward calculation.
Definition: ResPkModel.h:36
trealdata & SetDip()
Read-write access to the vector of Dips in each layer.
Definition: ResPkModel.h:61
The class SeismicModel is the base class for some of the model format for seismic codes...
Definition: SeismicModel.h:17
ResPkModel & operator=(const ResPkModel &source)
Definition: ResPkModel.cpp:41
void SetInputWave(WaveType w)
Definition: ResPkModel.h:31
virtual void WriteModel(const std::string filename)
Write the model in its native format to a file.
Definition: ResPkModel.cpp:55
const trealdata & GetDip() const
Read-only access to the vector of Dips in each layer.
Definition: ResPkModel.h:56
This class stores and writes model for the respktn 1D seismic code that we use for receiver function ...
Definition: ResPkModel.h:18
void SetSlowness(const double s)
Set the slowness in s/km for the synthetic forward calculation.
Definition: ResPkModel.h:41