aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/dh.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/dh.hh')
-rw-r--r--Carpet/CarpetLib/src/dh.hh14
1 files changed, 13 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/dh.hh b/Carpet/CarpetLib/src/dh.hh
index ea9b0f294..09d3579e5 100644
--- a/Carpet/CarpetLib/src/dh.hh
+++ b/Carpet/CarpetLib/src/dh.hh
@@ -2,6 +2,7 @@
#define DH_HH
#include <cassert>
+#include <cstdlib>
#include <iostream>
#include <list>
#include <string>
@@ -23,7 +24,6 @@ class ggf;
class dh;
-
// A data hierarchy (grid hierarchy plus ghost zones)
class dh {
@@ -75,6 +75,7 @@ public:
srpvect fast_old2new_sync_sendrecv;
srpvect fast_old2new_ref_prol_sendrecv;
+ size_t memory () const;
ostream & output (ostream & os) const;
};
@@ -125,11 +126,22 @@ public:
void remove (ggf * f);
// Output
+ size_t memory () const;
ostream & output (ostream & os) const;
};
+inline size_t memoryof (dh::dboxes const & b)
+{
+ return b.memory ();
+}
+
+inline size_t memoryof (dh const & d)
+{
+ return d.memory ();
+}
+
inline ostream & operator<< (ostream & os, dh::dboxes const & b)
{
return b.output (os);