aboutsummaryrefslogtreecommitdiff
path: root/src/sor_wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sor_wrapper.c')
-rw-r--r--src/sor_wrapper.c76
1 files changed, 42 insertions, 34 deletions
diff --git a/src/sor_wrapper.c b/src/sor_wrapper.c
index 4f2a8b0..062a846 100644
--- a/src/sor_wrapper.c
+++ b/src/sor_wrapper.c
@@ -22,19 +22,21 @@
#include "cctk_Parameters.h"
#include "cctk_FortranString.h"
-void sor_flat_3d(cGH *GH, int FieldIndex, int MIndex, int NIndex,
- CCTK_REAL *AbsTol, CCTK_REAL *RelTol);
-void sor_confmetric_3d(cGH *GH, int *MetricPsiI, int conformal,
- int FieldIndex, int MIndex, int NIndex,
- CCTK_REAL *AbsTol, CCTK_REAL *RelTol);
-void sor_confmetric(cGH *GH,
- int *MetricPsiI,
- int FieldIndex,
- int MIndex,
- int NIndex,
- CCTK_REAL *AbsTol,
- CCTK_REAL *RelTol);
-void sor_flat(cGH *GH,
+#include "CactusElliptic/EllBase/src/EllBase.h"
+
+int sor_flat_3d(cGH *GH, int FieldIndex, int MIndex, int NIndex,
+ CCTK_REAL *AbsTol, CCTK_REAL *RelTol);
+int sor_confmetric_3d(cGH *GH, int *MetricPsiI, int conformal,
+ int FieldIndex, int MIndex, int NIndex,
+ CCTK_REAL *AbsTol, CCTK_REAL *RelTol);
+int sor_confmetric(cGH *GH,
+ int *MetricPsiI,
+ int FieldIndex,
+ int MIndex,
+ int NIndex,
+ CCTK_REAL *AbsTol,
+ CCTK_REAL *RelTol);
+int sor_flat(cGH *GH,
int FieldIndex,
int MIndex,
int NIndex,
@@ -65,32 +67,36 @@ void sor_flat(cGH *GH,
@@*/
-void sor_confmetric(cGH *GH,
- int *MetricPsiI,
- int FieldIndex,
- int MIndex,
- int NIndex,
- CCTK_REAL *AbsTol,
- CCTK_REAL *RelTol)
+int sor_confmetric(cGH *GH,
+ int *MetricPsiI,
+ int FieldIndex,
+ int MIndex,
+ int NIndex,
+ CCTK_REAL *AbsTol,
+ CCTK_REAL *RelTol)
{
+ int retval = ELL_NOSOLVER;
switch (CCTK_GroupDimFromVarI(FieldIndex))
{
case 1:
- CCTK_WARN(0,"No 1D SOR solver implemented");
+ CCTK_WARN(0,"sor_confmetric: No 1D SOR solver implemented");
break;
case 2:
- CCTK_WARN(0,"No 2D SOR solver implemented");
+ CCTK_WARN(0,"sor_confmetric: No 2D SOR solver implemented");
break;
case 3:
- sor_confmetric_3d(GH, MetricPsiI, 1, FieldIndex, MIndex, NIndex,
- AbsTol, RelTol);
+ retval = sor_confmetric_3d(GH, MetricPsiI, 1,
+ FieldIndex, MIndex, NIndex,
+ AbsTol, RelTol);
break;
default:
- CCTK_WARN(1,"Requested SOR solver for dimension equal "
+ CCTK_WARN(1,"sor_confmetric: Requested SOR solver for dimension equal "
"zero or gt. three not implemented!");
break;
}
+
+ return retval;
}
/*@@
@@ -105,9 +111,9 @@ void sor_confmetric(cGH *GH,
This wrapper is registered and if it is being called with
a n-dim. grid function, it goes of and picks the correct solver.
- We pass in the arguments that are neccessary for this class of elliptic eq.
- this solver is intended to solve. See ./CactusElliptic/EllBase/src/ for the
- classes of elliptic eq.
+ We pass in the arguments that are necessary for this class of
+ elliptic equations this solver is intended to solve.
+ See ./CactusElliptic/EllBase/src/ for the classes of elliptic eq.
@enddesc
@calls
@calledby
@@ -117,30 +123,32 @@ void sor_confmetric(cGH *GH,
@@*/
-void sor_flat(cGH *GH,
+int sor_flat(cGH *GH,
int FieldIndex,
int MIndex,
int NIndex,
CCTK_REAL *AbsTol,
CCTK_REAL *RelTol)
{
+ int retval = ELL_NOSOLVER;
switch (CCTK_GroupDimFromVarI(FieldIndex))
{
case 1:
- CCTK_WARN(1,"No 1D SOR solver implemented");
+ CCTK_WARN(1,"sor_flat: No 1D SOR solver implemented");
break;
case 2:
- CCTK_WARN(1,"No 2D SOR solver implemented");
+ CCTK_WARN(1,"sor_flat: No 2D SOR solver implemented");
break;
case 3:
- printf(" wrapper: %d %d %d \n",FieldIndex, MIndex, NIndex);
- sor_flat_3d(GH, FieldIndex, MIndex, NIndex, AbsTol, RelTol);
+ retval = sor_flat_3d(GH, FieldIndex, MIndex, NIndex, AbsTol, RelTol);
break;
default:
- CCTK_WARN(1,"Requested SOR solver for dimension equal"
+ CCTK_WARN(1,"sor_flat: Requested SOR solver for dimension equal"
"zero or gt. three not implemented!");
break;
}
+ return retval;
+
}