Commits

BarryFSmith committed 8deb41e Merge

Merge branch 'barry/fix-matlab'

  • Participants
  • Parent commits e4d69e0, 077a9f7

Comments (0)

Files changed (3)

File src/ksp/pc/impls/fieldsplit/fieldsplit.c

 $     For the Schur complement preconditioner if J = ( A00 A01 )
 $                                                    ( A10 A11 )
 $     the preconditioner using full factorization is
-$              ( I   -A10 ksp(A00) ) ( inv(A00)     0  ) (     I          0  )
+$              ( I   -ksp(A00) A01 ) ( inv(A00)     0  ) (     I          0  )
 $              ( 0         I       ) (   0      ksp(S) ) ( -A10 ksp(A00)  I  )
-     where the action of inv(A00) is applied using the KSP solver with prefix -fieldsplit_0_. The action of
-     ksp(S) is computed using the KSP solver with prefix -fieldsplit_splitname_ (where splitname was given
+     where the action of inv(A00) is applied using the KSP solver with prefix -fieldsplit_0_.  S is the Schur complement
+$              S = A11 - A10 ksp(A00) A01
+     which is usually dense and not stored explicitly.  The action of ksp(S) is computed using the KSP solver with prefix -fieldsplit_splitname_ (where splitname was given
      in providing the SECOND split or 1 if not give). For PCFieldSplitGetKSP() when field number is 0,
      it returns the KSP associated with -fieldsplit_0_ while field number 1 gives -fieldsplit_1_ KSP. By default
      A11 is used to construct a preconditioner for S, use PCFieldSplitSchurPrecondition() to turn on or off this

File src/mat/impls/aij/seq/matlab/aijmatlab.c

 
   PetscFunctionBegin;
   mat  = mxCreateSparse(B->cmap->n,B->rmap->n,aij->nz,mxREAL);
-  ierr = PetscMemcpy(mxGetPr(mat),aij->a,aij->nz*sizeof(PetscScalar));CHKERRQ(ierr);
+  ierr = PetscMemcpy(mxGetPr(mat),aij->a,aij->nz*sizeof(PetscScalar));if (ierr) return PETSC_NULL;
   /* MATLAB stores by column, not row so we pass in the transpose of the matrix */
   jj = mxGetIr(mat);
   for (i=0; i<aij->nz; i++) jj[i] = aij->j[i];

File src/sys/classes/viewer/impls/socket/matlab/sopen.c

 {
   char               myname[MAXHOSTNAME+1];
   int                s;
-  PetscErrorCode     ierr;
   struct sockaddr_in sa;
   struct hostent     *hp;
 #if defined(PETSC_HAVE_UNAME)
 
   while (bind(s,(struct sockaddr*)&sa,sizeof(sa)) < 0) {
 #if defined(PETSC_HAVE_WSAGETLASTERROR)
+    PetscErrorCode     ierr;
     ierr = WSAGetLastError();
     if (ierr != WSAEADDRINUSE) {
 #else