aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@850bcc8b-0e4f-0410-8c26-8d28fbf1eda9>2007-12-05 23:14:14 +0000
committerschnetter <schnetter@850bcc8b-0e4f-0410-8c26-8d28fbf1eda9>2007-12-05 23:14:14 +0000
commit4dddaca99da04a904ca4573b465eaf756c619fc6 (patch)
tree0a35315b0311cb8c6dd32381fc50a7ecf0ceff2f
parent4de562c4595ff46790e4a6b7179a0fadb8aa3515 (diff)
Add new parameter use_dissipation_near_excision.
Add OpenMP parallelisation. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Dissipation/trunk@30 850bcc8b-0e4f-0410-8c26-8d28fbf1eda9
-rw-r--r--param.ccl8
-rw-r--r--schedule.ccl6
-rw-r--r--src/apply_dissipation.F778
-rw-r--r--src/dissipation.c6
-rw-r--r--src/setup_epsdis.c4
-rw-r--r--test/test_ah.par5
-rw-r--r--test/test_ob.par5
7 files changed, 24 insertions, 18 deletions
diff --git a/param.ccl b/param.ccl
index 2ecde5b..69df2fc 100644
--- a/param.ccl
+++ b/param.ccl
@@ -27,6 +27,14 @@ STRING vars "List of evolved grid functions that should have dissipation added"
+# No dissipation near excision boundary
+
+BOOLEAN use_dissipation_near_excision "Apply excision near the excision boundary (does not work for high orders)"
+{
+} "yes"
+
+
+
# Extra dissipation in horizons
BOOLEAN extra_dissipation_in_horizons "extra dissipation in horizons" STEERABLE=always
diff --git a/schedule.ccl b/schedule.ccl
index dac8931..cea15f2 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -19,6 +19,12 @@ SCHEDULE setup_epsdis AT cctk_poststep after SphericalSurface_HasBeenSet
SYNC: epsdisA_group
} "Setup spatially varying dissipation"
+SCHEDULE setup_epsdis AT cctk_postregridinitial
+{
+ LANG: C
+ SYNC: epsdisA_group
+} "Setup spatially varying dissipation"
+
SCHEDULE setup_epsdis AT cctk_postregrid
{
LANG: C
diff --git a/src/apply_dissipation.F77 b/src/apply_dissipation.F77
index d67a02e..b4e3545 100644
--- a/src/apply_dissipation.F77
+++ b/src/apply_dissipation.F77
@@ -2,12 +2,12 @@ c $Header$
#include "cctk.h"
- subroutine apply_dissipation (var, rhs, ni, nj, nk, dx, dt, order, epsdis)
+ subroutine apply_dissipation (var, rhs, ni, nj, nk, dx, order, epsdis)
implicit none
integer ni, nj, nk
CCTK_REAL var(ni,nj,nk), rhs(ni,nj,nk)
- CCTK_REAL dx(3), dt
+ CCTK_REAL dx(3)
CCTK_INT order
CCTK_REAL epsdis(ni,nj,nk)
@@ -15,6 +15,7 @@ c $Header$
if (order .eq. 1) then
+c$omp parallel do
do k = 2, nk-1
do j = 2, nj-1
do i = 2, ni-1
@@ -29,6 +30,7 @@ c $Header$
else if (order .eq. 3) then
+c$omp parallel do
do k = 3, nk-2
do j = 3, nj-2
do i = 3, ni-2
@@ -44,6 +46,7 @@ c $Header$
else if (order .eq. 5) then
+c$omp parallel do
do k = 4, nk-3
do j = 4, nj-3
do i = 4, ni-3
@@ -59,6 +62,7 @@ c $Header$
else if (order .eq. 7) then
+c$omp parallel do
do k = 5, nk-4
do j = 5, nj-4
do i = 5, ni-4
diff --git a/src/dissipation.c b/src/dissipation.c
index e04c8d5..42ed6b9 100644
--- a/src/dissipation.c
+++ b/src/dissipation.c
@@ -15,7 +15,6 @@ CCTK_FNAME(apply_dissipation) (CCTK_REAL const * const var,
int const * const nj,
int const * const nk,
CCTK_REAL const * const dx,
- CCTK_REAL const * const dt,
CCTK_INT const * const order,
CCTK_REAL const * const epsdis);
@@ -42,7 +41,7 @@ apply (int const varindex, char const * const optstring, void * const arg)
cGroup vardata, rhsdata;
CCTK_REAL const * varptr;
CCTK_REAL * rhsptr;
- CCTK_REAL dt, dx[3];
+ CCTK_REAL dx[3];
int n;
int d;
int ierr;
@@ -58,7 +57,6 @@ apply (int const varindex, char const * const optstring, void * const arg)
}
}
- dt = CCTK_DELTA_TIME;
for (d=0; d<3; ++d) {
dx[d] = CCTK_DELTA_SPACE(d);
}
@@ -110,5 +108,5 @@ apply (int const varindex, char const * const optstring, void * const arg)
CCTK_FNAME(apply_dissipation)
(varptr, rhsptr, &cctk_lsh[0], &cctk_lsh[1], &cctk_lsh[2],
- dx, &dt, &order, epsdisA);
+ dx, &order, epsdisA);
}
diff --git a/src/setup_epsdis.c b/src/setup_epsdis.c
index b3a3b9c..a3db48b 100644
--- a/src/setup_epsdis.c
+++ b/src/setup_epsdis.c
@@ -168,8 +168,8 @@ setup_epsdis (CCTK_ARGUMENTS)
if (verbose) {
CCTK_VInfo(CCTK_THORNSTRING,
"Invalid Surface: s=%d, sf_va=%d, surf_no=%d, ah_no=%d",
- s,sf_valid[surface_number[s]],
- surface_number[s],horizon_number[s]);
+ s,(int)sf_valid[surface_number[s]],
+ (int)surface_number[s],(int)horizon_number[s]);
}
continue;
}
diff --git a/test/test_ah.par b/test/test_ah.par
index bea732c..290c75e 100644
--- a/test/test_ah.par
+++ b/test/test_ah.par
@@ -138,8 +138,3 @@ Dissipation::vars = "
ADMBase::lapse
ADMBase::shift
"
-
-#--- timer info
-Cactus::cctk_timer_output = "FULL"
-IO::print_timing_info = "yes"
-
diff --git a/test/test_ob.par b/test/test_ob.par
index a4a3199..e69104b 100644
--- a/test/test_ob.par
+++ b/test/test_ob.par
@@ -140,8 +140,3 @@ Dissipation::vars = "
ADMBase::lapse
ADMBase::shift
"
-
-#--- timer info
-Cactus::cctk_timer_output = "FULL"
-IO::print_timing_info = "yes"
-