From 9c7f841c2afad5ef8a1e1c8294d487f38885a377 Mon Sep 17 00:00:00 2001 From: Roland Haas Date: Thu, 31 Oct 2013 18:39:39 -0700 Subject: CarpetLib: introduce accessor in gdata to query electric_fence this function effectively exposes the CarpetLib parameter to Carpet without explicit parameter sharing --- Carpet/CarpetLib/src/gdata.cc | 8 ++++++++ Carpet/CarpetLib/src/gdata.hh | 2 ++ 2 files changed, 10 insertions(+) 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 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 { -- cgit v1.2.3