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: 2010-05-24 00022 ** Authors: 00023 ** Marc Wathelet (LGIT, Grenoble, France) 00024 ** 00025 ***************************************************************************/ 00026 00027 #ifndef MAGNETOTELLURICFACTORY_H 00028 #define MAGNETOTELLURICFACTORY_H 00029 00030 #include "QGpCoreWaveDLLExport.h" 00031 #include "MagnetoTelluricCurve.h" 00032 #include "MagnetoTelluricPointOptions.h" 00033 00034 namespace QGpCoreWave { 00035 00036 class Resistivity1DModel; 00037 00038 class QGPCOREWAVE_EXPORT MagnetoTelluricFactory 00039 { 00040 public: 00041 MagnetoTelluricFactory(); 00042 ~MagnetoTelluricFactory(); 00043 00044 void setX(const QList<MagnetoTelluricCurve>& curves); 00045 void linkX(QList<MagnetoTelluricCurve>& curves) const; 00046 void setX (const MagnetoTelluricCurve& c); 00047 void setX(const QVector<double>& x); 00048 void linkX (MagnetoTelluricCurve& c) const; 00049 void setAngularFrequency(); 00050 00051 bool calculate(const Resistivity1DModel& model, double staticShift=1.0); 00052 00053 void writeReport(QDataStream& s) const; 00054 void readReport(QDataStream& s); 00055 void toStream(QTextStream& sOut, const MagnetoTelluricPointOptions& options) const; 00056 00057 const ComplexValue * impedanceXY() const {return _impedanceXY;} 00058 MagnetoTelluricCurve curve() const; 00059 const QVector<double>& angularFrequencies() const {return _x;} 00060 private: 00061 QVector<double> _x; 00062 ComplexValue * _impedanceXY; 00063 }; 00064 00065 } // namespace QGpCoreWave 00066 00067 #endif // MAGNETOTELLURICFACTORY_H