aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FlatBoundary.c13
-rw-r--r--src/RadiationBoundaryWrappers.c2
2 files changed, 11 insertions, 4 deletions
diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c
index 0b8bcb8..b1a4fb3 100644
--- a/src/FlatBoundary.c
+++ b/src/FlatBoundary.c
@@ -67,20 +67,27 @@ void ApplyFlatBC(cGH *GH, int *stencil_size, char *name) {
/* Decide if we have a group or a variable, and get the index */
/* type = 1 (group), type = 0 (var), type = -1 (neither) */
-
+
num = CCTK_GroupIndex(name);
if (num < 0)
{
num = CCTK_VarIndex(name);
- if (num > 0)
+ if (num >= 0)
{
type = 1; /* Variable */
}
else
{
type = -1;
- CCTK_WARN(0,"Name in ApplyFlatBC is neither a group nor a variable");
+ {
+ char *message;
+ message = (char *)malloc( 1024*sizeof(char) );
+ sprintf(message,"Name (%s) in ApplyFlatBC is not a group or variable",
+ name);
+ CCTK_WARN(1,message);
+ free(message);
+ }
}
}
else
diff --git a/src/RadiationBoundaryWrappers.c b/src/RadiationBoundaryWrappers.c
index 0c0798a..aa28b0f 100644
--- a/src/RadiationBoundaryWrappers.c
+++ b/src/RadiationBoundaryWrappers.c
@@ -74,7 +74,7 @@ void ApplyRadiativeBC(cGH *GH, CCTK_REAL var0, int *sw,
if (num < 0)
{
num = CCTK_VarIndex(name);
- if (num > 0)
+ if (num >= 0)
{
type = 1; /* Variable */
}