aboutsummaryrefslogtreecommitdiff
path: root/CarpetExtra
diff options
context:
space:
mode:
authorcott <>2004-05-23 13:56:00 +0000
committercott <>2004-05-23 13:56:00 +0000
commitc5466f32573e6df12a462a59e04070d5bf5e855b (patch)
tree9247f36637d264759fe5e27d21a2330ef2d8e935 /CarpetExtra
parentc3a23418de64819b8209e50874e80d6e9c2ba6b4 (diff)
This is a little Test thorn for progressive meshrefinement. It sets up a Gaussian scalar field and
This is a little Test thorn for progressive meshrefinement. It sets up a Gaussian scalar field and measures the difference between the data on the finite difference grids and the analytical values. It still needs some work, but the basic stuff workes. Right now it is setup for ENO prolongation. If you want to change the way prolongation is handled, you have to edit 'param.ccl' - Christian ---------------------------------------------------------------------- darcs-hash:20040523135614-19929-f2251e59534aae6da120a0d95135d980bbd4a4f4.gz
Diffstat (limited to 'CarpetExtra')
-rw-r--r--CarpetExtra/CarpetRegridTest/interface.ccl7
-rw-r--r--CarpetExtra/CarpetRegridTest/src/SetupGaussian.c5
-rw-r--r--CarpetExtra/CarpetRegridTest/src/TestGaussian.c7
3 files changed, 8 insertions, 11 deletions
diff --git a/CarpetExtra/CarpetRegridTest/interface.ccl b/CarpetExtra/CarpetRegridTest/interface.ccl
index 12ab83a3f..115b123f4 100644
--- a/CarpetExtra/CarpetRegridTest/interface.ccl
+++ b/CarpetExtra/CarpetRegridTest/interface.ccl
@@ -1,12 +1,11 @@
# Interface definition for thorn CarpetRegridTest
-# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/CarpetRegridTest/interface.ccl,v 1.3 2004/05/25 15:35:15 schnetter Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/CarpetRegridTest/interface.ccl,v 1.1 2004/05/23 15:56:14 cott Exp $
implements: CarpetRegridTest
inherits: grid
-#tags='Prolongation="ENO"'
-CCTK_REAL testscalar type=GF timelevels=3
+CCTK_REAL testscalar type=GF timelevels=3 tags='Prolongation="ENO"
{
- phi, phi_error, phi_relerror
+ phi, phi_error
} "The test scalar field"
diff --git a/CarpetExtra/CarpetRegridTest/src/SetupGaussian.c b/CarpetExtra/CarpetRegridTest/src/SetupGaussian.c
index 768656f10..7f0be4e3e 100644
--- a/CarpetExtra/CarpetRegridTest/src/SetupGaussian.c
+++ b/CarpetExtra/CarpetRegridTest/src/SetupGaussian.c
@@ -1,11 +1,10 @@
-#include <math.h>
-
#include "cctk.h"
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"
+#include "cctk_Functions.h"
-static const char *rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/CarpetRegridTest/src/SetupGaussian.c,v 1.2 2004/05/27 13:22:49 schnetter Exp $";
+static const char *rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/CarpetRegridTest/src/SetupGaussian.c,v 1.1 2004/05/23 15:56:14 cott Exp $";
CCTK_FILEVERSION(CarpetExtra_CarpetRegridTest_SetupGaussian_c);
diff --git a/CarpetExtra/CarpetRegridTest/src/TestGaussian.c b/CarpetExtra/CarpetRegridTest/src/TestGaussian.c
index be786c245..fd68ff223 100644
--- a/CarpetExtra/CarpetRegridTest/src/TestGaussian.c
+++ b/CarpetExtra/CarpetRegridTest/src/TestGaussian.c
@@ -1,11 +1,10 @@
-#include <math.h>
-
#include "cctk.h"
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"
+#include "cctk_Functions.h"
-static const char *rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/CarpetRegridTest/src/TestGaussian.c,v 1.3 2004/05/27 13:22:49 schnetter Exp $";
+static const char *rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/CarpetRegridTest/src/TestGaussian.c,v 1.1 2004/05/23 15:56:14 cott Exp $";
CCTK_FILEVERSION(CarpetExtra_CarpetRegridTest_TestGaussian_c);
@@ -35,7 +34,7 @@ void CarpetRegrid_TestGaussian(CCTK_ARGUMENTS)
R = sqrt(X*X + Y*Y + Z*Z);
phi_error[index] = phi[index] - amplitude*exp( - pow( (R - radius) / sigma, 2.0 ) );
- phi_relerror[index] = phi_error[index] / (amplitude*exp( - pow( (R - radius) / sigma, 2.0 ) ) );
+
}
}
}