[petsc-users] confusion on the use of fieldsplit

Jed Brown jedbrown at mcs.anl.gov
Sat Sep 7 13:54:04 CDT 2013


Umut Tabak <u.tabak at tudelft.nl> writes:

> On 09/06/2013 06:16 PM, Matthew Knepley wrote:
>>
>>
>> 1) Forget about MatNest. It is completely orthogonal to FieldSplit. 
>> Its just an optimization.
> Hi Matt,
>
> Thanks, slowly getting there.
>
> Ok I built up a simple matrix in MATLAB and interfaced it to PETSc what 
> I would like to try to try with PETSc at the end is a similar system 
> with a similar operator like
>
> A =
> A C1
> C2 B
>
> as mentioned in my previous mail. I also found out your tutorial
>
> www.mcs.anl.gov/*petsc*/.../*ACTS*Tutorial2012.pdf?
>
> and there are some examples on the usage of Stokes problems. That is 
> exactly what I want to try for my problems, setting different 
> preconditioners and solvers for different blocks(I guess these are 
> denoted as splits, correct me if I am wrong).
>
> I investigated that presentation but I still have a problem somewhere. 
> The simple code is also attached with a simple matrix and the right hand 
> side vector. I have a problem on the field numbers.
>
> What I defined was the row index sets to set the fields but apparently 
> the error I get is telling me that I still have a single field when I 
> try to run
>
> ./ex2 -pc_type fieldsplit > simple_log
>
> And the output is
>
> [0]PETSC ERROR: --------------------- Error Message 
> ------------------------------------
> [0]PETSC ERROR: Petsc has generated inconsistent data!
> [0]PETSC ERROR: Unhandled case, must have at least two fields, not 1!
> [0]PETSC ERROR: 
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Release Version 3.4.2, Jul, 02, 2013
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR: 
> ------------------------------------------------------------------------
> [0]PETSC ERROR: ./ex2 on a linux-gnu-c-debug named hp8570w by utabak Sat 
> Sep  7 11:58:25 2013
> [0]PETSC ERROR: Libraries linked from 
> /home/utabak/external_libraries/petsc-3.4.2/linux-gnu-c-debug/lib
> [0]PETSC ERROR: Configure run at Fri Sep  6 14:18:08 2013
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-fc=gfortran 
> --with-cxx=g++ --download-f-blas-lapack=1 --with-mpi=1 
> --with-clanguage=cxx --download-mumps=1 --download-scalapack=1 
> --download-blacs=1 --download-superlu=1 --download-spooles=1 
> --download-umfpack=1 --download-mpich=1 --download-metis=1 
> --download-parmetis=1 -download-hypre=1 COPTFLAGS=-O3
> [0]PETSC ERROR: 
> ------------------------------------------------------------------------
> [0]PETSC ERROR: PCFieldSplitSetDefaults() line 440 in 
> /home/utabak/external_libraries/petsc-3.4.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c
> [0]PETSC ERROR: PCSetUp_FieldSplit() line 458 in 
> /home/utabak/external_libraries/petsc-3.4.2/src/ksp/pc/impls/fieldsplit/fieldsplit.c
> [0]PETSC ERROR: PCSetUp() line 890 in 
> /home/utabak/external_libraries/petsc-3.4.2/src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: KSPSetUp() line 278 in 
> /home/utabak/external_libraries/petsc-3.4.2/src/ksp/ksp/interface/itfunc.c
> [0]PETSC ERROR: KSPSolve() line 399 in 
> /home/utabak/external_libraries/petsc-3.4.2/src/ksp/ksp/interface/itfunc.c
>
> How can I correct this error?

You probably needed PCFieldSplitSetIS().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130907/4317293f/attachment.pgp>


More information about the petsc-users mailing list