Chombo + EB + MF  3.2
DEMIF.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _DEMIF_H_
12 #define _DEMIF_H_
13 
14 #include "MayDay.H"
15 #include "RealVect.H"
16 
17 #include "BaseIF.H"
18 
19 #include "NamespaceHeader.H"
20 
21 ///
22 /**
23  This implicit function specifies a Digital Elevation Model
24 */
25 class DEMIF: public BaseIF
26 {
27 public:
28  ///
29  /**
30  Constructor specifying a digital elevation model
31  */
32  DEMIF(const IntVect& a_ncell,
33  const int& a_interpType,
34  const RealVect& a_dx,
35  const std::string& a_demFile,
36  const Real& a_bottomBuffer,
37  const Real& a_truncElev,
38  const Real& a_highGround,
39  const Real& a_verticalScale);
40 
41  /// Copy constructor
42  DEMIF(const DEMIF& a_inputIF);
43 
44  /// Destructor
45  virtual ~DEMIF();
46 
47  ///
48  /**
49  Return the value of the function at a_point.
50  */
51  virtual Real value(const RealVect& a_point) const;
52 
53  virtual BaseIF* newImplicitFunction() const;
54 
55  /// Return true if DEM is read
56  virtual bool readDEM(const bool& a_justhead,
57  const std::string& a_demFile);
58 
59  /// This caches constants based on m_cellsize
60  virtual bool cacheConstants();
61 
62  ///
63  /*
64  Return true if DEM is read
65  */
66  virtual bool fixDEM();
67 
68 
69 protected:
70  int m_ncols;
71  int m_nrows;
72  int m_NODATA;
87  bool m_doCubic;
94 private:
96  {
97  MayDay::Abort("DEMIF uses strong construction");
98  }
99 
100  void operator=(const DEMIF& a_inputIF)
101  {
102  MayDay::Abort("DEMIF doesn't allow assignment");
103  }
104 };
105 
106 #include "NamespaceFooter.H"
107 #endif
virtual bool cacheConstants()
This caches constants based on m_cellsize.
int m_NODATA
Definition: DEMIF.H:72
Real m_highGround
Definition: DEMIF.H:81
Real m_hx2
Definition: DEMIF.H:90
virtual BaseIF * newImplicitFunction() const
Definition: DEMIF.H:25
Real m_truncElev
Definition: DEMIF.H:85
Real m_hy
Definition: DEMIF.H:89
Real m_cellsize
Definition: DEMIF.H:75
Real m_cellvalue
Definition: DEMIF.H:76
Real m_hy2
Definition: DEMIF.H:92
int m_ncols
Definition: DEMIF.H:70
Definition: BaseIF.H:32
Real m_maxDEM
Definition: DEMIF.H:83
bool m_doCubic
Definition: DEMIF.H:87
Real m_hx
Definition: DEMIF.H:88
DEMIF()
Definition: DEMIF.H:95
double Real
Definition: REAL.H:33
virtual bool fixDEM()
int m_interpType
Definition: DEMIF.H:80
RealVect m_dx
Definition: DEMIF.H:78
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Real m_verticalScale
Definition: DEMIF.H:86
Real ** m_DEM
Definition: DEMIF.H:77
Real m_xllcorner
Definition: DEMIF.H:73
Real m_hx3
Definition: DEMIF.H:91
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Real m_hy3
Definition: DEMIF.H:93
IntVect m_ncell
Definition: DEMIF.H:79
Real m_yllcorner
Definition: DEMIF.H:74
int m_nrows
Definition: DEMIF.H:71
Real m_bottomBuffer
Definition: DEMIF.H:84
Real m_minDEM
Definition: DEMIF.H:82
virtual bool readDEM(const bool &a_justhead, const std::string &a_demFile)
Return true if DEM is read.
virtual ~DEMIF()
Destructor.
void operator=(const DEMIF &a_inputIF)
Definition: DEMIF.H:100
virtual Real value(const RealVect &a_point) const
static void Abort(const char *const a_msg=m_nullString)
Print out message to cerr and exit via abort() (if serial) or MPI_Abort() (if parallel).