aboutsummaryrefslogtreecommitdiff
path: root/src/petsc_confmetric_solver.c
diff options
context:
space:
mode:
authorpollney <pollney@1d96b42b-98df-4a6a-9d84-1b24288d4588>2000-03-02 10:28:40 +0000
committerpollney <pollney@1d96b42b-98df-4a6a-9d84-1b24288d4588>2000-03-02 10:28:40 +0000
commitde838bd25496c2d2524b07194d81f7698aeb6e78 (patch)
treefbcc8c1a4f1b0b54cc61662adc2844210ba3f828 /src/petsc_confmetric_solver.c
parentd9e9c11d343adb35ea877a74fcacc0866c5ec895 (diff)
Switch signs for M and N in the EllBase interface so that it now solves
L\phi + M\phi + N\phi = 0 (in line with BAM_Elliptic). git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllPETSc/trunk@34 1d96b42b-98df-4a6a-9d84-1b24288d4588
Diffstat (limited to 'src/petsc_confmetric_solver.c')
-rw-r--r--src/petsc_confmetric_solver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/petsc_confmetric_solver.c b/src/petsc_confmetric_solver.c
index e3fe482..39958db 100644
--- a/src/petsc_confmetric_solver.c
+++ b/src/petsc_confmetric_solver.c
@@ -300,7 +300,7 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize,
endpoint = startpoint;
/* ...and continue running over our own region to get our endpoint */
- for (k=imin;k<kmax;k++)
+ for (k=kmin;k<kmax;k++)
for (j=jmin;j<jmax;j++)
for (i=imin;i<imax;i++)
wsp[DATINDEX(pughGH,i,j,k)] = endpoint++;
@@ -735,7 +735,7 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize,
/* M phi */
if (Mstorage)
- a(0,0,0) = a(0,0,0) - Mlin[ijk];
+ a(0,0,0) = a(0,0,0) + Mlin[ijk];
/* Great now set the values of the matrix. This is
really painful due to the boundaries (here we force
@@ -826,7 +826,7 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize,
}
if (Nstorage)
- rhsval = -rhsval + Nlin[ijk] / ac;
+ rhsval = -rhsval - Nlin[ijk] / ac;
ierr = VecSetValues(b,1,&I,&rhsval,INSERT_VALUES);
CHKERRA(ierr);