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-10-22 00021 ** Authors: 00022 ** Marc Wathelet 00023 ** Marc Wathelet (ULg, Liège, Belgium) 00024 ** Marc Wathelet (LGIT, Grenoble, France) 00025 ** 00026 ***************************************************************************/ 00027 00028 #ifndef COMPATMODALELLIPTICITY_H 00029 #define COMPATMODALELLIPTICITY_H 00030 00031 #include <QGpCoreWave.h> 00032 #include "QGpCompatibilityDLLExport.h" 00033 #include "CompatModalRefinedCurves.h" 00034 00035 namespace QGpCompatibility { 00036 00037 class CompatEllipticityData; 00038 class CompatModalDispersion; 00039 00040 #define COMPATMODALELLIPTICITY_INVALID_VALUE -999999.0 00041 00042 class QGPCOMPATIBILITY_EXPORT CompatModalEllipticity : public CompatModalRefinedCurves 00043 { 00044 TRANSLATIONS( "CompatModalEllipticity" ); 00045 public: 00046 CompatModalEllipticity() {_curves.setInvalidValue(COMPATMODALELLIPTICITY_INVALID_VALUE);} 00047 00048 void operator=(CompatModalEllipticity& o); 00049 // To be removed in the future, when Dinver will be completly finished 00050 CompatEllipticityData * oldStyle(); 00051 00052 virtual void setNModes(int nm) { 00053 CompatModalRefinedCurves::setNModes(nm); 00054 setNRayleighModes(nm); 00055 } 00056 00057 CompatVDataPoint& f0() {return _f0;} 00058 00059 void setPeakFrequencyMisfit(bool pfm) {_peakFrequencyMisfit=pfm;} 00060 bool peakFrequencyMisfit() {return _peakFrequencyMisfit;} 00061 00062 double misfit() {return misfit(0,nOmegas()-1);} 00063 double misfit(int iMin, int iMax); 00064 double frequencyMisfit(CompatModalDispersion& disp, Rayleigh& model); 00065 protected: 00066 virtual const QString& xml_tagName() const {return xmlModalEllipticityTag;} 00067 static const QString xmlModalEllipticityTag; 00068 virtual void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const; 00069 virtual void xml_writeChildren(XML_WRITECHILDREN_ARGS) const; 00070 virtual XMLMember xml_member(XML_MEMBER_ARGS); 00071 bool xml_setProperty(XML_SETPROPERTY_ARGS); 00072 private: 00073 bool _peakFrequencyMisfit; 00074 CompatVDataPoint _f0; 00075 }; 00076 00077 } // namespace QGpCompatibility 00078 00079 #endif // COMPATMODALELLIPTICITY_H