<div dir="auto">To be clear,<div dir="auto"><br></div><div dir="auto">You are suggesting to use ufields(0)=0, ufields(1)=1 and so on?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Mer 9 Nov 2022, 13:54 Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com">edoardo.alinovi@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Even in the fortran interface?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Mer 9 Nov 2022, 13:52 Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" rel="noreferrer">knepley@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Fields are numbered from 0.<div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 9, 2022 at 2:20 AM Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com" rel="noreferrer noreferrer" target="_blank">edoardo.alinovi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello guys,<div><br></div><div>I am getting this error while using fieldsplit:</div><div><br></div><div>[3]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br><b>[3]PETSC ERROR: Nonconforming object sizes<br>[3]PETSC ERROR: Local column sizes 6132 do not add up to total number of columns 9200</b><br>[3]PETSC ERROR: See <a href="https://petsc.org/release/faq/" rel="noreferrer noreferrer" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[3]PETSC ERROR: Petsc Development GIT revision: v3.18.1-191-g32ed6ae2ff2 GIT Date: 2022-11-08 12:22:17 -0500<br>[3]PETSC ERROR: flubio_coupled on a gnu named alienware by edo Wed Nov 9 08:16:29 2022<br>[3]PETSC ERROR: Configure options PETSC_ARCH=gnu FOPTFLAGS=-O3 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 -with-debugging=no -download-fblaslapack=1 -download-superlu_dist -download-mumps -download-hypre -download-metis -download-parmetis -download-scalapack -download-ml -download-slepc -download-hpddm -download-cmake -with-mpi-dir=/home/edo/software/openmpi-4.1.1/build/<br>[3]PETSC ERROR: #1 MatCreateSubMatrix_MPIBAIJ_Private() at /home/edo/software/petsc/src/mat/impls/baij/mpi/mpibaij.c:1987<br>[3]PETSC ERROR: #2 MatCreateSubMatrix_MPIBAIJ() at /home/edo/software/petsc/src/mat/impls/baij/mpi/mpibaij.c:1911<br>[3]PETSC ERROR: #3 MatCreateSubMatrix() at /home/edo/software/petsc/src/mat/interface/matrix.c:8340<br>[3]PETSC ERROR: #4 PCSetUp_FieldSplit() at /home/edo/software/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c:657<br>[3]PETSC ERROR: #5 PCSetUp() at /home/edo/software/petsc/src/ksp/pc/interface/precon.c:994<br>[3]PETSC ERROR: #6 KSPSetUp() at /home/edo/software/petsc/src/ksp/ksp/interface/itfunc.c:406<br>[3]PETSC ERROR: #7 KSPSolve_Private() at /home/edo/software/petsc/src/ksp/ksp/interface/itfunc.c:825<br>[3]PETSC ERROR: #8 KSPSolve() at /home/edo/software/petsc/src/ksp/ksp/interface/itfunc.c:1071<br><br></div><div>Do you have any ideas? Probably something missing in my brief implementation here:</div><div><br></div><div><i> call PCSetType(mypc, PCFIELDSPLIT, ierr) <br><br> call PCFieldSplitSetBlockSize(mypc, 4-bdim, ierr)<br> </i></div><div><i> !2D, 3x3 block<br> if(bdim==1) then <br><br> ufields(1) = 0<br> ufields(2) = 1<br> pfields(1) = 2<br> call PCFieldSplitSetFields(mypc, "u", 2, ufields, ufields, ierr)<br> call PCFieldSplitSetFields(mypc, "p", 1, pfields, pfields, ierr)<br><br> ! 3D 4x4 block<br> else <br><br> ufields(1) = 0<br> ufields(2) = 1<br> ufields(3) = 2<br> pfields(1) = 3<br> call PCFieldSplitSetFields(mypc, "u", 3, ufields, ufields, ierr)<br> call PCFieldSplitSetFields(mypc, "p", 1, pfields, pfields, ierr)<br><br> endif <br> <br> ! Field split type ADDITIVE, MULTIPLICATIVE (default), SYMMETRIC_MULTIPLICATIVE, SPECIAL, SCHUR<br> call PCFieldSplitSetType(mypc, PC_COMPOSITE_SCHUR, ierr)</i><br></div><div><i><br></i></div><div>Thanks for the help!</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" rel="noreferrer noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>