aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpollney <pollney@936e0995-0e4f-0410-aade-aa24bf7baf3d>2002-05-16 19:31:21 +0000
committerpollney <pollney@936e0995-0e4f-0410-aade-aa24bf7baf3d>2002-05-16 19:31:21 +0000
commitea949723592d53d1e747eebb629efdf570868806 (patch)
treedbe327cd4302c96e009e1516075251ebd590331c
parent064e4cd8b22b143c7433900adb9ff0f870aa9177 (diff)
Fixed parameter name conflict.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Noise/trunk@9 936e0995-0e4f-0410-aade-aa24bf7baf3d
-rw-r--r--interface.ccl4
-rw-r--r--param.ccl4
-rw-r--r--schedule.ccl4
-rw-r--r--src/id_noise.c2
-rw-r--r--src/id_noise.h52
5 files changed, 9 insertions, 57 deletions
diff --git a/interface.ccl b/interface.ccl
index 37515db..5171177 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -1,5 +1,7 @@
-# Interface definition for thorn IDBrBrPETSc
+# Interface definition for thorn Noise
# $Header$
IMPLEMENTS: Noise
+INHERITS: grid
+
diff --git a/param.ccl b/param.ccl
index 93a206f..121a38c 100644
--- a/param.ccl
+++ b/param.ccl
@@ -6,11 +6,11 @@
#------------------------------------------------------------------------------
private:
-BOOLEAN id_noise "Add random noise to initial data"
+BOOLEAN apply_id_noise "Add random noise to initial data"
{
} "no"
-BOOLEAN bc_noise "Add random noise to initial data"
+BOOLEAN apply_bc_noise "Add random noise to initial data"
{
} "no"
diff --git a/schedule.ccl b/schedule.ccl
index 74308e4..6418191 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,14 +1,14 @@
# Schedule definitions for thorn IDBrBrPETSc
# $Header$
-if (id_noise) {
+if (apply_id_noise) {
SCHEDULE id_noise AT CCTK_POSTINITIAL
{
LANG: C
} "Add noise to initial data"
}
-if (bc_noise) {
+if (apply_bc_noise) {
SCHEDULE bc_noise AT CCTK_POSTSTEP
{
LANG: C
diff --git a/src/id_noise.c b/src/id_noise.c
index 9951435..9866d9f 100644
--- a/src/id_noise.c
+++ b/src/id_noise.c
@@ -33,6 +33,8 @@ add_noise_to_group (int idx, const char* optstring, void* cctkGH)
/ RAND_MAX;
offset = 0.5 * amplitude;
+ printf ("DEBUG: add_noise_to_group\n");
+
for (k=1; k< GH->cctk_lsh[2]-1; ++k)
{
for (j=1; j< GH->cctk_lsh[1]-1; ++j)
diff --git a/src/id_noise.h b/src/id_noise.h
deleted file mode 100644
index e5f919b..0000000
--- a/src/id_noise.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* $Header$ */
-
-#ifndef NOISE_H
-#define NOISE_H
-
-#include <stdlib.h>
-#include "cctk.h"
-
-
-/* constants */
-
-#define TRUE 1
-#define FALSE 0
-
-#define MAXDIM 3
-#
-
-/* macros */
-
-#define RAND_VAL random()*amplitude - offset
-
-#define INDEX_3D(lsh, i, j, k) ((i) + (lsh)[0]*((j) + (lsh)[1]*(k)))
-
-
-#define NOISY_BOUNDARY(doBC, \
- iend, jend, kend, \
- ii, jj, kk, \
- rand) \
-{ \
-if (doBC) \
- { \
- for (k = 0; k < kend; k++) \
- { \
- for (j = 0; j < jend; j++) \
- { \
- for (i = 0; i < iend; i++) \
- { \
- int _index = CCTK_GFINDEX3D(GH, ii, jj, kk); \
- CCTK_REAL* v= (CCTK_REAL *) GH->data[var][timelvl] + _index; \
- v[0] += RAND_VAL; \
- } \
- } \
- } \
- } \
-}
-
-
-
-#endif /* !define(NOISE_H) */
-
-
-