diff options
author | lanfer <lanfer@57bc7290-fb3d-4efd-a9b1-28e84cce6043> | 1999-09-15 09:23:39 +0000 |
---|---|---|
committer | lanfer <lanfer@57bc7290-fb3d-4efd-a9b1-28e84cce6043> | 1999-09-15 09:23:39 +0000 |
commit | 34b71064d3b28eb62dd3f6a5969f14d985d48b63 (patch) | |
tree | 19f597296973181d99aa3312256fca1d39360da6 | |
parent | 7567b4b190b866e72b75348c213037a6e4f7946a (diff) |
new elliptic class: LinEllFlat
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllBase/trunk@8 57bc7290-fb3d-4efd-a9b1-28e84cce6043
-rw-r--r-- | src/Ell_Interface.c | 34 | ||||
-rw-r--r-- | src/Startup.c | 5 |
2 files changed, 36 insertions, 3 deletions
diff --git a/src/Ell_Interface.c b/src/Ell_Interface.c index 78058e7..33fe70e 100644 --- a/src/Ell_Interface.c +++ b/src/Ell_Interface.c @@ -11,8 +11,10 @@ static pNamedData *LinConfMetricSolverDB; static pNamedData *LinMetricSolverDB; +static pNamedData *LinFlatSolverDB; + +/*########## Elliptic Equation class: LinEllConfMetric */ -/* Elliptic Equation class: LinEllConfMetric */ /* Registers the Equation class wrapper (the function which is called for a specific class of problems by passing all the necessay arguments PLUS @@ -58,8 +60,8 @@ void FMODIFIER FORTRAN_NAME(Ell_LinConfMetricSolver) } -/* Elliptic Equation class: LinEllMetric */ -/* sam idea as described above */ +/*########## Elliptic Equation class: LinEllMetric */ + void Ell_LinMetricRegistry(void (*function), const char *sname) { StoreNamedData(&LinMetricSolverDB,sname,(void*)function); } @@ -84,3 +86,29 @@ void FMODIFIER FORTRAN_NAME(Ell_LinMetricSolver) free(sname); } + +/*########## Elliptic Equation class: LinEllFlat */ + +void Ell_LinFlatRegistry(void (*function), const char *sname) { + StoreNamedData(&LinFlatSolverDB,sname,(void*)function); +} + +void Ell_LinFlatSolver(cGH *GH, int *FieldIndex, int *MIndex, int *NIndex, + int *AbsTol, int *RelTol, const char *sname) { + + void (*fn)(cGH *GH, int *FieldIndex, int *MIndex, int *NIndex, + int *AbsTol, int *RelTol); + + fn = (void(*))GetNamedData(LinFlatSolverDB,sname); + if (!fn) CCTK_WARN(0,"Cannot find solver! "); + + fn(GH, FieldIndex, MIndex, NIndex, AbsTol, RelTol); +} + +void FMODIFIER FORTRAN_NAME(Ell_LinFlatSolver) + (cGH *GH, int *FieldIndex, + int *MIndex, int *NIndex, int *AbsTol, int *RelTol, ONE_FORTSTRING_ARG) { + ONE_FORTSTRING_CREATE(sname); + Ell_LinFlatSolver(GH, FieldIndex, MIndex, NIndex, AbsTol, RelTol, sname); + free(sname); +} diff --git a/src/Startup.c b/src/Startup.c index 02ac4d2..39fe81f 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -13,6 +13,7 @@ void Ell_RegisterBaseEqTypes(cGH *GH) { void Ell_RegisterEq(void (*function),const char *); void Ell_LinConfMetricRegistry(void (*function),const char *); void Ell_LinMetricRegistry(void (*function),const char *); + void Ell_LinFlatRegistry(void (*function),const char *); printf("Registering Ell_LinConfMetric...."); Ell_RegisterEq(Ell_LinConfMetricRegistry,"Ell_LinConfMetric"); @@ -22,6 +23,10 @@ void Ell_RegisterBaseEqTypes(cGH *GH) { Ell_RegisterEq(Ell_LinMetricRegistry,"Ell_LinMetric"); printf("...done\n"); + printf("Registering Ell_LinFlat...."); + Ell_RegisterEq(Ell_LinFlatRegistry,"Ell_LinFlat"); + printf("...done\n"); + } |