aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@fa3da13c-9f13-4301-a575-cf5b8c5e1907>2000-01-07 14:05:26 +0000
committerallen <allen@fa3da13c-9f13-4301-a575-cf5b8c5e1907>2000-01-07 14:05:26 +0000
commitd1fbbc801430c55548058b4ff7dbcdfffd630079 (patch)
tree5aac61d8cbc447ed16597e749e3251884e5d2d83
parentf9eaf6bb83256b84fac7fa8c2d0c0e303035f719 (diff)
Tiding and implementing error checking
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@46 fa3da13c-9f13-4301-a575-cf5b8c5e1907
-rw-r--r--src/Startup.c45
1 files 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");