aboutsummaryrefslogtreecommitdiff
path: root/src/ScalarBoundary.c
diff options
context:
space:
mode:
authorallen <allen@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-01-24 09:56:16 +0000
committerallen <allen@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-01-24 09:56:16 +0000
commit5766861f7d6bbe2e106b20f479c447855f5a8448 (patch)
treee39ee44df418dd3af5677dde537f6b06ec1d1c12 /src/ScalarBoundary.c
parent4c1a3d4878fe9636e61e6710928de8c54645cd20 (diff)
Adding directional boundary conditions for everything apart from Robin.
See thorn documentation for details Next to come, boundary conditions for grid functions which aren't CCTK_REALs. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@131 6a38eb6e-646e-4a02-a296-d141613ad6c4
Diffstat (limited to 'src/ScalarBoundary.c')
-rw-r--r--src/ScalarBoundary.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c
index 02098d5..d905a51 100644
--- a/src/ScalarBoundary.c
+++ b/src/ScalarBoundary.c
@@ -132,7 +132,7 @@ void CCTK_FCALL CCTK_FNAME(BndScalarVI)
return;
}
-
+/* ===================================================================== */
/*@@
@routine BndScalarDirGI
@@ -150,10 +150,10 @@ void CCTK_FCALL CCTK_FNAME(BndScalarVI)
@@*/
int BndScalarDirGI(cGH *GH,
- int stencil_size,
- int dir,
- CCTK_REAL scalar_val,
- int gi)
+ int stencil_size,
+ int dir,
+ CCTK_REAL scalar_val,
+ int gi)
{
int numvars, first_vi;
@@ -217,6 +217,7 @@ void CCTK_FCALL CCTK_FNAME(BndScalarGI)
}
+/* ===================================================================== */
/*@@
@routine BndScalarDirGN
@@ -469,7 +470,6 @@ static int ApplyBndScalar(cGH *GH,
{
int symmetry_handle; /* handle for the optional symmetry structure */
int vi, gi, dim;
- int coord;
int idim;
int berr,ierr,retval=0;
int dirloop1,dirloop2;
@@ -544,12 +544,10 @@ static int ApplyBndScalar(cGH *GH,
if (dir > 0)
{
sw[dir-1] = stencil;
- coord = dir-1;
}
else
{
sw[-dir-1] = stencil;
- coord = -dir-1;
}
}
else
@@ -606,12 +604,12 @@ static int ApplyBndScalar(cGH *GH,
doBC = (
( (sGHex->GFSym[vi][count]==GFSYM_NOSYM) ||
(sGHex->GFSym[vi][count]==GFSYM_UNSET) ) &&
- GH->cctk_lsh[coord]>1 && GH->cctk_bbox[count]) ?
+ GH->cctk_lsh[count/2]>1 && GH->cctk_bbox[count]) ?
count : -1;
}
else
{
- doBC = (GH->cctk_lsh[coord]>1 && GH->cctk_bbox[count]) ?
+ doBC = (GH->cctk_lsh[count/2]>1 && GH->cctk_bbox[count]) ?
count : -1 ;
}
@@ -645,8 +643,8 @@ static int ApplyBndScalar(cGH *GH,
break;
default :
berr = -1;
- CCTK_VWarn(1,__LINE__,__FILE__,"Boundary",
- "No scalar boundary for dim>3: grid variable '%s'",
+ CCTK_VWarn(1,__LINE__,__FILE__,CCTK_THORNSTRING,
+ "ApplyBndScalar: No scalar boundary for dim>3: grid variable '%s'",
CCTK_VarName(vi));
}
}