[petsc-users] confusion on the use of fieldsplit

Umut Tabak u.tabak at tudelft.nl
Sat Sep 7 04:59:20 CDT 2013


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?

Could you please help me at this point?

Best,
Umut


>     but I could not understand really the following steps on how to
>     associate a KSP object with Field split properties to use
>     different conditioners on different blocks? In the mean time,
>     continue on reading. If you can outline the basic steps on how to
>     construct this scheme and submit analysis with basic command line
>     options, that would of great help.
>
>
> 2) If you have the ISes to make a MatNest, just use them to make the FS:
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetIS.html
>
> so you have
>
>   PCFieldSplitSetIS(pc, "1", is1);
>   PCFieldSplitSetIS(pc, "2", is2);
>
> Now you can use all the fieldsplit options. There are many examples in 
> PETSc, see
>
>   src/snes/examples/tutorials/makefile
>
> and ex19 for instance.
>
>    Matt
>
>     By the way, is not possible to output blockA that is assembled
>     above on the standard output?
>
>     Best regards,
>     Umut
>
>
>
>
> -- 
> What most experimenters take for granted before they begin their 
> experiments is infinitely more interesting than any results to which 
> their experiments lead.
> -- Norbert Wiener

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130907/8c8f452d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ablock.bin
Type: application/octet-stream
Size: 128 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130907/8c8f452d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b.bin
Type: application/octet-stream
Size: 40 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130907/8c8f452d/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex2.c
Type: text/x-csrc
Size: 2656 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130907/8c8f452d/attachment.c>


More information about the petsc-users mailing list