From 9f99dd825fb5dd69331a5a69b1d9161c565c5354 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Thu, 4 Apr 2013 13:10:11 +0200 Subject: Requirements: Move flag variables into gridpoint class --- Carpet/Requirements/src/Requirements.cc | 20 ++++++++++---------- Carpet/Requirements/src/gridpoint.cc | 6 +++--- Carpet/Requirements/src/gridpoint.hh | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'Carpet/Requirements') diff --git a/Carpet/Requirements/src/Requirements.cc b/Carpet/Requirements/src/Requirements.cc index 75bc567bb..dd28a6ba0 100644 --- a/Carpet/Requirements/src/Requirements.cc +++ b/Carpet/Requirements/src/Requirements.cc @@ -56,7 +56,7 @@ namespace Requirements { } all_state.setup(maps); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -77,7 +77,7 @@ namespace Requirements { } all_state.change_storage(groups, timelevels, reflevel); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -93,7 +93,7 @@ namespace Requirements { } all_state.regrid(reflevels); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -114,7 +114,7 @@ namespace Requirements { } all_state.recompose(reflevel, where); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -130,7 +130,7 @@ namespace Requirements { } all_state.regrid_free(); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -146,7 +146,7 @@ namespace Requirements { } all_state.cycle(reflevel); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -161,7 +161,7 @@ namespace Requirements { all_state.before_routine(function_data, reflevel, map, timelevel, timelevel_offset); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -176,7 +176,7 @@ namespace Requirements { all_state.after_routine(function_data, cctk_iteration, reflevel, map, timelevel, timelevel_offset); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -196,7 +196,7 @@ namespace Requirements { } all_state.sync(function_data, cctk_iteration, groups, reflevel, timelevel); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } @@ -213,7 +213,7 @@ namespace Requirements { } all_state.restrict1(groups, cctk_iteration, reflevel); } - if (inconsistencies_are_fatal and there_was_an_error) { + if (inconsistencies_are_fatal and gridpoint_t::there_was_an_error) { CCTK_WARN(CCTK_WARN_ABORT, "Aborting because schedule clauses were not satisfied"); } diff --git a/Carpet/Requirements/src/gridpoint.cc b/Carpet/Requirements/src/gridpoint.cc index ceaa8d96d..ca3e18b26 100644 --- a/Carpet/Requirements/src/gridpoint.cc +++ b/Carpet/Requirements/src/gridpoint.cc @@ -11,9 +11,9 @@ namespace Requirements { using namespace std; - bool there_was_an_error = false; - bool there_was_a_warning = false; - + bool gridpoint_t::there_was_an_error = false; + bool gridpoint_t::there_was_a_warning = false; + // Accessors bool gridpoint_t::interior() const { return i_interior; } bool gridpoint_t::boundary() const { return i_boundary; } diff --git a/Carpet/Requirements/src/gridpoint.hh b/Carpet/Requirements/src/gridpoint.hh index acc98d66f..14dc6a1ec 100644 --- a/Carpet/Requirements/src/gridpoint.hh +++ b/Carpet/Requirements/src/gridpoint.hh @@ -11,9 +11,6 @@ using namespace std; namespace Requirements { - extern bool there_was_an_error; - extern bool there_was_a_warning; - // Represents which have valid information and which do not. // This will later be indexed by rl, map etc. // Currently only works with unigrid. @@ -59,6 +56,9 @@ namespace Requirements { void input (istream& is); void output (ostream& os) const; void output_location (location_t &l, int changed) const; + + static bool there_was_an_error; + static bool there_was_a_warning; }; -- cgit v1.2.3