diff options
author | Roland Haas <rhaas@tapir.caltech.edu> | 2013-10-31 18:39:39 -0700 |
---|---|---|
committer | Roland Haas <rhaas@tapir.caltech.edu> | 2013-10-31 19:06:02 -0700 |
commit | 9c7f841c2afad5ef8a1e1c8294d487f38885a377 (patch) | |
tree | aa8d983b2992cae75f04263febdd7e5603726d14 /Carpet | |
parent | d43e472044d51790713abd2c50e2389eee366843 (diff) |
CarpetLib: introduce accessor in gdata to query electric_fence
this function effectively exposes the CarpetLib parameter to Carpet
without explicit parameter sharing
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetLib/src/gdata.cc | 8 | ||||
-rw-r--r-- | Carpet/CarpetLib/src/gdata.hh | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc index 2226a5b07..23c5aaead 100644 --- a/Carpet/CarpetLib/src/gdata.cc +++ b/Carpet/CarpetLib/src/gdata.cc @@ -186,6 +186,14 @@ allocated_memory_shape (vect<int,D> shape) } #endif +bool +gdata:: +fence_is_energized () +{ + DECLARE_CCTK_PARAMETERS; + + return electric_fence; +} // Data manipulators diff --git a/Carpet/CarpetLib/src/gdata.hh b/Carpet/CarpetLib/src/gdata.hh index c000a4d74..152a7e118 100644 --- a/Carpet/CarpetLib/src/gdata.hh +++ b/Carpet/CarpetLib/src/gdata.hh @@ -105,8 +105,10 @@ public: 0; virtual void free () = 0; virtual size_t allocsize (const ibbox& extent, const int proc) const = 0; + // true if fence is intact virtual bool check_fence (const int upperlower) const = 0; + static bool fence_is_energized (); // Accessors bool has_storage () const { |