diff options
author | eschnett <> | 2001-03-10 19:54:00 +0000 |
---|---|---|
committer | eschnett <> | 2001-03-10 19:54:00 +0000 |
commit | 221dcbf0bd2211f5bd64dcf6bd5560765f91a101 (patch) | |
tree | fe9a01ca3c2dea72092af7731244e25453acc607 /CarpetAttic | |
parent | bf79e13766e3d17d8614f7b662bdc46a45e54b03 (diff) |
Carpet now passes the Cart3d test suite. This required a rewrite of
Carpet now passes the Cart3d test suite. This required a rewrite of
CarpetSlabe, which now uses the data<> class instead of doing things
its own way. This in turn required some updates to data<>.
CarpetSlab now ignores (i. e. does not use) boundaries, except outer
boundaries. For that to work, the dh<> class has been given the
notion of an outer boundary.
In order to increase performance, the cctk_bbox[] information in
Carpet is not set correctly. As an approximation, it just reflects
whether the current grid component lies at the outer boundary, as
calculated using cctk_lbnd, cctk_ubnd, and cctk_gsh.
darcs-hash:20010310195459-f6438-8ee874d722de4df717e5eb3002722ceb8d4a9bb7.gz
Diffstat (limited to 'CarpetAttic')
-rw-r--r-- | CarpetAttic/Cart3dTest/src/Initial.c | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/CarpetAttic/Cart3dTest/src/Initial.c b/CarpetAttic/Cart3dTest/src/Initial.c index f88c25b28..384dd3453 100644 --- a/CarpetAttic/Cart3dTest/src/Initial.c +++ b/CarpetAttic/Cart3dTest/src/Initial.c @@ -17,7 +17,6 @@ int Cart3dTest_Initial (CCTK_ARGUMENTS) int r; int i,j,k; - int ind; int vi[9]; @@ -80,36 +79,42 @@ int Cart3dTest_Initial (CCTK_ARGUMENTS) for (j=0; j<cctk_lsh[1]; ++j) { for (i=0; i<cctk_lsh[0]; ++i) { - ind = CCTK_GFINDEX3D(cctkGH, i,j,k); + const int ii = cctk_lbnd[0] + i; + const int jj = cctk_lbnd[1] + j; + const int kk = cctk_lbnd[2] + k; + + const int ind = CCTK_GFINDEX3D(cctkGH, i,j,k); + + /* store the position in the components */ - s[ind] = (( 1 * 100 + i) * 100 + j) * 100 + k; + s[ind] = (( 1 * 100 + ii) * 100 + jj) * 100 + kk; - vx[ind] = ((11 * 100 + i) * 100 + j) * 100 + k; - vy[ind] = ((12 * 100 + i) * 100 + j) * 100 + k; - vz[ind] = ((13 * 100 + i) * 100 + j) * 100 + k; + vx[ind] = ((11 * 100 + ii) * 100 + jj) * 100 + kk; + vy[ind] = ((12 * 100 + ii) * 100 + jj) * 100 + kk; + vz[ind] = ((13 * 100 + ii) * 100 + jj) * 100 + kk; - txx[ind] = ((21 * 100 + i) * 100 + j) * 100 + k; - txy[ind] = ((22 * 100 + i) * 100 + j) * 100 + k; - txz[ind] = ((23 * 100 + i) * 100 + j) * 100 + k; - tyy[ind] = ((24 * 100 + i) * 100 + j) * 100 + k; - tyz[ind] = ((25 * 100 + i) * 100 + j) * 100 + k; - tzz[ind] = ((26 * 100 + i) * 100 + j) * 100 + k; + txx[ind] = ((21 * 100 + ii) * 100 + jj) * 100 + kk; + txy[ind] = ((22 * 100 + ii) * 100 + jj) * 100 + kk; + txz[ind] = ((23 * 100 + ii) * 100 + jj) * 100 + kk; + tyy[ind] = ((24 * 100 + ii) * 100 + jj) * 100 + kk; + tyz[ind] = ((25 * 100 + ii) * 100 + jj) * 100 + kk; + tzz[ind] = ((26 * 100 + ii) * 100 + jj) * 100 + kk; - ax[ind] = ((31 * 100 + i) * 100 + j) * 100 + k; - ay[ind] = ((32 * 100 + i) * 100 + j) * 100 + k; - az[ind] = ((33 * 100 + i) * 100 + j) * 100 + k; + ax[ind] = ((31 * 100 + ii) * 100 + jj) * 100 + kk; + ay[ind] = ((32 * 100 + ii) * 100 + jj) * 100 + kk; + az[ind] = ((33 * 100 + ii) * 100 + jj) * 100 + kk; - fxx[ind] = ((41 * 100 + i) * 100 + j) * 100 + k; - fxy[ind] = ((42 * 100 + i) * 100 + j) * 100 + k; - fxz[ind] = ((43 * 100 + i) * 100 + j) * 100 + k; - fyx[ind] = ((44 * 100 + i) * 100 + j) * 100 + k; - fyy[ind] = ((45 * 100 + i) * 100 + j) * 100 + k; - fyz[ind] = ((46 * 100 + i) * 100 + j) * 100 + k; - fzx[ind] = ((47 * 100 + i) * 100 + j) * 100 + k; - fzy[ind] = ((48 * 100 + i) * 100 + j) * 100 + k; - fzz[ind] = ((49 * 100 + i) * 100 + j) * 100 + k; + fxx[ind] = ((41 * 100 + ii) * 100 + jj) * 100 + kk; + fxy[ind] = ((42 * 100 + ii) * 100 + jj) * 100 + kk; + fxz[ind] = ((43 * 100 + ii) * 100 + jj) * 100 + kk; + fyx[ind] = ((44 * 100 + ii) * 100 + jj) * 100 + kk; + fyy[ind] = ((45 * 100 + ii) * 100 + jj) * 100 + kk; + fyz[ind] = ((46 * 100 + ii) * 100 + jj) * 100 + kk; + fzx[ind] = ((47 * 100 + ii) * 100 + jj) * 100 + kk; + fzy[ind] = ((48 * 100 + ii) * 100 + jj) * 100 + kk; + fzz[ind] = ((49 * 100 + ii) * 100 + jj) * 100 + kk; } } |