summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-09-11 11:58:17 +0200
committerAnton Khirnov <anton@khirnov.net>2014-09-11 11:58:17 +0200
commit04697ee8ee0c4787e2058560d754c9e139a4417c (patch)
tree2d51b90fdcbc0e7b67e16ddd1ea72bbdf191ca75
parent467b9b2cbebd06c714179fe27a0e023a01066629 (diff)
Make the basis scaling factor configurable.
-rw-r--r--param.ccl5
-rw-r--r--src/brill.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/param.ccl b/param.ccl
index b490a37..64f2063 100644
--- a/param.ccl
+++ b/param.ccl
@@ -18,3 +18,8 @@ CCTK_INT cheb_order "order"
{
1: :: ""
} 20
+
+CCTK_REAL scale_factor "Scaling factor L for the SB basis"
+{
+ 0: :: ""
+} 3.0
diff --git a/src/brill.c b/src/brill.c
index be9c7f3..48912c4 100644
--- a/src/brill.c
+++ b/src/brill.c
@@ -45,7 +45,9 @@ typedef struct BasisSet {
* They are symmetric wrt beginning and decay as 1/x in infinity.
*/
-#define SCALE_FACTOR 1
+static CCTK_REAL scale_factor;
+
+#define SCALE_FACTOR scale_factor
static long double sb_even_eval(long double coord, int idx)
{
@@ -229,6 +231,8 @@ static BrillDataContext *init_bd(cGH *cctkGH, float amplitude, int cheb_order)
bd->nb_coeffs = bd->nb_coeffs_x * bd->nb_coeffs_z;
+ scale_factor = sf;
+
return bd;
}