[petsc-users] Use of PCFieldSplitSetSchurPre

Mark Adams mfadams at lbl.gov
Thu Aug 21 23:05:41 CDT 2014


I fixed the messed up fortran enums with:

!
! PCFieldSplitSchurPreType
!
      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_SELF
      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_SELFP
      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_A11
      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_USER
      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_FULL
      parameter (PC_FIELDSPLIT_SCHUR_PRE_SELF=0)
      parameter (PC_FIELDSPLIT_SCHUR_PRE_SELFP=1)
      parameter (PC_FIELDSPLIT_SCHUR_PRE_A11=2)
      parameter (PC_FIELDSPLIT_SCHUR_PRE_USER=3)
      parameter (PC_FIELDSPLIT_SCHUR_PRE_FULL=4)

But I still don't get the right thing without setting the KSP operator
explicitly.

I traced through PCFieldSplitSetSchurPre_FieldSplit and it sets the
jac->schurpre flag and the jac->schur_user matrix pointer correctly.  This
method does not do much but it now seems to be doing it correctly.



On Thu, Aug 21, 2014 at 4:06 PM, Mark Adams <mfadams at lbl.gov> wrote:

> Yep, it looks like SELFP was not added to FORTRAN:
>
> 6:04 1 edison03 master ~/petsc_private/include$ grep
> PC_FIELDSPLIT_SCHUR_PRE *
> petscpc.h:typedef enum
> {PC_FIELDSPLIT_SCHUR_PRE_SELF,PC_FIELDSPLIT_SCHUR_PRE_SELFP,PC_FIELDSPLIT_SCHUR_PRE_A11,PC_FIELDSPLIT_SCHUR_PRE_USER,PC_FIELDSPLIT_SCHUR_PRE_FULL}
> PCFieldSplitSchurPreType;
> 16:04 edison03 master ~/petsc_private/include$ grep
> PC_FIELDSPLIT_SCHUR_PRE finclude/*
> finclude/petscpc.h:      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_SELF
> finclude/petscpc.h:      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_A11
> finclude/petscpc.h:      PetscEnum PC_FIELDSPLIT_SCHUR_PRE_USER
> finclude/petscpc.h:      parameter (PC_FIELDSPLIT_SCHUR_PRE_SELF=0)
> finclude/petscpc.h:      parameter (PC_FIELDSPLIT_SCHUR_PRE_A11=1)
> finclude/petscpc.h:      parameter (PC_FIELDSPLIT_SCHUR_PRE_USER=2)
>
>
>
> On Thu, Aug 21, 2014 at 3:49 PM, Mark Adams <mfadams at lbl.gov> wrote:
>
>>
>>> I would set a breakpoint at PCFieldSplitSetSchurPre_FieldSplit and then
>>> watch -l jac->schurpre since it appears that your information is being
>>> lost somewhere.
>>>
>>
>> The 'ptype" that comes in to PCFieldSplitSetSchurPre_FieldSplit  is
>> ..._SCHUR_PRE_ALL (not .._USER).  Could the enums be messed up in F90?
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140821/353b29a2/attachment.html>


More information about the petsc-users mailing list