diff options
-rw-r--r-- | src/Boundary.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/Boundary.c b/src/Boundary.c index 9eaaf05..efe8f51 100644 --- a/src/Boundary.c +++ b/src/Boundary.c @@ -1155,6 +1155,51 @@ void Boundary_ClearSelection(void) memset(selected_faces, 0, num_cctk_vars*sizeof(CCTK_INT)); } + /*@@ + @routine Boundary_MakeSureThatTheSelectionIsEmpty + @date Mon Jul 7 21:51:37 CET 2003 + @author Erik Schnetter + @desc + Abort if the selections is not empty. + This routine is currently unused, but is very + helpful for debugging. + @enddesc + @calls + @history + @endhistory +@@*/ + +void Boundary_MakeSureThatTheSelectionIsEmpty(void) +{ + struct BCDATA *current_bcdata; + struct BCVAR *current; + int is_empty; + + is_empty = 1; + for (current_bcdata = bcdata_list; current_bcdata; + current_bcdata = current_bcdata->next) + { + for (current = current_bcdata->var_list; current; + current = current->next) + { + char * fullname = CCTK_FullName (current->var); + if (is_empty) + { + is_empty = 0; + printf ("The following boundary conditions are currently selected for the following variables:\n"); + } + printf ("Boundary condition %s for variable %s\n", + current_bcdata->bc_name, fullname); + free (fullname); + } + } + + if (! is_empty) + { + CCTK_WARN (0, "Someone thinks that the boundary selection list should be empty at this point. Alas, it is not; I better abort."); + } +} + /******************************************************************** ********************* Local Routines ************************* ********************************************************************/ |