aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobias <tobias@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-12-15 18:48:10 +0000
committertobias <tobias@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-12-15 18:48:10 +0000
commit6e14d26168395d67d29d81b9dd48073b38a1eff2 (patch)
tree8c83f6dbc73d8947f598075d5d2d152f81698192
parentfa52eb4f511eed975c04f29b563d81bf5230b993 (diff)
Added acceleration back in...
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@44 fa3da13c-9f13-4301-a575-cf5b8c5e1907
-rw-r--r--param.ccl7
-rw-r--r--src/sor_confmetric.F19
2 files changed, 19 insertions, 7 deletions
diff --git a/param.ccl b/param.ccl
index df52af5..f66201a 100644
--- a/param.ccl
+++ b/param.ccl
@@ -26,3 +26,10 @@ KEYWORD sor_bound "Boundary condition to apply in SOR loop"
"constant" :: "constant boundary conditions"
"robin" :: "Robin type boundary conditions"
} "flat"
+
+KEYWORD sor_accel "Type of acceleration to use in SOR"
+{
+ "none" :: "no acceleration (omega=1)"
+ "const" :: "constant acceleration (omega=1.8)"
+ "cheb" :: "Chebyshev acceleration"
+} "const"
diff --git a/src/sor_confmetric.F b/src/sor_confmetric.F
index 06dd9ba..cc408d2 100644
--- a/src/sor_confmetric.F
+++ b/src/sor_confmetric.F
@@ -139,17 +139,21 @@ c Set up shorthand for the grid spacings
dy=cctk_delta_space(2)
dz=cctk_delta_space(3)
-c write(*,*)'supper: still need to do something with params'
-c verb = contains("elliptic_verbose","yes").ne.0
+ verb = CCTK_Equals(elliptic_verbose,"yes").eq.1
octant = CCTK_Equals(domain,"octant").eq.1
-c cheb = contains("sor_accel","cheb").ne.0
-c const = contains("sor_accel","const").ne.0
-c none = contains("sor_accel","none").ne.0
- verb = .true.
- cheb = .false.
none = .false.
const = .false.
+ cheb = .false.
+
+ if (CCTK_EQUALS(sor_accel,"const")) then
+ const = .true.
+ else if (CCTK_EQUALS(sor_accel,"cheb")) then
+ cheb = .true.
+ else
+ none = .true.
+ endif
+
if (verb .and. cheb)
$ print *,"Chebyshev Acceleration with radius of 1"
@@ -158,6 +162,7 @@ c none = contains("sor_accel","none").ne.0
if (verb .and. none)
$ print *,"Un-accelearted relaxation (omega = 1)"
+
two = 2.0D0
four = 4.0D0
resnorm = 0.0d0