aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-08-21 08:27:04 +0000
committerallen <allen@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-08-21 08:27:04 +0000
commit21ae3cd52f6267391a5d7cac192748543bf1e0b4 (patch)
tree7e77bda83e58ccd9d8055c8928644f231304376c
parent9e6ac478ca1e3e1fa92ff0f8a7ec46d58acb76e9 (diff)
Adding a few debugging statements
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@152 6a38eb6e-646e-4a02-a296-d141613ad6c4
-rw-r--r--src/FlatBoundary.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c
index 504bf51..f0d3643 100644
--- a/src/FlatBoundary.c
+++ b/src/FlatBoundary.c
@@ -13,6 +13,8 @@
@version $Id$
@@*/
+/*#define DEBUG_BOUNDARY*/
+
#include <stdlib.h>
#include <string.h>
@@ -693,7 +695,6 @@ void CCTK_FCALL CCTK_FNAME (BndFlatVN)
{ \
int _index_to, _index_from; \
\
- \
_index_to = INDEX_3D (lsh, ii_to, jj_to, kk_to) * vtypesize; \
_index_from = INDEX_3D (lsh, ii_from, jj_from, kk_from) * vtypesize;\
memcpy ((char *) GH->data[var][timelvl] + _index_to, \
@@ -795,7 +796,7 @@ static int ApplyBndFlat (const cGH *GH,
if (gdim > MAXDIM)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Variable dimension of %d not supported", gdim);
+ "ApplyBndFlat: Variable dimension of %d not supported", gdim);
return (-1);
}
@@ -873,15 +874,36 @@ static int ApplyBndFlat (const cGH *GH,
/* now apply the boundaries face by face */
if (gdim > 0)
{
+#ifdef DEBUG_BOUNDARY
+ if (doBC[0])
+ {
+ printf("Boundary: Applying lower x flat boundary condition\n");
+ }
+ if (doBC[1])
+ {
+ printf("Boundary: Applying upper x flat boundary condition\n");
+ }
+#endif DEBUG_BOUNDARY
/* lower x */
FLAT_BOUNDARY (doBC[0], stencil[0], lssh[1], lssh[2],
i, j, k, stencil[0], j, k);
/* upper x */
FLAT_BOUNDARY (doBC[1], stencil[0], lssh[1], lssh[2],
lssh[0]-i-1, j, k, lssh[0]-stencil[0]-1, j, k);
+
}
if (gdim > 1)
{
+#ifdef DEBUG_BOUNDARY
+ if (doBC[2])
+ {
+ printf("Boundary: Applying lower y flat boundary condition\n");
+ }
+ if (doBC[3])
+ {
+ printf("Boundary: Applying upper y flat boundary condition\n");
+ }
+#endif DEBUG_BOUNDARY
/* lower y */
FLAT_BOUNDARY (doBC[2], lssh[0], stencil[1], lssh[2],
i, j, k, i, stencil[1], k);
@@ -891,6 +913,16 @@ static int ApplyBndFlat (const cGH *GH,
}
if (gdim > 2)
{
+#ifdef DEBUG_BOUNDARY
+ if (doBC[4])
+ {
+ printf("Boundary: Applying lower z flat boundary condition\n");
+ }
+ if (doBC[5])
+ {
+ printf("Boundary: Applying upper z flat boundary condition\n");
+ }
+#endif DEBUG_BOUNDARY
/* lower z */
FLAT_BOUNDARY (doBC[4], lssh[0], lssh[1], stencil[2],
i, j, k, i, j, stencil[2]);