From de838bd25496c2d2524b07194d81f7698aeb6e78 Mon Sep 17 00:00:00 2001 From: pollney Date: Thu, 2 Mar 2000 10:28:40 +0000 Subject: 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 --- src/petsc_confmetric.c | 4 ++-- src/petsc_confmetric_solver.c | 6 +++--- src/petsc_flat_solver.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/petsc_confmetric.c b/src/petsc_confmetric.c index e50cb13..ea78b3c 100644 --- a/src/petsc_confmetric.c +++ b/src/petsc_confmetric.c @@ -626,7 +626,7 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize, } /* M phi */ - 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 @@ -708,7 +708,7 @@ void petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize, } } - rhsval = -rhsval + Nlin[ijk] / ac; + rhsval = -rhsval - Nlin[ijk] / ac; /* printf("RHS(%d %d %d)+N: %f",i,j,k,rhsval);*/ ierr = VecSetValues(b,1,&I,&rhsval,INSERT_VALUES); 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