diff options
author | goodale <goodale@071ba4cb-2270-47cd-a45a-3e542e115664> | 2002-01-16 03:13:35 +0000 |
---|---|---|
committer | goodale <goodale@071ba4cb-2270-47cd-a45a-3e542e115664> | 2002-01-16 03:13:35 +0000 |
commit | 97a60a7caf36fabbab10a3c76c9b84d5eaed773d (patch) | |
tree | 2a7035897e7510145811a98f9465e875b3aec106 /src | |
parent | 7b0c6b54c4188164e8500f5c4fe9afb399260e7c (diff) |
Making the initial data consistent between the initial data thorns -
in particular adding "none" to the C and C++ versions.
Tom
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/IDScalarWaveC/trunk@21 071ba4cb-2270-47cd-a45a-3e542e115664
Diffstat (limited to 'src')
-rw-r--r-- | src/InitialData.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/InitialData.c b/src/InitialData.c index c7ac1d3..0a1248a 100644 --- a/src/InitialData.c +++ b/src/InitialData.c @@ -139,18 +139,24 @@ void IDScalarWaveC_InitialData(CCTK_ARGUMENTS) } } } + else if (CCTK_Equals(initial_data, "none")) + { + for(k=0; k<cctk_lsh[2]; k++) + { + for(j=0; j<cctk_lsh[1]; j++) + { + for(i=0; i<cctk_lsh[0]; i++) + { + index = CCTK_GFINDEX3D(cctkGH,i,j,k); + + phi[index] = 0.0; + + phi_p[index] = 0.0; + } + } + } + } - /* zero out corners of phi next */ - /* - phi_n[CCTK_GFINDEX3D(cctkGH, 0, 0, 0)] = 0; - phi_n[CCTK_GFINDEX3D(cctkGH, 0, 0, cctk_lsh[2]-1)] = 0; - phi_n[CCTK_GFINDEX3D(cctkGH, 0, cctk_lsh[1]-1, 0)] = 0; - phi_n[CCTK_GFINDEX3D(cctkGH, 0, cctk_lsh[1]-1, cctk_lsh[2]-1)] = 0; - phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, 0, 0)] = 0; - phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, 0, cctk_lsh[2]-1)] = 0; - phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, cctk_lsh[1]-1, 0)] = 0; - phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, cctk_lsh[1]-1, cctk_lsh[2]-1)] = 0; - */ return; } |