[petsc-users] using PCFieldSplitGetSubKSP in c++

Jed Brown jedbrown at mcs.anl.gov
Mon Mar 12 07:59:18 CDT 2012


On Mon, Mar 12, 2012 at 02:56, Klaij, Christiaan <C.Klaij at marin.nl> wrote:

> >Declare this as KSP *subksp;
>

Compare this ^^^^^^^^^^^


> >
> >   Matt
> >
>
> Thanks Matt, but when I do that I cannot use KSPSetNullSpace:
>
>  KSP *subksp[2];
>

To this ^^^^^^^^^^


>  PetscInt n=2;
>  ierr = PCFieldSplitGetSubKSP(pc,&n,subksp); CHKERRQ(ierr);
>  ierr = KSPSetNullSpace(subksp[1],subnullsp); CHKERRQ(ierr);
>
> This gives the error:
>
>  error: argument of type "KSP *" is incompatible with parameter of type
>  "KSP"
>    ierr = KSPSetNullSpace(subksp[1],subnullsp); CHKERRQ(ierr);
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120312/df1937b0/attachment.htm>


More information about the petsc-users mailing list