00001 #ifndef ANISOSURFACEWAVEOBJECTIVE_H_ 00002 #define ANISOSURFACEWAVEOBJECTIVE_H_ 00003 00004 #include "PlottableObjective.h" 00005 #include "ParkSurfaceWaveData.h" 00006 #include "AnisoSurfaceWaveSynthetic.h" 00007 #include <string> 00008 00009 namespace gplib 00010 { 00011 /** \addtogroup seistools Seismic data analysis and modeling */ 00012 /* @{ */ 00013 //! This class calculates the misfit for anisotropic surface wave dispersion data 00014 class AnisoSurfaceWaveObjective: public PlottableObjective 00015 { 00016 private: 00017 ParkSurfaceWaveData MeasuredData; 00018 ParkSurfaceWaveData SynthData; 00019 AnisoSurfaceWaveSynthetic Synthetic; 00020 double errorlevel; 00021 double poisson; 00022 double backazimuth; 00023 double avelratio; 00024 public: 00025 00026 //! Write the current model to ascii file for calculations 00027 virtual void WriteModel(const std::string &filename) 00028 { 00029 Synthetic.WriteModel(filename); 00030 } 00031 //! Write the current model to ascii file for plotting 00032 virtual void WritePlot(const std::string &filename) 00033 { 00034 Synthetic.WritePlot(filename); 00035 } 00036 //! Write synthetic data as ascii file 00037 virtual void WriteData(const std::string &filename) 00038 { 00039 SynthData.WriteAscii(filename); 00040 } 00041 //! Provide read only access to the synthetic data 00042 const ParkSurfaceWaveData &GetSynthetic() const 00043 { 00044 return SynthData; 00045 } 00046 AnisoSurfaceWaveObjective(const AnisoSurfaceWaveObjective &Old); 00047 AnisoSurfaceWaveObjective& operator=(const AnisoSurfaceWaveObjective& source); 00048 AnisoSurfaceWaveObjective(const ParkSurfaceWaveData &Data, const double ba, const double avel); 00049 virtual ~AnisoSurfaceWaveObjective(); 00050 //! 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 00051 virtual AnisoSurfaceWaveObjective *clone() const 00052 { 00053 return new AnisoSurfaceWaveObjective(*this); 00054 } 00055 //! Some operations cannot be done in parallel, these are done before 00056 virtual void PreParallel(const ttranscribed &member); 00057 //! Some operations cannot be done in parallel, these are done after, returns the misfit value 00058 virtual double PostParallel(const ttranscribed &member); 00059 //! The core performance calculation, has to be safe to be done in parallel 00060 virtual void SafeParallel(const ttranscribed &member); 00061 }; 00062 /* @} */ 00063 } 00064 #endif /*ANISOSURFACEWAVEOBJECTIVE_H_*/
1.5.8