aboutsummaryrefslogtreecommitdiff
path: root/src/SourceData.F77
diff options
context:
space:
mode:
Diffstat (limited to 'src/SourceData.F77')
-rw-r--r--src/SourceData.F7726
1 files changed, 17 insertions, 9 deletions
diff --git a/src/SourceData.F77 b/src/SourceData.F77
index cde3fb8..1ff3db7 100644
--- a/src/SourceData.F77
+++ b/src/SourceData.F77
@@ -11,7 +11,7 @@
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "CactusElliptic/EllBase/src/EllBase.h"
+#include "EllBase.h"
subroutine UniformCharge(CCTK_ARGUMENTS)
@@ -25,6 +25,7 @@ c where Q is the total charge and R is the sphere radius
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
+ DECLARE_CCTK_FUNCTIONS
CCTK_REAL pi
CCTK_REAL AbsTol(3), RelTol(3)
@@ -92,19 +93,23 @@ c Set tolerance for stopping elliptic solve
c Set any options needed for the elliptic solve
- call Ell_SetStringKey(ierr, "yes", "EllLinFlat::Bnd::Robin")
+ call Ell_SetStrKey(ierr, "yes","EllLinFlat::Bnd::Robin")
call Ell_SetRealKey(ierr, 0d0, "EllLinFlat::Bnd::Robin::inf")
- call Ell_SetIntKey (ierr, 1, "EllLinFlat::Bnd::Robin::falloff")
-
-
-c Call elliptic solver to fill out phi
+ call Ell_SetIntKey (ierr, 1, "EllLinFlat::Bnd::Robin::falloff")
+c Set parameters for specific solvers
+ if (CCTK_EQUALS(solver,"sor")) then
+ call Ell_SetIntKey(ierr, sor_maxit,"Ell::SORmaxit")
+ end if
+
c Fill a fortran string with the name of the solver
call CCTK_FortranString(length,solver,fsolver)
write(infoline,'(A27,A)') 'Going into elliptic solver ',
& fsolver(1:length)
call CCTK_INFO(infoline)
-
+
+c Call elliptic solver to fill out phi
+
call Ell_LinFlatSolver(
& ierr,
& cctkGH,
@@ -120,10 +125,13 @@ c Fill a fortran string with the name of the solver
else if (ierr .eq. ELL_NOSOLVER) then
call CCTK_INFO("Elliptic solver not found")
else
- call CCTK_INFO("Leaving elliptic solver: solve failed")
+ write(infoline,'(A45,I3,A)')
+ & "Leaving elliptic solver: solve failed (Error ",ierr,")"
+ call CCTK_INFO(infoline)
+ print *,ierr
end if
-c Set up last timestep ... assume time symmetry
+c Set up last timestep ... assume (first order) time symmetry
do k=1, cctk_lsh(3)
do j=1, cctk_lsh(2)