RSTT  3.2.0
Regional Seismic Travel Time
All Classes Namespaces Files Functions Variables Typedefs Friends Macros
SLBMGlobals.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 SLBMGlobals_H
39 #define SLBMGlobals_H
40 
41 #include "CPPGlobals.h"
42 #include <algorithm>
43 
44 // **** _BEGIN SLBM NAMESPACE_ **************************************************
45 
46 namespace slbm {
47 
51 static const char* SlbmVersion = "3.2.0";
52 
53 // version 3.0.3 4/22/2014 sballar
54 // fixed bug in GridGeoTess::getActiveNodeNeighbors that caused the
55 // code to return twice as many node neighbors as it was supposed to.
56 // Also improved Uncertainty::constructors so that the paths to the
57 // uncertainty files get assembled with appropriate path separators.
58 // Fixed bug where modelPath was not set properly in GridGeoTess.cc.
59 // Improved performance of GeoTessCPP::natural neighbor interpolation.
60 // in GeoTessCPP version 2.2.0.
61 //
62 // version 3.0.2 10/10/2013 sballar
63 // Added "include <cstring>" to GeoTess IFStream.h so that
64 // it would compile with RedHat Linux v6.4
65 // Also changed getline() to getline_slbm() in slbmtestc.c to
66 // circumvent conflict in new version of gcc compiler on Linxux
67 
71 //static const char* UtilVersion = "1.0.4";
72 
76 //static const char* TauPLocVersion = "1.1.2";
77 
81 static const int PWAVE = 0;
82 
86 static const int SWAVE = 1;
87 
91 static const int Pn = 0;
92 
96 static const int Sn = 1;
97 
101 static const int Pg = 2;
102 
106 static const int Lg = 3;
107 
111 static const int TT = 0;
112 
116 static const int SH = 1;
117 
121 static const int AZ = 2;
122 
123 static const int WATER = 0;
124 static const int SEDIMENT1 = 1;
125 static const int SEDIMENT2 = 2;
126 static const int SEDIMENT3 = 3;
127 static const int UPPER_CRUST = 4;
128 static const int MIDDLE_CRUST_N = 5;
129 static const int MIDDLE_CRUST_G = 6;
130 static const int LOWER_CRUST = 7;
131 static const int MANTLE = 8;
132 static const int NLAYERS = 9;
133 // MANTLE has to be last layer and must == NLAYERS-1
134 
135 // Parameter TOP_LAYER controls behavior when sources/receivers
136 // are in layer WATER.
137 // If TOP_LAYER = 0, and phase = Pn/Pg then rays that travel
138 // through the WATER layer travel at the velocity of water.
139 // If TOP_LAYER = 0, and phase = Sn/Lg then rays that travel
140 // through the WATER layer cause an exception to be thrown.
141 // If TOP_LAYER = 1 and the depth of a source or receiver is
142 // less than the depth of the top of layer SEDIMENT1, then
143 // the code will search downward through the layers, starting
144 // at layer SEDIMENT1, until if finds a layer with non-zero
145 // thickness. It will then extend the top of that layer up
146 // to the depth of the source/receiver. This essentially
147 // assumes that all sources/receivers in the ocean are actually
148 // located on islands that are too small to have been explicitly
149 // defined in the model.
150 //
151 // Bottom line is: to include water set TOP_LAYER = 0.
152 // To ignore water, set TOP_LAYER = 1;
153 static const int TOP_LAYER = 1;
154 
155 // sb commented this out 12/2/2012
156 //static const int nCoefficients = 3;
157 
158 } // end slbm namespace
159 
160 // Definition of dllimport and dllexport here for Windows only
161 // Note that definitions are repeated for various tools/libraries.
162 //--------------------------
163 #if defined(_WIN32) || defined(WIN32)
164 
165  // exports when building SLBM dll, imports when linking to header files in
166  // SLBM (Note that SLBM_EXPORTS should be defined when building a SLBM
167  // DLL, and should not be defined when linking with the SLBM DLL)
168  #ifdef SLBM_EXPORTS
169  #define SLBM_EXP_IMP __declspec(dllexport)
170  #else
171  #define SLBM_EXP_IMP __declspec(dllimport)
172  #endif
173 
174  // exports DLL for classes and functions that ONLY export
175  // (Note that this is mainly used for templated classes that are not imported)
176  #define SLBM_EXP __declspec(dllexport)
177 
178 #else // Sun does not need these
179 
180  #define SLBM_EXP_IMP
181  #define SLBM_EXP
182 
183 #endif
184 //--------------------------
185 
186 #endif // SLBMGlobals_H