From 8d0099ca3450f7eaecae00230f6c5893e0a68d93 Mon Sep 17 00:00:00 2001 From: rideout Date: Fri, 2 May 2003 21:48:07 +0000 Subject: Physical bc function pointers now take all const arguments. Fixed bug when requesting number of selected vars for all bcs. Allow for 100+ vars in debugging code... git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@219 6a38eb6e-646e-4a02-a296-d141613ad6c4 --- src/Boundary.c | 11 ++++++----- src/Boundary.h | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Boundary.c b/src/Boundary.c index 48b6191..b79aea2 100644 --- a/src/Boundary.c +++ b/src/Boundary.c @@ -745,7 +745,7 @@ CCTK_INT Bdry_Boundary_SelectedGVs(CCTK_POINTER GH, #ifdef DEBUG printf("Boundary_SelectedGVs: called with bc_name=\"%s\" array_size=%d\n", - bc_name, array_size); + bc_name, array_size); fflush(stdout); #endif /* Step through bcdata list */ @@ -784,7 +784,8 @@ CCTK_INT Bdry_Boundary_SelectedGVs(CCTK_POINTER GH, } /* Warn is there is no bc registered under this name */ - if (!Util_TableQueryValueInfo(physbc_table_handle, NULL, NULL, bc_name)) + if (bc_name && + !Util_TableQueryValueInfo(physbc_table_handle, NULL, NULL, bc_name)) { CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, "There is no boundary condition registered under the name %s", @@ -1041,15 +1042,15 @@ static void print_selections_database(void) struct BCDATA *current_bcdata; struct BCVAR *current; - printf("Current list of selected vars:\n"); - printf(" bc name vi var name table handle\n"); + printf(" Current list of selected vars:\n"); + printf(" bc name vi var name table handle\n"); for (current_bcdata = bcdata_list; current_bcdata; current_bcdata = current_bcdata->next) { for (current = current_bcdata->var_list; current; current = current->next) { - printf("%9s %2d %12s %2d\n", current_bcdata->bc_name, current->var, + printf(" %9s %3d %12s %2d\n", current_bcdata->bc_name, current->var, CCTK_VarName(current->var), current->table); } } diff --git a/src/Boundary.h b/src/Boundary.h index 271ec58..99de680 100644 --- a/src/Boundary.h +++ b/src/Boundary.h @@ -19,8 +19,9 @@ extern "C" /* data type for pointer to function which implements a physical boundary condition: */ -typedef CCTK_INT (*phys_bc_fn_ptr)(CCTK_POINTER, CCTK_INT, CCTK_INT *, - CCTK_INT *, CCTK_INT *); +typedef CCTK_INT (*phys_bc_fn_ptr)(const CCTK_POINTER, const CCTK_INT, + const CCTK_INT *, const CCTK_INT *, + const CCTK_INT *); /* prototype for routine registed as providing 'None' boundary condition */ -- cgit v1.2.3