aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@850bcc8b-0e4f-0410-8c26-8d28fbf1eda9>2006-04-11 09:58:46 +0000
committerknarf <knarf@850bcc8b-0e4f-0410-8c26-8d28fbf1eda9>2006-04-11 09:58:46 +0000
commit723aabe5f2be6c5ed454b04dba3e1aa928a8ef07 (patch)
treef11fa25422f3cf6135510abdb74a7089d04e69e1
parent3ca8b77c1d31de5c8aae73731f80f0030366ea3f (diff)
new parameter to shift the dissipation location with respect to the AH location
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Dissipation/trunk@20 850bcc8b-0e4f-0410-8c26-8d28fbf1eda9
-rw-r--r--param.ccl7
-rw-r--r--src/setup_epsdis.c16
2 files changed, 14 insertions, 9 deletions
diff --git a/param.ccl b/param.ccl
index 4ab5b61..7e0ea25 100644
--- a/param.ccl
+++ b/param.ccl
@@ -42,9 +42,14 @@ INT update_ah_every "how often to update the AH information for dissipation" STE
REAL ah_slope "Slope inside AH" STEERABLE=always
{
- *:* :: "0 for no dissipation. Unstable when total epsdis<0 or total epsdis>1/3"
+ *:* :: "Slope from the outside value to the inside value in AHs"
} 0.2
+REAL ah_radius_offset "Offset to the distance from the AH." STEERABLE=always
+{
+ *:* :: "negative values shift inwards, positive outwards"
+} 0.0
+
REAL ah_max_epsdis "maximal epsdis" STEERABLE=always
{
*:* :: "<0 for 'off', >=0 for maximal epsdis in horizon"
diff --git a/src/setup_epsdis.c b/src/setup_epsdis.c
index b17b8cc..4be7a2c 100644
--- a/src/setup_epsdis.c
+++ b/src/setup_epsdis.c
@@ -66,7 +66,7 @@ setup_epsdis (CCTK_ARGUMENTS)
for (i=0;i<outer_bound_npoints;i++) {
index = CCTK_GFINDEX3D(cctkGH,i,j,k);
indexP= CCTK_GFINDEX3D(cctkGH,outer_bound_npoints,j,k);
- epsdisA[index]=epsdis+ob_slope*abs(x[index]-x[indexP]);
+ epsdisA[index]=epsdis+ob_slope*fabs(x[index]-x[indexP]);
}
}
}
@@ -77,7 +77,7 @@ setup_epsdis (CCTK_ARGUMENTS)
for (i=ni;i>ni-outer_bound_npoints;i--) {
index = CCTK_GFINDEX3D(cctkGH,i,j,k);
indexP= CCTK_GFINDEX3D(cctkGH,ni-outer_bound_npoints,j,k);
- epsdisA[index]=epsdis+ob_slope*abs(x[index]-x[indexP]);
+ epsdisA[index]=epsdis+ob_slope*fabs(x[index]-x[indexP]);
}
}
}
@@ -89,7 +89,7 @@ setup_epsdis (CCTK_ARGUMENTS)
for (i=0;i<ni;i++) {
index = CCTK_GFINDEX3D(cctkGH,i,j,k);
indexP= CCTK_GFINDEX3D(cctkGH,i,outer_bound_npoints,k);
- epsdisA[index]=epsdis+ob_slope*abs(y[index]-y[indexP]);
+ epsdisA[index]=epsdis+ob_slope*fabs(y[index]-y[indexP]);
}
}
}
@@ -100,7 +100,7 @@ setup_epsdis (CCTK_ARGUMENTS)
for (i=0;i<ni;i++) {
index = CCTK_GFINDEX3D(cctkGH,i,j,k);
indexP= CCTK_GFINDEX3D(cctkGH,i,nj-outer_bound_npoints,k);
- epsdisA[index]=epsdis+ob_slope*abs(y[index]-y[indexP]);
+ epsdisA[index]=epsdis+ob_slope*fabs(y[index]-y[indexP]);
}
}
}
@@ -112,7 +112,7 @@ setup_epsdis (CCTK_ARGUMENTS)
for (i=0;i<ni;i++) {
index = CCTK_GFINDEX3D(cctkGH,i,j,k);
indexP= CCTK_GFINDEX3D(cctkGH,i,j,outer_bound_npoints);
- epsdisA[index]=epsdis+ob_slope*abs(z[index]-z[indexP]);
+ epsdisA[index]=epsdis+ob_slope*fabs(z[index]-z[indexP]);
}
}
}
@@ -123,7 +123,7 @@ setup_epsdis (CCTK_ARGUMENTS)
for (i=0;i<ni;i++) {
index = CCTK_GFINDEX3D(cctkGH,i,j,k);
indexP= CCTK_GFINDEX3D(cctkGH,i,j,nk-outer_bound_npoints);
- epsdisA[index]=epsdis+ob_slope*abs(z[index]-z[indexP]);
+ epsdisA[index]=epsdis+ob_slope*fabs(z[index]-z[indexP]);
}
}
}
@@ -256,8 +256,8 @@ setup_epsdis (CCTK_ARGUMENTS)
for (i=0;i<npts;i++) {
radp=sqrt((xa[i]-odx)*(xa[i]-odx)+(ya[i]-ody)*(ya[i]-ody)+
(za[i]-odz)*(za[i]-odz));
- if (radp<=rads[i]) {
- epsdisA[inds[i]]=epsdis+ ah_slope*(rads[i]-radp);
+ if (radp<=rads[i]+ah_radius_offset) {
+ epsdisA[inds[i]]=epsdis+ ah_slope*(rads[i]+ah_radius_offset-radp);
if (epsdisA[inds[i]] > ah_max_epsdis) {
epsdisA[inds[i]] = ah_max_epsdis;
}