Thanks for the quick answers.

For the moment, I’ll setup a MatNest with zero valued block and wait for Jed's 
answer for the correct solution.

On Jul 31, 2016, at 3:03 PM, Barry Smith <[email protected]> wrote:

> 
>> On Jul 31, 2016, at 4:56 PM, Stefano Zampini <[email protected]> 
>> wrote:
>> 
>> It’s the first time I’m trying to setup field split so maybe I’m missing 
>> something
>> 
>> I have a MatNest with NULL (1,1) block. I setup the field split using the 
>> row ISs from the MatNest (a note aside: why they cannot be inferred by 
>> FieldSplit if pc->pmat is of type MatNEST?)
> 
>   Good question, something Jed can fix :-)
> 
>> Options used are -pc_fieldsplit_type additive and 
>> -pc_fieldsplit_detect_saddle_point
> 
>   Hmm, I don't think -pc_fieldsplit_detect_saddle_point makes sense here 
> because that option determines the two index sets based on zeros on the 
> diagonal in the original matrix while you are providing the two index sets 
> yourself directly. Anyways it is probably being ignored, but don't use it.
> 
>> 
>> I then get this error, because MatGetSubMatrix_Nest returns a NULL pointer.
> 
>   Yes I suspect this is a bug; I don't know what Jed's intentions is. The 
> fieldsplit is already way to complicated I hate to see added a bunch of if 
> (!mat) stuff to it.  For now you could, as you say, pass in the correctly 
> sized empty matrix.
> 
>  Barry
> 
>> What is the solution? having MatGetSubMatrix_Nest return a zero-valued 
>> matrix of correct size? any command line option I’m not using? Or instead 
>> having Fieldsplit handle the case?
>> 
>> [0]PETSC ERROR: --------------------- Error Message 
>> --------------------------------------------------------------
>> [0]PETSC ERROR: Null argument, when expecting valid pointer
>> [0]PETSC ERROR: Null Object: Parameter # 1
>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for 
>> trouble shooting.
>> [0]PETSC ERROR: Petsc Development GIT revision: v3.7.2-744-gb54d608  GIT 
>> Date: 2016-06-28 18:20:20 +0300
>> [0]PETSC ERROR: Unknown Name on a debug named kl-13916.local by szampini Sun 
>> Jul 31 14:47:53 2016
>> [0]PETSC ERROR: Configure options --download-chaco --download-ctetgen 
>> --download-exodusii --download-hdf5 --download-hypre --download-metis 
>> --download-mpich --download-mumps --download-netcdf --download-p4est 
>> --download-parmetis --download-ptscotch --download-scalapack 
>> --download-suitesparse --download-triangle --with-valgrind-dir=/usr/local/ 
>> CC=/usr/local/bin/gcc-5 CXX=/usr/local/bin/g++-5 
>> FC=/usr/local/bin/gfortran-5 PETSC_ARCH=debug
>> [0]PETSC ERROR: #1 MatSetOptionsPrefix() line 654 in 
>> /Users/szampini/software/petsc/src/mat/interface/matrix.c
>> [0]PETSC ERROR: #2 PCSetUp_FieldSplit() line 558 in 
>> /Users/szampini/software/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c
>> [0]PETSC ERROR: #3 PCSetUp() line 968 in 
>> /Users/szampini/software/petsc/src/ksp/pc/interface/precon.c
>> 
> 

Reply via email to