RSTT  3.2.0
Regional Seismic Travel Time
All Classes Namespaces Files Functions Variables Typedefs Friends Macros
LayerProfile.h
Go to the documentation of this file.
1 //- ****************************************************************************
2 //-
3 //- Copyright 2009 National Technology & Engineering Solutions of Sandia, LLC
4 //- (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
5 //- Government retains certain rights in this software.
6 //-
7 //- BSD Open Source License
8 //- All rights reserved.
9 //-
10 //- Redistribution and use in source and binary forms, with or without
11 //- modification, are permitted provided that the following conditions are met:
12 //-
13 //- 1. Redistributions of source code must retain the above copyright notice,
14 //- this list of conditions and the following disclaimer.
15 //-
16 //- 2. Redistributions in binary form must reproduce the above copyright
17 //- notice, this list of conditions and the following disclaimer in the
18 //- documentation and/or other materials provided with the distribution.
19 //-
20 //- 3. Neither the name of the copyright holder nor the names of its
21 //- contributors may be used to endorse or promote products derived from
22 //- this software without specific prior written permission.
23 //-
24 //- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 //- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 //- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 //- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28 //- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 //- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 //- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 //- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 //- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 //- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 //- POSSIBILITY OF SUCH DAMAGE.
35 //-
36 //- ****************************************************************************
37 
38 #ifndef LayerProfile_H
39 #define LayerProfile_H
40 
41 // **** _SYSTEM INCLUDES_ ******************************************************
42 
43 using namespace std;
44 
45 // **** _LOCAL INCLUDES_ *******************************************************
46 
47 #include "SLBMGlobals.h"
48 #include "InterpolatedProfile.h"
49 
50 // **** _BEGIN SLBM NAMESPACE_ **************************************************
51 
52 namespace slbm {
53 
54 class GreatCircle;
55 
76 {
77 
78 public:
79 
86  LayerProfile(GreatCircle* greatCircle, Location& location);
87 
92 
97 
102 
106  bool operator==(const LayerProfile& other);
107 
111  bool operator!=(const LayerProfile& other) {return ! (*this == other);};
112 
118  int nIntervals() { return 1; };
119 
125  double getRadius() { return radius; };
126 
132  double getVelocity() { return velocity; };
133 
140  virtual double getGradient() { return NA_VALUE; };
141 
142  virtual size_t memSize();
143 
144  static int getClassCount();
145 
146 protected:
147 
149 
155  double radius;
156 
160  double velocity;
161 };
162 
163 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164 //
165 // INLINE FUNCTIONS
166 //
167 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168 
169 inline size_t LayerProfile::memSize()
170 {
171  return InterpolatedProfile::memSize()
172  + sizeof(radius)
173  + sizeof(velocity)
174  ;
175 }
176 
177 } // end slbm namespace
178 
179 #endif // LayerProfile.h
#define SLBM_EXP_IMP
Definition: SLBMGlobals.h:180
The GreatCircle class manages information related to a great circle path between two Locations on the...
Definition: GreatCircle.h:114
A Profile object based on values interpolated from nearby GridProfile objects.
A Profile object based on values interpolated from nearby GridProfile objects.
Definition: LayerProfile.h:76
int nIntervals()
Retrieve the number of intervals associated with this Profile (always returns 1).
Definition: LayerProfile.h:118
bool operator!=(const LayerProfile &other)
Inequality operator.
Definition: LayerProfile.h:111
static int getClassCount()
double getRadius()
Retrieve the radius of the top of the interval represented by this LayerProfile, in km.
Definition: LayerProfile.h:125
double getVelocity()
Retrieve the velocity of the interval represented by this LayerProfile, in km/s.
Definition: LayerProfile.h:132
~LayerProfile()
Destructor.
virtual double getGradient()
Retrieve the velocity gradient in the interval represented by this LayerProfile, in 1/s.
Definition: LayerProfile.h:140
bool operator==(const LayerProfile &other)
Equality operator.
static int layerProfileClassCount
Definition: LayerProfile.h:148
LayerProfile(GreatCircle *greatCircle, Location &location)
Parameterized constructor.
LayerProfile & operator=(const LayerProfile &other)
Equal operator.
double velocity
The P or S velocity of the interval, in km/sec.
Definition: LayerProfile.h:160
double radius
The radius of the interface represented by this LayerProfile object, in km.
Definition: LayerProfile.h:155
LayerProfile(const LayerProfile &LayerProfile)
Copy constructor.
The Location Class manages a single point in/on the Earth, which is described by the GRS80 ellipsoid.
Definition: Location.h:78