aboutsummaryrefslogtreecommitdiff
path: root/src/Ell_Interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ell_Interface.c')
-rw-r--r--src/Ell_Interface.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/Ell_Interface.c b/src/Ell_Interface.c
index 7d086a6..e235b9e 100644
--- a/src/Ell_Interface.c
+++ b/src/Ell_Interface.c
@@ -12,6 +12,8 @@
static pNamedData *LinConfMetricSolverDB;
static pNamedData *LinMetricSolverDB;
static pNamedData *LinFlatSolverDB;
+static pNamedData *BrBrConfMetricSolverDB;
+static pNamedData *PolyConfMetricSolverDB;
#define ELLBASE_NOSOLVER 1
#define ELLBASE_OK 0
@@ -70,6 +72,7 @@ void FMODIFIER FORTRAN_NAME(Ell_LinConfMetricSolver)
}
+
/*########## Elliptic Equation class: LinEllMetric */
void Ell_LinMetricRegistry(void (*function), const char *sname) {
@@ -101,6 +104,8 @@ void FMODIFIER FORTRAN_NAME(Ell_LinMetricSolver)
}
+
+
/*########## Elliptic Equation class: LinEllFlat */
void Ell_LinFlatRegistry(void (*function), const char *sname) {
@@ -130,3 +135,76 @@ void FMODIFIER FORTRAN_NAME(Ell_LinFlatSolver)
*ierr = Ell_LinFlatSolver(GH, *FieldIndex, *MIndex, *NIndex, AbsTol, RelTol, sname);
free(sname);
}
+
+
+
+/*########## Elliptic Equation class: BrBrConfMetric
+ (Brandt-Bruemann Data with conformal metric) */
+
+void Ell_BrBrConfMetricRegistry(void (*function), const char *sname) {
+ StoreNamedData(&BrBrConfMetricSolverDB,sname, (void*)function);
+}
+
+int Ell_BrBrConfMetricSolver(cGH *GH, int *MetricPsi, int FieldIndex,
+ int MIndex, int NIndex,
+ CCTK_REAL *AbsTol, CCTK_REAL *RelTol,
+ const char *sname) {
+
+ void (*fn)(cGH *GH,int *MetricPsi, int FieldIndex, int MIndex, int NIndex,
+ CCTK_REAL *AbsTol, CCTK_REAL *RelTol);
+
+ fn = (void(*))GetNamedData(BrBrConfMetricSolverDB,sname);
+
+ if (!fn) {
+ CCTK_WARN(2,"Cannot find solver! ");
+ return(ELLBASE_NOSOLVER);
+ }
+
+ fn(GH, MetricPsi, FieldIndex, MIndex, NIndex, AbsTol, RelTol);
+ return(ELLBASE_OK);
+}
+
+void FMODIFIER FORTRAN_NAME(Ell_BrBrConfMetricSolver)
+ (int *ierr, cGH *GH, int *MetricPsi, int *FieldIndex,
+ int *MIndex, int *NIndex, CCTK_REAL *AbsTol, CCTK_REAL *RelTol, ONE_FORTSTRING_ARG) {
+
+ ONE_FORTSTRING_CREATE(sname);
+ *ierr = Ell_BrBrConfMetricSolver(GH, MetricPsi, *FieldIndex, *MIndex, *NIndex,
+ AbsTol, RelTol, sname);
+ free(sname);
+}
+
+
+/*########## Elliptic Equation class: PolyConfMetric */
+
+void Ell_PolyConfMetricRegistry(void (*function), const char *sname) {
+ StoreNamedData(&PolyConfMetricSolverDB,sname, (void*)function);
+}
+
+int Ell_PolyConfMetricSolver(cGH *GH, int *MetricPsi, int FieldIndex,
+ int *PIndex, int Pcount, CCTK_REAL *AbsTol, CCTK_REAL *RelTol,
+ const char *sname) {
+
+ void (*fn)(cGH *GH,int *MetricPsi, int FieldIndex, int *PIndex, int Pcount,
+ CCTK_REAL *AbsTol, CCTK_REAL *RelTol);
+
+ fn = (void(*))GetNamedData(PolyConfMetricSolverDB,sname);
+
+ if (!fn) {
+ CCTK_WARN(2,"Cannot find solver! ");
+ return(ELLBASE_NOSOLVER);
+ }
+
+ fn(GH, MetricPsi, FieldIndex, PIndex, Pcount, AbsTol, RelTol);
+ return(ELLBASE_OK);
+}
+
+void FMODIFIER FORTRAN_NAME(Ell_PolyConfMetricSolver)
+ (int *ierr, cGH *GH, int *MetricPsi, int *FieldIndex,
+ int *PIndex, int *Pcount, CCTK_REAL *AbsTol, CCTK_REAL *RelTol, ONE_FORTSTRING_ARG) {
+
+ ONE_FORTSTRING_CREATE(sname);
+ *ierr = Ell_PolyConfMetricSolver(GH, MetricPsi, *FieldIndex, PIndex, *Pcount,
+ AbsTol, RelTol, sname);
+ free(sname);
+}