diff options
author | lanfer <lanfer@1d96b42b-98df-4a6a-9d84-1b24288d4588> | 1999-09-08 13:06:51 +0000 |
---|---|---|
committer | lanfer <lanfer@1d96b42b-98df-4a6a-9d84-1b24288d4588> | 1999-09-08 13:06:51 +0000 |
commit | d2890c2f9cba7aee80a2e72992c08d5041e85af5 (patch) | |
tree | a061cb3176d26f91623811ed6fe0611cc2b5c1a9 /src/petsc_wrapper.c | |
parent | c15500f177e9c1966a5286f2b12388c5ac24ece1 (diff) |
on the way to elliptic with PETSc
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllPETSc/trunk@4 1d96b42b-98df-4a6a-9d84-1b24288d4588
Diffstat (limited to 'src/petsc_wrapper.c')
-rw-r--r-- | src/petsc_wrapper.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/petsc_wrapper.c b/src/petsc_wrapper.c index 8cc39a4..15407c6 100644 --- a/src/petsc_wrapper.c +++ b/src/petsc_wrapper.c @@ -3,21 +3,35 @@ #include "cctk_parameters.h" #include "cctk_Flesh.h" +/* The wrapper functions for the core PETSc solver, that performs the + actual solve. + One wrapper fucntion for each class, because these functions are registered + with a fixed set up arguments. Still, they all call petsc_confmetric_solver + as the core solver. */ + +/* Wrapper function for the class of ellitpic equations that needs a metric */ void petsc_metric(cGH *GH, int *MetricI, int *FieldIndex, int *MIndex, int *NIndex, int *AbsTol, int *RelTol) { + /* Arrays for the M/N size info */ + void petsc_confmetric_solver(cGH *GH, int *MetricI, int MetricISize, int *FieldIndex, int *MIndex, int *NIndex, int *AbsTol, int *RelTol); + + + if (GH->cctk_dim>3) + CCTK_WARN(0,"This elliptic solver implementation does not do dimension>3!"); - petsc_confmetric_solver(GH, MetricI, 6, - FieldIndex, MIndex, NIndex, + petsc_confmetric_solver(GH, MetricI, 6, FieldIndex, + MIndex, NIndex, AbsTol, RelTol); } - +/* wrapper function for the class of ellitpic equations, that needs a conf. + factor */ void petsc_confmetric(cGH *GH, int *MetricPsiI, int *FieldIndex, int *MIndex, int *NIndex, int *AbsTol, int *RelTol) { @@ -26,6 +40,8 @@ void petsc_confmetric(cGH *GH, int *MetricPsiI, int *FieldIndex, int *FieldIndex, int *MIndex, int *NIndex, int *AbsTol, int *RelTol); + /* petsc_confmetric_solver expects an metric array, in the case of this + equation class, needs conf.factor as last entry -> size 7 */ petsc_confmetric_solver(GH, MetricPsiI, 7, FieldIndex, MIndex, NIndex, AbsTol, RelTol); |