From ac675226b1f8063813c47fd66eefbe36eff4ecc4 Mon Sep 17 00:00:00 2001 From: allen Date: Wed, 5 Jan 2000 14:10:21 +0000 Subject: Tidying and looking at error codes. Also, added a new private parameter "solver" which contains the name of the elliptic solver to use, and so now SourceData.F77 demonstrates the jiggery-pokery needed to pass string parameter into the elliptic interface ! git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/IDScalarWaveElliptic/trunk@20 41e88fdd-2190-4c69-9c84-4659c8cf322e --- src/SourceData.F77 | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/SourceData.F77 b/src/SourceData.F77 index 5ab3157..496ffb7 100644 --- a/src/SourceData.F77 +++ b/src/SourceData.F77 @@ -11,6 +11,8 @@ #include "cctk_arguments.h" #include "cctk_parameters.h" +#include "CactusElliptic/EllBase/src/EllBase.h" + subroutine UniformCharge(CCTK_FARGUMENTS) c Find static field for a uniformly charge sphere @@ -30,8 +32,10 @@ c where Q is the total charge and R is the sphere radius integer iphi,iMcoeff,iNcoeff integer i,j,k,ierr + integer length - + character*30 fsolver + c Get variable indices for all grid functions call CCTK_VarIndex (iMcoeff, "idscalarwaveelliptic::Mcoeff") @@ -95,16 +99,29 @@ c write (*,*) "SourceData: SetString ",ierr c Call elliptic solver to fill out phi - write (*,*) "charge: Going into elliptic solver" +c Fill a fortran string with the name of the solver + call CCTK_FortranString(length,solver,fsolver) + + call CCTK_INFO("Going into elliptic solver") + print *,"Solver:",fsolver(1:length),"." + call Ell_LinFlatSolver( & ierr, & cctkGH, & iphi, & iMcoeff, iNcoeff, & AbsTol, RelTol, - & "sor") - write (*,*) "charge: Exit elliptic solver ierr =",ierr - + & fsolver(1:length)) + + if (ierr .eq. ELL_SUCCESS) then + call CCTK_INFO("Leaving elliptic solver: solve successful") + else if (ierr .eq. ELL_NOCONVERGENCE) then + call CCTK_INFO("Leaving elliptic solver: solver failed to converge") + else if (ierr .eq. ELL_NOSOLVER) then + call CCTK_INFO("Elliptic solver not found") + else + call CCTK_INFO("Leaving elliptic solver: solve failed") + end if c Set up last timestep ... assume time symmetry -- cgit v1.2.3