00001 #ifndef SURFACEWAVEOBJECTIVE_H_ 00002 #define SURFACEWAVEOBJECTIVE_H_ 00003 00004 #include "GeneralObjective.h" 00005 #include "SurfaceWaveData.h" 00006 #include "SurfaceWaveSynthetic.h" 00007 #include <string> 00008 00009 /** \addtogroup seistools Seismic data analysis and modeling */ 00010 /* @{ */ 00011 00012 class SurfaceWaveObjective : public GeneralObjective { 00013 private: 00014 SurfaceWaveData MeasuredData; 00015 SurfaceWaveData SynthData; 00016 SurfaceWaveSynthetic Synthetic; 00017 double errorlevel; 00018 double poisson; 00019 std::string tempname; 00020 public: 00021 void SetPoisson(const double p){poisson = p;} 00022 void SetErrorLevel(const double level){errorlevel = level;} 00023 //! We need clone and create for building an array of derived objects, see FAQ lite 20.8, the return type depends on the derived class 00024 virtual GeneralObjective *clone() const {return new SurfaceWaveObjective(*this);}; 00025 //! Some operations cannot be done in parallel, these are done before 00026 virtual void PreParallel(const ttranscribed &member); 00027 //! Some operations cannot be done in parallel, these are done after, returns the misfit value 00028 virtual double PostParallel(const ttranscribed &member); 00029 //! The core performance calculation, has to be safe to be done in parallel 00030 virtual void SafeParallel(const ttranscribed &member); 00031 //! Write the synthetic data to a sac file with name filename 00032 void WriteData(const std::string &filename){SynthData.WriteAscii(filename);} 00033 //! Write the current model to ascii file for calculations 00034 void WriteModel(const std::string &filename){Synthetic.GetModel().WriteModel(filename);} 00035 //! Write the current model to ascii file for plotting 00036 void WritePlot(const std::string &filename){Synthetic.GetModel().WritePlot(filename);} 00037 SurfaceWaveObjective& operator=(const SurfaceWaveObjective& source); 00038 SurfaceWaveObjective(const SurfaceWaveObjective &Old); 00039 SurfaceWaveObjective(const SurfaceWaveData &Data); 00040 virtual ~SurfaceWaveObjective(); 00041 }; 00042 /* @} */ 00043 00044 #endif /*SURFACEWAVEOBJECTIVE_H_*/
1.5.5