summaryrefslogtreecommitdiff
path: root/new/cell.hpp
blob: 398101368077d02aae715c8363b6116193b91551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// -*- mode: c++ -*-

#ifndef CELL_HPP
#define CELL_HPP

#include "header.hpp"

class Cell
{
  
public:

  Cell();
  // Cell(const Cell &cell);
  Cell(double x, double y, double z);

  hsize_t get_neighbor(int index);
  void set_neighbor(int index, hsize_t value);

  void set_cell_id(int value);
  int get_cell_id();
  
  void set_coupled_neighbor(hsize_t value);
  hsize_t get_coupled_neighbor();
  
  void set_water_depth(double value);
  void set_velocity(int index, double value);

  double get_water_depth();
  double get_velocity(int index);

  double get_characteristic_length();
  void set_characteristic_length(double value);

  double get_maximum_length();
  void set_maximum_length(double value);
  
  double get_coordinate(int index);
  void set_coordinate(int index, double value);

private:

  int cell_id;
  hsize_t coupled_neighbor;		// id of the neighbor cell that's in the
					// other domain, for example the surface
					// neighbor of a subsurface cell
  
  double characteristic_length;		// length used to compute CFL number
  double maximum_length;                // length to check if out of domain
  double water_depth;			// unused if subsurface cell
  std::vector<double> velocity;		// either surface velocity or
					// subsurface velocity
  
  std::vector<double> coordinates;
  std::vector<hsize_t> neighbors;	// default to number of
					// 3D neighbors, last 2
					// entries unused if
					// surface cell
  
};

#endif