Box.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef BOX_H_
6 #define BOX_H_
7 
8 #include <vector>
9 #include "Panel.h"
10 
11 class Box
12 {
13 public:
14  Box(int maxLevel, int nTerms);
15 
16  void addPanel(int level, Panel* panel);
17 
18  void upwardPass();
19 
20  void downwardPass();
21 
22  void computeFlow(int k);
23 
25  {
26  return maxLevel_;
27  }
28 
30  int getNrPanelsOnLevel(int level)
31  {
32  return levels_[level].size();
33  }
34 
36  {
37  return p_;
38  }
39 
40 private:
41  int maxLevel_;
42  int p_; //The number of terms
43  std::vector<std::vector<Panel*>> levels_; // This is a vector containing the panels at level L
44  std::vector<Sphere*> spheres_; // This is a vector that contains all the spheres in the domain
45 };
46 
47 #endif /* BOX_H_ */
Definition: Box.h:12
int maxLevel_
Definition: Box.h:41
void downwardPass()
Definition: Box.cc:48
int getMaxLevel()
Definition: Box.h:24
Box(int maxLevel, int nTerms)
Definition: Box.cc:10
void computeFlow(int k)
Definition: Box.cc:88
int getNrPanelsOnLevel(int level)
Definition: Box.h:30
int p_
Definition: Box.h:42
void addPanel(int level, Panel *panel)
Definition: Box.cc:19
std::vector< std::vector< Panel * > > levels_
Definition: Box.h:43
void upwardPass()
Definition: Box.cc:24
int getNumberOfTerms()
Definition: Box.h:35
std::vector< Sphere * > spheres_
Definition: Box.h:44
Definition: Panel.h:23
char char char int int * k
Definition: level2_impl.h:374