00001
00010 #ifndef BS_CALC_RHO_H_
00011 #define BS_CALC_RHO_H_
00012
00013
00014 #include "well_results_storage.h"
00015 #include "fip_results_storage.h"
00016
00017 namespace blue_sky
00018 {
00019
00020 template <typename strategy_t>
00021 class calc_model;
00022
00023 template <typename strategy_t>
00024 class well;
00025
00031 template <typename strategy_t>
00032 class calc_rho_base : public objbase
00033 {
00034 public:
00035 typedef typename strategy_t::index_t index_t;
00036 typedef typename strategy_t::item_t item_t;
00037 typedef typename strategy_t::item_array_t item_array_t;
00038
00039 typedef calc_model <strategy_t> calc_model_t;
00040 typedef well <strategy_t> well_t;
00041 typedef rs_mesh_iface <strategy_t> mesh_iface_t;
00042
00043 typedef smart_ptr <calc_model_t, true> sp_calc_model_t;
00044 typedef smart_ptr <well_t, true> sp_well_t;
00045 typedef smart_ptr <mesh_iface_t, true> sp_mesh_iface_t;
00046
00047 public:
00051 virtual ~calc_rho_base () {}
00052
00059 virtual void
00060 calculate (const sp_well_t &well, const sp_calc_model_t &calc_model, const sp_mesh_iface_t &mesh) const = 0;
00061 };
00062
00067 template <typename strategy_t>
00068 class calc_total_average_rho : public calc_rho_base <strategy_t>
00069 {
00070 public:
00071 typedef typename strategy_t::index_t index_t;
00072 typedef typename strategy_t::item_t item_t;
00073 typedef typename strategy_t::item_array_t item_array_t;
00074
00075 typedef calc_model <strategy_t> calc_model_t;
00076 typedef well <strategy_t> well_t;
00077 typedef rs_mesh_iface <strategy_t> mesh_iface_t;
00078
00079 typedef smart_ptr <calc_model_t, true> sp_calc_model_t;
00080 typedef smart_ptr <well_t, true> sp_well_t;
00081 typedef smart_ptr <mesh_iface_t, true> sp_mesh_iface_t;
00082
00083 public:
00084
00091 void
00092 calculate (const sp_well_t &well, const sp_calc_model_t &calc_model, const sp_mesh_iface_t &mesh) const;
00093
00095 BLUE_SKY_TYPE_DECL_T (calc_total_average_rho <strategy_t>);
00096 };
00097
00103 bool
00104 calc_rho_register_types (const blue_sky::plugin_descriptor &pd);
00105
00106 }
00107
00108 #endif // #ifndef BS_CALC_RHO_H_
00109