00001 /*************************************************************************** 00002 ** 00003 ** This file is part of QGpCoreWave. 00004 ** 00005 ** This library is free software; you can redistribute it and/or 00006 ** modify it under the terms of the GNU Lesser General Public 00007 ** License as published by the Free Software Foundation; either 00008 ** version 2.1 of the License, or (at your option) any later version. 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 Lesser General Public 00013 ** License for more details. 00014 ** 00015 ** You should have received a copy of the GNU Lesser General Public 00016 ** License along with this library; if not, write to the Free Software 00017 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 ** 00019 ** See http://www.geopsy.org for more information. 00020 ** 00021 ** Created : 2006-10-03 00022 ** Authors : 00023 ** Marc Wathelet 00024 ** Marc Wathelet (LGIT, Grenoble, France) 00025 ** 00026 ***************************************************************************/ 00027 00028 #ifndef ELLIPTICITYFACTORY_H 00029 #define ELLIPTICITYFACTORY_H 00030 00031 #include "DispersionFactory.h" 00032 #include "Ellipticity.h" 00033 #include "QGpCoreWaveDLLExport.h" 00034 00035 namespace QGpCoreWave { 00036 00037 class QGPCOREWAVE_EXPORT EllipticityFactory : public ModalFactory 00038 { 00039 TRANSLATIONS("EllipticityFactory"); 00040 public: 00041 EllipticityFactory(); 00042 ~EllipticityFactory(); 00043 00044 Ellipticity * values() {return _values;} 00045 00046 double peakMisfit(const RealStatisticalValue& val, DispersionFactory& disp, const Seismic1DModel * model); 00047 00048 virtual void setMode (const Mode& m); 00049 virtual const RealValue * mode(const Mode& m) const; 00050 virtual int storageCount() const {return 1;} 00051 inline virtual ModalStorage * storage(int) const; 00052 00053 void log10() {_values->log10();} 00054 void exp10() {_values->exp10();} 00055 protected: 00056 virtual ModalStorage * newStorage(int nModes) {return new Ellipticity(nModes, x());} 00057 private: 00058 Ellipticity * _values; 00059 }; 00060 00061 inline ModalStorage * EllipticityFactory::storage(int) const 00062 { 00063 TRACE; 00064 return _values; 00065 } 00066 00067 } // namespace QGpCoreWave 00068 00069 #endif // ELLIPTICITYFACTORY_H