aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrideout <rideout@6a38eb6e-646e-4a02-a296-d141613ad6c4>2003-04-02 22:18:53 +0000
committerrideout <rideout@6a38eb6e-646e-4a02-a296-d141613ad6c4>2003-04-02 22:18:53 +0000
commit7b4051115a05ee93eb77d90187a4b9fc7a83a137 (patch)
tree992fa738bc856864b448c93206214941273e6b4e
parente30e3eadbb31794a83e6dc8c571e8bcb91335a96 (diff)
Changing warning level for bad table handle from 3 to 5, since a
handle of -1 is often used to get default values of parameters. Fixed checking of valid bc_name in Boundary_SelectedGVs(). Fixes CactusWave/1459. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@217 6a38eb6e-646e-4a02-a296-d141613ad6c4
-rw-r--r--src/Boundary.c18
-rw-r--r--src/FlatBoundary.c2
-rw-r--r--src/RadiationBoundary.c2
-rw-r--r--src/RobinBoundary.c2
-rw-r--r--src/ScalarBoundary.c2
-rw-r--r--src/StaticBoundary.c2
6 files changed, 15 insertions, 13 deletions
diff --git a/src/Boundary.c b/src/Boundary.c
index ebfdd26..48b6191 100644
--- a/src/Boundary.c
+++ b/src/Boundary.c
@@ -722,7 +722,8 @@ CCTK_INT Bdry_Boundary_SelectGroupForBCI(CCTK_POINTER GH,
@endvar
@returntype CCTK_INT
@returndesc
- number of variables selected for bc_name
+ -1 no boundary condition registered under bc_name
+ number of variables selected for bc_name
@endreturndesc
@@*/
CCTK_INT Bdry_Boundary_SelectedGVs(CCTK_POINTER GH,
@@ -782,12 +783,13 @@ CCTK_INT Bdry_Boundary_SelectedGVs(CCTK_POINTER GH,
}
}
- /* Do we want to return an error code if an 'invalid' bc_name is used? */
- if (!current)
+ /* Warn is there is no bc registered under this name */
+ if (!Util_TableQueryValueInfo(physbc_table_handle, NULL, NULL, bc_name))
{
- CCTK_VWarn(2, __LINE__, __FILE__, CCTK_THORNSTRING,
- "No variables are marked for boundary condition %s", bc_name);
- /*retval = -1;*/
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "There is no boundary condition registered under the name %s",
+ bc_name);
+ retval = -1;
}
return retval;
@@ -1012,8 +1014,8 @@ static int entry_greater_than(struct BCVAR *new, struct BCVAR *current)
} else
{
CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "%s has already been selected for an alternate boundary "
- "condition", CCTK_VarName(new->var));
+ "%s has already been selected for this boundary condition!",
+ CCTK_VarName(new->var));
retval = -1;
}
diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c
index 5d6458d..0ac4727 100644
--- a/src/FlatBoundary.c
+++ b/src/FlatBoundary.c
@@ -143,7 +143,7 @@ int BndFlat(const cGH *GH, int num_vars, int *vars, int *faces, int *tables)
"STENCIL WIDTH");
if (err == UTIL_ERROR_BAD_HANDLE)
{
- CCTK_VWarn(3, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VWarn(5, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid table handle passed for Flat boundary "
"conditions for %s. Using all default values.",
CCTK_VarName(vars[i]));
diff --git a/src/RadiationBoundary.c b/src/RadiationBoundary.c
index b754b6f..4df443b 100644
--- a/src/RadiationBoundary.c
+++ b/src/RadiationBoundary.c
@@ -221,7 +221,7 @@ int BndRadiative(const cGH *GH, int num_vars, int *vars, int *faces,
err = Util_TableGetReal(tables[i], &limit, "LIMIT");
if (err == UTIL_ERROR_BAD_HANDLE)
{
- CCTK_VWarn(3, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VWarn(5, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid table handle passed for Radiative boundary "
"conditions for %s. Using all default values.",
CCTK_VarName(vars[i]));
diff --git a/src/RobinBoundary.c b/src/RobinBoundary.c
index b550025..3d2d67e 100644
--- a/src/RobinBoundary.c
+++ b/src/RobinBoundary.c
@@ -147,7 +147,7 @@ int BndRobin(const cGH *GH, int num_vars, int *vars, int *faces, int *tables)
err = Util_TableGetReal(tables[i], &finf, "FINF");
if (err == UTIL_ERROR_BAD_HANDLE)
{
- CCTK_VWarn(3, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VWarn(5, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid table handle passed for Robin boundary "
"conditions for %s. Using all default values.",
CCTK_VarName(vars[i]));
diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c
index 47e8602..cebd85e 100644
--- a/src/ScalarBoundary.c
+++ b/src/ScalarBoundary.c
@@ -144,7 +144,7 @@ int BndScalar(const cGH *GH, int num_vars, int *vars, int *faces, int *tables)
err = Util_TableGetReal(tables[i], &scalar, "SCALAR");
if (err == UTIL_ERROR_BAD_HANDLE)
{
- CCTK_VWarn(3, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VWarn(5, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid table handle passed for Scalar boundary "
"conditions for %s. Using all default values.",
CCTK_VarName(vars[i]));
diff --git a/src/StaticBoundary.c b/src/StaticBoundary.c
index 4c4abbe..79027c5 100644
--- a/src/StaticBoundary.c
+++ b/src/StaticBoundary.c
@@ -138,7 +138,7 @@ int BndStatic(const cGH *GH, int num_vars, int *vars, int *faces, int *tables)
err = Util_TableGetIntArray(tables[i], gdim, stencil, "STENCIL WIDTH");
if (err == UTIL_ERROR_BAD_HANDLE)
{
- CCTK_VWarn(3, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VWarn(5, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid table handle passed for Static boundary "
"conditions for %s. Using all default values.",
CCTK_VarName(vars[i]));