diff options
Diffstat (limited to 'src/FlatBoundary.c')
-rw-r--r-- | src/FlatBoundary.c | 13 |
1 files changed, 10 insertions, 3 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 |