aboutsummaryrefslogtreecommitdiff
path: root/m/prototype
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-09-15 06:57:23 -0700
committerErik Schnetter <schnetter@cct.lsu.edu>2009-09-15 06:57:23 -0700
commit1a886aad130268b13e9d0eb1c0d288f0b1e4f0c0 (patch)
tree168df0faafc12142ae0143e4385400afcb076779 /m/prototype
parente27d340ad64bd380e95bde29472e423718aca06d (diff)
Add radiative boundary conditions
Add dependency on GenericGD to configuration.ccl
Diffstat (limited to 'm/prototype')
-rw-r--r--m/prototype/ML_BSSN_Helper/src/ExtrapolateGammas.c29
-rw-r--r--m/prototype/ML_BSSN_Helper/src/NewRad.c67
2 files changed, 96 insertions, 0 deletions
diff --git a/m/prototype/ML_BSSN_Helper/src/ExtrapolateGammas.c b/m/prototype/ML_BSSN_Helper/src/ExtrapolateGammas.c
new file mode 100644
index 0000000..4e52e8f
--- /dev/null
+++ b/m/prototype/ML_BSSN_Helper/src/ExtrapolateGammas.c
@@ -0,0 +1,29 @@
+#include <cctk.h>
+#include <cctk_Arguments.h>
+
+static void
+extrap (cGH const * restrict cctkGH,
+ CCTK_REAL * restrict var);
+
+void
+ML_BSSN_ExtrapolateGammas (CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+
+ extrap (cctkGH, Xt1);
+ extrap (cctkGH, Xt2);
+ extrap (cctkGH, Xt3);
+
+ extrap (cctkGH, A);
+
+ extrap (cctkGH, B1);
+ extrap (cctkGH, B2);
+ extrap (cctkGH, B3);
+}
+
+static void
+extrap (cGH const * restrict const cctkGH,
+ CCTK_REAL * restrict const var)
+{
+ ExtrapolateGammas (cctkGH, var);
+}
diff --git a/m/prototype/ML_BSSN_Helper/src/NewRad.c b/m/prototype/ML_BSSN_Helper/src/NewRad.c
new file mode 100644
index 0000000..9c576a1
--- /dev/null
+++ b/m/prototype/ML_BSSN_Helper/src/NewRad.c
@@ -0,0 +1,67 @@
+#include <math.h>
+
+#include <cctk.h>
+#include <cctk_Arguments.h>
+#include <cctk_Parameters.h>
+
+static void
+newrad (cGH const * restrict cctkGH,
+ CCTK_REAL const * restrict var,
+ CCTK_REAL * restrict rhs,
+ CCTK_REAL var0,
+ CCTK_REAL v0);
+
+void
+ML_BSSN_NewRad (CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ DECLARE_CCTK_PARAMETERS;
+
+ CCTK_REAL const v0 = sqrt (harmonicF);
+
+ newrad (cctkGH, phi , phirhs , 0.0, v0 );
+
+ newrad (cctkGH, gt11 , gt11rhs , 1.0, 1.0);
+ newrad (cctkGH, gt12 , gt12rhs , 0.0, 1.0);
+ newrad (cctkGH, gt13 , gt13rhs , 0.0, 1.0);
+ newrad (cctkGH, gt22 , gt22rhs , 1.0, 1.0);
+ newrad (cctkGH, gt23 , gt23rhs , 0.0, 1.0);
+ newrad (cctkGH, gt33 , gt33rhs , 1.0, 1.0);
+
+ newrad (cctkGH, Xt1 , Xt1rhs , 0.0, 1.0);
+ newrad (cctkGH, Xt2 , Xt2rhs , 0.0, 1.0);
+ newrad (cctkGH, Xt3 , Xt3rhs , 0.0, 1.0);
+
+ newrad (cctkGH, trK , trKrhs , 0.0, v0 );
+
+ newrad (cctkGH, At11 , At11rhs , 0.0, 1.0);
+ newrad (cctkGH, At12 , At12rhs , 0.0, 1.0);
+ newrad (cctkGH, At13 , At13rhs , 0.0, 1.0);
+ newrad (cctkGH, At22 , At22rhs , 0.0, 1.0);
+ newrad (cctkGH, At23 , At23rhs , 0.0, 1.0);
+ newrad (cctkGH, At33 , At33rhs , 0.0, 1.0);
+
+ newrad (cctkGH, alpha, alpharhs, 1.0, v0 );
+
+ newrad (cctkGH, A , Arhs , 0.0, v0 );
+
+ newrad (cctkGH, beta1, beta1rhs, 0.0, 1.0);
+ newrad (cctkGH, beta2, beta2rhs, 0.0, 1.0);
+ newrad (cctkGH, beta3, beta3rhs, 0.0, 1.0);
+
+ newrad (cctkGH, B1 , B1rhs , 0.0, 1.0);
+ newrad (cctkGH, B2 , B2rhs , 0.0, 1.0);
+ newrad (cctkGH, B3 , B3rhs , 0.0, 1.0);
+}
+
+static void
+newrad (cGH const * restrict const cctkGH,
+ CCTK_REAL const * restrict const var,
+ CCTK_REAL * restrict const rhs,
+ CCTK_REAL const var0,
+ CCTK_REAL const v0)
+{
+ DECLARE_CCTK_PARAMETERS;
+
+ NewRad_Apply (cctkGH, var, rhs, var0, v0, radpower);
+}