00001 00009 #ifndef BS_CALC_WELL_PRESSURE_H_ 00010 #define BS_CALC_WELL_PRESSURE_H_ 00011 00012 // WTF?? 00013 #include "well_results_storage.h" 00014 #include "fip_results_storage.h" 00015 00016 namespace blue_sky 00017 { 00018 00019 template <typename strategy_t> 00020 class calc_model; 00021 00022 template <typename strategy_t> 00023 class well; 00024 00030 template <typename strategy_t> 00031 class calc_well_pressure_base : public objbase 00032 { 00033 public: 00034 typedef typename strategy_t::index_t index_t; 00035 typedef typename strategy_t::item_t item_t; 00036 00037 typedef calc_model <strategy_t> calc_model_t; 00038 typedef well <strategy_t> well_t; 00039 typedef smart_ptr <calc_model_t, true> sp_calc_model_t; 00040 typedef smart_ptr <well_t, true> sp_well_t; 00041 00042 public: 00048 virtual ~calc_well_pressure_base () {} 00049 00056 virtual bool 00057 calculate (sp_well_t &well, const sp_calc_model_t &calc_model) const = 0; 00058 }; 00059 00064 template <typename strategy_t> 00065 class calc_well_pressure : public calc_well_pressure_base <strategy_t> 00066 { 00067 public: 00068 typedef typename strategy_t::index_t index_t; 00069 typedef typename strategy_t::item_t item_t; 00070 typedef typename strategy_t::item_array_t item_array_t; 00071 00072 typedef calc_well_pressure_base <strategy_t> base_t; 00073 typedef calc_well_pressure <strategy_t> this_t; 00074 00075 typedef typename base_t::sp_calc_model_t sp_calc_model_t; 00076 typedef typename base_t::sp_well_t sp_well_t; 00077 00078 public: 00079 00086 bool 00087 calculate (sp_well_t &well, const sp_calc_model_t &calc_model) const; 00088 00090 BLUE_SKY_TYPE_DECL_T (calc_well_pressure <strategy_t>); 00091 00092 protected: 00093 00100 bool 00101 calculate_for_rate (sp_well_t &well, const sp_calc_model_t &calc_model) const; 00102 00103 }; 00104 00110 bool 00111 calc_well_pressure_register_types (const blue_sky::plugin_descriptor &pd); 00112 00113 } // namespace blue_sky 00114 00115 #endif // #ifndef BS_CALC_WELL_PRESSURE_H_ 00116