[petsc-users] [PATCH 2/2] Call KSPSetFromOptions before setting fieldsplit-specific options
Umut Tabak
u.tabak at tudelft.nl
Sun Sep 8 04:23:51 CDT 2013
> Your splits were both the same, so the preconditioner was applied twice
> to the first block and zero to the second block. That made the
> preconditioner singular.
Dear Jed,
Thanks a lot for your time and help, attached you can find a very
challenging ill-conditioned problem:
The first block comes from a structural problem and its size is 1490.
The second block results from a fluid discretization and its size is
2432. So in total the coupled system is of size 3922. I created the
blocks as given in the simple problem. However, with
./ex3 -pc_type fieldsplit -pc_fieldsplit_type schur
-fieldsplit_1_pc_type icc -fieldsplit_1_ksp_type cg
-fieldsplit_1_pc_type icc -fieldsplit_1_ksp_type minres
-pc_fieldsplit_schur_factorization_type upper -ksp_monitor_true_residual
The solver just hangs.
The system is a symmetric system in this case given as
A =
A11 C
C^T A22
C is of size 1490X2432
Could you please comment on this point for me, do I still have an error
on the problem setup or on the usage of the options?
BR,
Umut
>
> ISCreateBlock(PETSC_COMM_SELF,bs,n1,inputindices,PETSC_COPY_VALUES,&is_row1);
> ISCreateBlock(PETSC_COMM_SELF,bs,n2,inputindices,PETSC_COPY_VALUES,&is_row2);
>
> We could check for this case, but it would require a little code and
> isn't currently done. This is probably what you wanted:
>
> diff --git i/ex2.c w/ex2.c
> index 94cea2c..0cce3e6 100644
> --- i/ex2.c
> +++ w/ex2.c
> @@ -45,7 +45,7 @@ int main(int argc,char **args)
> PetscInt bs = 2, n1=1, n2=1, inputindices[]={0,1}; /* block size is 2 */
>
> ISCreateBlock(PETSC_COMM_SELF,bs,n1,inputindices,PETSC_COPY_VALUES,&is_row1);
> - ISCreateBlock(PETSC_COMM_SELF,bs,n2,inputindices,PETSC_COPY_VALUES,&is_row2);
> + ISCreateBlock(PETSC_COMM_SELF,bs,n2,inputindices+n1,PETSC_COPY_VALUES,&is_row2);
>
> ISView(is_row1,PETSC_VIEWER_STDOUT_SELF);
> ISView(is_row2,PETSC_VIEWER_STDOUT_SELF);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: borg.bin
Type: application/octet-stream
Size: 31384 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130908/40680d50/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex3.c
Type: text/x-csrc
Size: 2861 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130908/40680d50/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Korg.bin
Type: application/octet-stream
Size: 1546016 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130908/40680d50/attachment-0003.bin>
More information about the petsc-users
mailing list