GPLIB++
AnisoSurfaceWaveModel.h
Go to the documentation of this file.
1 #ifndef ANISOSURFACEWAVEMODEL_H_
2 #define ANISOSURFACEWAVEMODEL_H_
3 
4 #include "types.h"
5 #include <string>
6 
7 namespace gplib
8  {
9  /** \addtogroup seistools Seismic data analysis and modeling */
10  /* @{ */
11 
12  //! A class to store information about anisotropic surface wave models
13  /*! This class stores 1D anisotropic seismic models. At the moment
14  * we use these models to calculate surface waves with AnisoSurfaceWaveSynthetic,
15  * but in general it can be used for other seismic methods as well.
16  */
17 
19  {
20  private:
21  //! The thickness of each layer in km
22  trealdata thicknesses;
23  //! The P-wave velocity of each layer in km/s
24  trealdata vp;
25  //! The S-wave velocity of each layer in km/s
26  trealdata vs;
27  //! The apparent S-wave velocity of each layer in km/s
28  trealdata vsapp;
29  //three anisotropy coefficients
30  trealdata Temp; // Temporary coefficient (-/+B)
31  trealdata Temp2; // another temporary coefficient
32  trealdata B;
33  trealdata C;
34  trealdata E;
35  trealdata anisoS;
36  //and two anisotropy angles
37  trealdata theta;
38  trealdata phi;
39  trealdata angle1;
40  //! The density of each layer in g/cm^3
41  trealdata densities;
42  public:
43  //! Get read-only access to the vector of layer thicknesses in km
44  const trealdata &GetThicknesses() const
45  {
46  return thicknesses;
47  }
48  //! Get read-only access to the vector of P-wave velocities in km/s
49  const trealdata &GetVp() const
50  {
51  return vp;
52  }
53  //! Get read-only access to the vector of S-wave velocities in km/s
54  const trealdata &GetVs() const
55  {
56  return vs;
57  }
58  //! Get read-only access to the vector of apparent S-wave velocities in km/s
59  const trealdata &GetVsapp() const
60  {
61  return vsapp;
62  }
63  //! Get read-only access to the vector of S-wave velocities in km/s
64  const trealdata &GetAngle1() const
65  {
66  return angle1;
67  }
68  //! Get read-only access to the vector of anisotropy coefficients for each layer
69  const trealdata &GetB() const
70  {
71  return B;
72  }
73  //! Get read-only access to the vector of anisotropy coefficients for each layer
74  const trealdata &GetTemp() const
75  {
76  return Temp;
77  }
78  const trealdata &GetTemp2() const
79  {
80  return Temp2;
81  }
82  //! Get read-only access to the vector of anisotropy coefficients for each layer
83  const trealdata &GetC() const
84  {
85  return C;
86  }
87  //! Get read-only access to the vector of anisotropy coefficients for each layer
88  const trealdata &GetE() const
89  {
90  return E;
91  }
92  //! Get read-only access to the vector of anisotropy coefficients for each layer
93  const trealdata &GetAnisoS() const
94  {
95  return anisoS;
96  }
97  //! Get read-only access to the vector of anisotropy angles theta for each layer
98  const trealdata &GetTheta() const
99  {
100  return theta;
101  }
102  //! Get read-only access to the vector of anisotropy angles phi for each layer
103  const trealdata &GetPhi() const
104  {
105  return phi;
106  }
107  //! Get read-only access to the vector densities for each layer
108  const trealdata &GetDensities() const
109  {
110  return densities;
111  }
112  //! Set the vector of layer thicknesses in km
113  trealdata &SetThicknesses()
114  {
115  return thicknesses;
116  }
117  //! Set the vector of P-wave velocities in km/s
118  trealdata &SetVp()
119  {
120  return vp;
121  }
122  //! Set the vector of S-wave velocities in km/s
123  trealdata &SetVs()
124  {
125  return vs;
126  }
127  //! Set the vector of S-wave velocities in km/s
128  trealdata &SetVsapp()
129  {
130  return vsapp;
131  }
132  //! Set the vector of S-wave velocities in km/s
133  trealdata &SetAngle1()
134  {
135  return angle1;
136  }
137  //! Set the vector of anisotropy coefficients B
138  trealdata &SetB()
139  {
140  return B;
141  }
142  //! Set the vector of temporary coefficient Temp
143  trealdata &SetTemp()
144  {
145  return Temp;
146  }
147  //! Set the vector of temporary coefficient Temp2
148  trealdata &SetTemp2()
149  {
150  return Temp2;
151  }
152  //! Set the vector of anisotropy coefficients C
153  trealdata &SetC()
154  {
155  return C;
156  }
157  //! Set the vector of anisotropy coefficients E
158  trealdata &SetE()
159  {
160  return E;
161  }
162  //! Set the vector of anisotropy coefficients E
163  trealdata &SetAnisoS()
164  {
165  return anisoS;
166  }
167  //! Set the vector of anisotropy angles theta
168  trealdata &SetTheta()
169  {
170  return theta;
171  }
172  //! Set the vector of anisotropy angles phi
173  trealdata &SetPhi()
174  {
175  return phi;
176  }
177  //! Set the vector of densities
178  trealdata &SetDensities()
179  {
180  return densities;
181  }
182  //! Read the model information from an ascii file with name filename
183  void ReadModel(const std::string &filename);
184  //! Write the model to a file with name filename
185  void WriteModel(const std::string &filename) const;
186  //! Write out a script that computes synthetic data for a model with name filename+.dat
187  void WriteRunFile(const std::string &filename) const;
188  //!Write out an ascii file for plotting the model with xmgrace
189  void WritePlot(const std::string &filename) const;
190  //we use the compiler generated copy constructor and operator
192  virtual ~AnisoSurfaceWaveModel();
193  };
194  /* @} */
195  }
196 #endif /*ANISOSURFACEWAVEMODEL_H_*/
trealdata & SetE()
Set the vector of anisotropy coefficients E.
A class to store information about anisotropic surface wave models.
trealdata & SetThicknesses()
Set the vector of layer thicknesses in km.
const trealdata & GetAnisoS() const
Get read-only access to the vector of anisotropy coefficients for each layer.
const trealdata & GetC() const
Get read-only access to the vector of anisotropy coefficients for each layer.
trealdata & SetPhi()
Set the vector of anisotropy angles phi.
const trealdata & GetTemp() const
Get read-only access to the vector of anisotropy coefficients for each layer.
const trealdata & GetThicknesses() const
Get read-only access to the vector of layer thicknesses in km.
const trealdata & GetB() const
Get read-only access to the vector of anisotropy coefficients for each layer.
trealdata & SetVp()
Set the vector of P-wave velocities in km/s.
const trealdata & GetTemp2() const
const trealdata & GetPhi() const
Get read-only access to the vector of anisotropy angles phi for each layer.
void WriteModel(const std::string &filename) const
Write the model to a file with name filename.
const trealdata & GetVp() const
Get read-only access to the vector of P-wave velocities in km/s.
trealdata & SetTemp()
Set the vector of temporary coefficient Temp.
const trealdata & GetVs() const
Get read-only access to the vector of S-wave velocities in km/s.
trealdata & SetB()
Set the vector of anisotropy coefficients B.
const trealdata & GetTheta() const
Get read-only access to the vector of anisotropy angles theta for each layer.
const trealdata & GetAngle1() const
Get read-only access to the vector of S-wave velocities in km/s.
const trealdata & GetE() const
Get read-only access to the vector of anisotropy coefficients for each layer.
trealdata & SetC()
Set the vector of anisotropy coefficients C.
void ReadModel(const std::string &filename)
Read the model information from an ascii file with name filename.
trealdata & SetAnisoS()
Set the vector of anisotropy coefficients E.
void WriteRunFile(const std::string &filename) const
Write out a script that computes synthetic data for a model with name filename+.dat.
trealdata & SetDensities()
Set the vector of densities.
trealdata & SetTemp2()
Set the vector of temporary coefficient Temp2.
void WritePlot(const std::string &filename) const
Write out an ascii file for plotting the model with xmgrace.
trealdata & SetAngle1()
Set the vector of S-wave velocities in km/s.
trealdata & SetVsapp()
Set the vector of S-wave velocities in km/s.
const trealdata & GetDensities() const
Get read-only access to the vector densities for each layer.
trealdata & SetVs()
Set the vector of S-wave velocities in km/s.
trealdata & SetTheta()
Set the vector of anisotropy angles theta.
const trealdata & GetVsapp() const
Get read-only access to the vector of apparent S-wave velocities in km/s.