Proto
Proto_DBLInternals.H
1 #ifndef _PROTO_DBLInternals_H_
2 #define _PROTO_DBLInternals_H_
3 
4 #include "Proto_Point.H"
5 #include "Proto_Box.H"
6 #include "implem/Proto_Stack.H"
7 #include "Proto_ProblemDomain.H"
8 #include "Proto_Morton.H"
9 #include "Proto_SPMD.H"
10 #include <cstdlib> //for size_t
11 #include <iostream>
12 #include <stack>
13 #include <memory>
14 #include <array>
15 #include <unordered_map>
16 namespace Proto
17 {
18  typedef std::unordered_map<uint64_t, int > BoxMap;
20  {
21  public:
22  BoxMap boxMap;
23  // BoxMap stores an int pointing to a location in allBoxes, indexed by Points.
24  vector<pair<Point, int> > allBoxes;
25  // allBoxes stores a Point corresponding to the box, and the processor number. Locations
26  // for any given processor are stored in a contiguous set.
27  vector<int> startProc;
28  // Stores the starting location in allBoxes for each processor.
29  ProblemDomain coarsenedDomain;
30  // m_problemDomain coarsened by m_boxSize. Remains invariant under coarsening or refinement
31  // so we can put it here.
32  // MortonOrder table data. Put it here b/c I can't make the (computed) table static.
33  Morton morton;
34  inline int size(){return allBoxes.size();};
35  inline int mySize(){return startProc[procID()+1] - startProc[procID()];};
36  };
37 }
38 #endif
Definition: Proto_DBLInternals.H:19
int procID()
local process ID
Definition: Proto_SPMD.H:52
Definition: Proto_Box.H:11
Represents a rectangular domain over which a problem can be defined, including periodic images...
Definition: Proto_ProblemDomain.H:22