QGpCompatibility/CompatDispersion.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of QGpCompatibility.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2004-04-28
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (ULg, Liège, Belgium)
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef COMPATDISPERSION_H
00029 #define COMPATDISPERSION_H
00030 
00031 #include <QGpCoreWave.h>
00032 #include "QGpCompatibilityDLLExport.h"
00033 #include "CompatMultiModalCurves.h"
00034 
00035 namespace QGpCompatibility {
00036 
00037 class CompatEllipticity;
00038 
00039 class CompatDispersion: public CompatMultiModalCurves
00040 {
00041 public:
00042   // Default constructor
00043   CompatDispersion(): CompatMultiModalCurves() {_relPrec=1e-7;}
00044   // Allocates an empty structure
00045   CompatDispersion(int modesCount,int omegasCount)
00046     : CompatMultiModalCurves(modesCount, omegasCount) {_relPrec=1e-7;}
00047   // Copy constructor
00048   CompatDispersion(const CompatMultiModalFrequency *o)
00049     : CompatMultiModalCurves(o) {_relPrec=1e-7;}
00050   // Copy constructor changing the number of modes
00051   CompatDispersion(const CompatMultiModalFrequency *o,int modesCount)
00052     : CompatMultiModalCurves(o, modesCount) {_relPrec=1e-7;}
00053   // Copy constructor
00054   CompatDispersion(const CompatMultiModalCurves *o)
00055     : CompatMultiModalCurves(o) {_relPrec=1e-7;}
00056   // Copy constructor changing the number of modes
00057   CompatDispersion(const CompatMultiModalCurves * o,int modesCount)
00058     : CompatMultiModalCurves(o, modesCount,0) {_relPrec=1e-7;}
00059   
00060   // Returns the omega count for mode m where phase velocity is different from 0
00061   int omegasCount (int m) const;
00062   // Returns the omega count
00063   int omegasCount () const {return _omegasCount;}
00064   // Print the dispersion curve in Herrmann's format
00065   void exportHerrmann(char * fileName);
00066   // Check the slopes of the last dispersion curve calculated, returns true if OK, maxSlowness must be the mimimum Shear Slowness of the model used for calculations. An error is reported if a constant slowness is observed at a lower slowness.
00067   bool checkSlopes(double maxSlowness);
00068   // Set all dispersion curves to zero 
00069   void resetValues();
00070   void setPrecision(double prec) {_relPrec=prec;}
00071   void clear() {CompatMultiModalCurves::clear(0);}
00072 private:
00073   double _minSlow, _maxSlow;
00074   double _relPrec;
00075 };
00076 
00077 } // namespace QGpCompatibility
00078 
00079 #endif // COMPATDISPERSION_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines