00001 #ifndef ISO1DMTOBJECTIVE_H_ 00002 #define ISO1DMTOBJECTIVE_H_ 00003 #include "C1DMTObjective.h" 00004 #include "C1DMTSynthData.h" 00005 00006 namespace gplib 00007 { 00008 //! This class implements the forward calculation for a 1D isotropic MT model 00009 /*! Here we implement the specific calls to generate data for a 1D isotropic 00010 * model, the misfit and the type of data to fit are all set and calculated 00011 * in the base class C1DMTObjective 00012 */ 00013 class Iso1DMTObjective: public C1DMTObjective 00014 { 00015 private: 00016 //! This is the only function that implements some real functionality 00017 /*! This function implements the forward calculation of the data, 00018 * the base class uses the access function GetMTSynth to access this data 00019 * for misfit calculations etc. 00020 */ 00021 virtual void CalcSynthData(const ttranscribed &member); 00022 C1DMTSynthData IsoMTSynth; 00023 virtual MTStation &GetMTSynth() 00024 { 00025 return IsoMTSynth; 00026 } 00027 public: 00028 explicit Iso1DMTObjective(const MTStation &LocalMTData); 00029 Iso1DMTObjective& operator=(const Iso1DMTObjective& source); 00030 Iso1DMTObjective(const Iso1DMTObjective &Old); 00031 virtual ~Iso1DMTObjective(); 00032 //! clone clones the current object, derived from GeneralObjective 00033 virtual Iso1DMTObjective *clone() const 00034 { 00035 return new Iso1DMTObjective(*this); 00036 } 00037 //! write the current model to a file 00038 virtual void WriteModel(const std::string &filename) 00039 { 00040 IsoMTSynth.WriteModel(filename); 00041 } 00042 //! write the current model for plotting to a file 00043 virtual void WritePlot(const std::string &filename) 00044 { 00045 IsoMTSynth.WritePlot(filename); 00046 } 00047 //! Write current data to a file 00048 virtual void WriteData(const std::string &filename) 00049 { 00050 IsoMTSynth.WriteAsMtt(filename); 00051 } 00052 }; 00053 } 00054 #endif /*ISO1DMTOBJECTIVE_H_*/
1.5.8