00001 #ifdef CH_LANG_CC 00002 /* 00003 * _______ __ 00004 * / ___/ / ___ __ _ / / ___ 00005 * / /__/ _ \/ _ \/ V \/ _ \/ _ \ 00006 * \___/_//_/\___/_/_/_/_.__/\___/ 00007 * Please refer to Copyright.txt, in Chombo's root directory. 00008 */ 00009 #endif 00010 00011 #ifndef _DEMIF_H_ 00012 #define _DEMIF_H_ 00013 00014 #include "MayDay.H" 00015 #include "RealVect.H" 00016 00017 #include "BaseIF.H" 00018 00019 #include "NamespaceHeader.H" 00020 00022 00025 class DEMIF: public BaseIF 00026 { 00027 public: 00029 00032 DEMIF(const IntVect& a_ncell, 00033 const int& a_interpType, 00034 const RealVect& a_dx, 00035 const std::string& a_demFile, 00036 const Real& a_bottomBuffer, 00037 const Real& a_truncElev, 00038 const Real& a_highGround, 00039 const Real& a_verticalScale); 00040 00042 DEMIF(const DEMIF& a_inputIF); 00043 00045 virtual ~DEMIF(); 00046 00048 00051 virtual Real value(const RealVect& a_point) const; 00052 00053 virtual BaseIF* newImplicitFunction() const; 00054 00056 virtual bool readDEM(const bool& a_justhead, 00057 const std::string& a_demFile); 00058 00060 virtual bool cacheConstants(); 00061 00063 /* 00064 Return true if DEM is read 00065 */ 00066 virtual bool fixDEM(); 00067 00068 00069 protected: 00070 int m_ncols; 00071 int m_nrows; 00072 int m_NODATA; 00073 Real m_xllcorner; 00074 Real m_yllcorner; 00075 Real m_cellsize; 00076 Real m_cellvalue; 00077 Real **m_DEM; 00078 RealVect m_dx; 00079 IntVect m_ncell; 00080 int m_interpType; 00081 Real m_highGround; 00082 Real m_minDEM; 00083 Real m_maxDEM; 00084 Real m_bottomBuffer; 00085 Real m_truncElev; 00086 Real m_verticalScale; 00087 bool m_doCubic; 00088 Real m_hx; 00089 Real m_hy; 00090 Real m_hx2; 00091 Real m_hx3; 00092 Real m_hy2; 00093 Real m_hy3; 00094 private: 00095 DEMIF() 00096 { 00097 MayDay::Error("DEMIF uses strong construction"); 00098 } 00099 00100 void operator=(const DEMIF& a_inputIF) 00101 { 00102 MayDay::Error("DEMIF doesn't allow assignment"); 00103 } 00104 }; 00105 00106 #include "NamespaceFooter.H" 00107 #endif