From d1fbbc801430c55548058b4ff7dbcdfffd630079 Mon Sep 17 00:00:00 2001 From: allen Date: Fri, 7 Jan 2000 14:05:26 +0000 Subject: Tiding and implementing error checking git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@46 fa3da13c-9f13-4301-a575-cf5b8c5e1907 --- src/Startup.c | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/src/Startup.c b/src/Startup.c index 3e78c4e..9d49698 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -5,31 +5,50 @@ #include "cctk.h" #include "cctk_parameters.h" -#include "cctk_WarnLevel.h" -#include "EllBase.h" -#include "Ell_DBstructure.h" +#include "CactusElliptic/EllBase/src/EllBase.h" +#include "CactusElliptic/EllBase/src/Ell_DBstructure.h" /* routine registers the SOR solver "sor_confmetric" under the name "sor" with the Elliptic Class "LinConfMetric". */ -void EllSOR_Register(cGH *GH) { - void sor_confmetric(cGH *GH, int *MetricPsiI, int FieldI, int MI, - int NI, CCTK_REAL *AbsTol, CCTK_REAL *RelTol); - void sor_flat(cGH *GH, int MI, int NI, CCTK_REAL *AbsTol, CCTK_REAL *RelTol); +void EllSOR_Register(cGH *GH) +{ DECLARE_CCTK_PARAMETERS - int err,ell_verb; - CCTK_REAL dummy; - ell_verb = CCTK_Equals(elliptic_verbose,"yes"); + void sor_confmetric(cGH *GH, + int *MetricPsiI, + int FieldI, + int MI, + int NI, + CCTK_REAL *AbsTol, + CCTK_REAL *RelTol); + void sor_flat(cGH *GH, + int FieldI, + int MI, + int NI, + CCTK_REAL *AbsTol, + CCTK_REAL *RelTol); + + int err; + + /* Register the solver with the elliptic classes */ + + err = Ell_RegisterSolver(sor_confmetric,"sor","Ell_LinConfMetric"); + if (!err==ELL_SUCCESS) + { + CCTK_WARN(0,"Failed to register sor for Ell_LinConfMetric"); + } + err = Ell_RegisterSolver(sor_flat,"sor","Ell_LinFlat"); + if (!err==ELL_SUCCESS) + { + CCTK_WARN(0,"Failed to register sor for Ell_LinFlat"); + } - /* Register the solver withe the elliptic classes */ /* These "keys" have to be same in other elliptic solver and in the routines that sets them ! */ - Ell_RegisterSolver(sor_confmetric,"sor","Ell_LinConfMetric"); - Ell_RegisterSolver(sor_flat,"sor","Ell_LinFlat"); /* Register boundary SOR can handle */ err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllSOR::Bnd::Robin"); -- cgit v1.2.3