Alpine3D  Alpine3D-3.2.0
TerrainRadiationAlgorithm.h
Go to the documentation of this file.
1 /***********************************************************************************/
2 /* Copyright 2009-2015 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
3 /***********************************************************************************/
4 /* This file is part of Alpine3D.
5  Alpine3D is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Alpine3D is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Alpine3D. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef TERRAINRADIATIONALGORITHM_H
19 #define TERRAINRADIATIONALGORITHM_H
20 
21 #include <meteoio/MeteoIO.h>
22 
23 //Class for shooting cells
24 class CellsList {
25  public:
26  double radiation;
27  int x;
28  int y;
29 };
30 
31 inline bool operator_greater(const CellsList& a, const CellsList& b) {
32  return a.radiation > b.radiation;
33 }
34 
36  public:
37  TerrainRadiationAlgorithm(const std::string& i_algo) : algo(i_algo) {}
38  virtual ~TerrainRadiationAlgorithm();
39 
40  virtual void getRadiation(const mio::Array2D<double>& direct, mio::Array2D<double>& diffuse, mio::Array2D<double>& terrain) = 0;
41  virtual void setMeteo(const mio::Array2D<double>& albedo, const mio::Array2D<double>& ta,
42  const mio::Array2D<double>& rh, const mio::Array2D<double>& ilwr) = 0;
43  const std::string algo;
44 };
45 
47  public:
48  static TerrainRadiationAlgorithm* getAlgorithm(const mio::Config& cfg, const mio::DEMObject &dem, const int& nbworkers);
49 
50 };
51 
52 #endif
Definition: TerrainRadiationAlgorithm.h:35
double radiation
Definition: TerrainRadiationAlgorithm.h:26
const std::string algo
Definition: TerrainRadiationAlgorithm.h:43
bool operator_greater(const CellsList &a, const CellsList &b)
Definition: TerrainRadiationAlgorithm.h:31
int x
Definition: TerrainRadiationAlgorithm.h:27
Definition: TerrainRadiationAlgorithm.h:46
TerrainRadiationAlgorithm(const std::string &i_algo)
Definition: TerrainRadiationAlgorithm.h:37
int y
Definition: TerrainRadiationAlgorithm.h:28
Definition: TerrainRadiationAlgorithm.h:24