00001 #ifndef _MY_WellInfo_ 00002 #define _MY_WellInfo_ 00003 #include "globals.h" 00004 #include "sfunctions.h" 00024 class WellInfo 00025 { 00026 public: 00027 enum ConditionType{FLUX,PRESSURE,SOURCE_INJ_RATE,SOURCE_FIXED_PRESSURE}; 00028 Point3D P,Q; 00029 ConditionType m_bcType; 00030 double m_value; 00031 VecDouble m_transBC; 00032 public: 00033 00034 WellInfo(Point3D p1,Point3D p2,double value,ConditionType bcType); 00035 ~WellInfo(){} 00036 bool isPointInWell(const VecDouble &p1) const; 00037 bool isPointInWell(const Point3D &p1) const; 00038 double getInjRate(){assert(m_bcType==FLUX);return m_value;} 00039 double getPressureBC(){assert(m_bcType==PRESSURE);return m_value;} 00040 double getSourceInjRate(){assert(m_bcType==SOURCE_INJ_RATE);return m_value;} 00041 double getSourceFixedPressure(){assert(m_bcType==SOURCE_FIXED_PRESSURE);return m_value;} 00042 void adjustBoundaryWithGrid(const Point3D &DX); 00043 bool isInnerCell(Point3D &p,Point3D &DX); 00044 ConditionType getBCType(){return m_bcType;} 00045 bool isSourceWell() const {return m_bcType == SOURCE_INJ_RATE;} 00046 const VecDouble& getTransportBC() const {assert(isSourceWell());return m_transBC;} 00047 void setTransportBC(const VecDouble& v){m_transBC=v;} 00048 double volume(); 00049 double area(); 00050 00051 }; 00052 typedef std::vector<WellInfo> VecWellInfo; 00053 #endif