Re: [petsc-users] Index set does not match blocks

2018-04-08 Thread Smith, Barry F.
> On Apr 7, 2018, at 11:03 PM, Rongliang Chen wrote: > > Hi Barry, > > I tried the petsc-3.7.7 and my code works fine. Any suggestions for debug > this? Thanks. Works for 3.7.7 but not 3.8? I'm afraid you'll need to use git bisect, this will tell you exactly what change in PETSc breaks y

[petsc-users] PCFIELDSPLIT prefix

2018-04-08 Thread Rossi, Simone
Hello, I’m trying to set a prefix for a ksp context (from the libMesh PetscLinearSolver) that solves a “bidomain” problem. Currently I’m simply calling KSPSetOptionsPrefix(ksp,"bidomain_"); PCFieldSplitSetIS(ksp->pc,"v",is_v_local); PCFieldSplitSetIS(ksp->pc,"ve",is_ve_local); where is_v_loca

Re: [petsc-users] PCFIELDSPLIT prefix

2018-04-08 Thread Smith, Barry F.
I don't understand your question but suspect that the issue is related to the order you are calling functions. You may need a KSPSetFromOptions() after the KSPSetOptionsPrefix() but before the PCFieldSplitSetIS() Barry Note that it is ok to have multiple calls to KSPSetFromOptions() fo

Re: [petsc-users] PCFIELDSPLIT prefix

2018-04-08 Thread Rossi, Simone
Thanks Barry, That did it: I only had to specify KSPSetFromOptions() between KSPSetOptionsPrefix() and PCFieldSplitSetIS(). May I ask you how does that work? What do you mean by “depending on where you set the options prefix they may have different results”? I could not find a clear explanation

Re: [petsc-users] PCFIELDSPLIT prefix

2018-04-08 Thread Smith, Barry F.
> On Apr 8, 2018, at 11:39 AM, Rossi, Simone wrote: > > Thanks Barry, > That did it: I only had to specify KSPSetFromOptions() between > KSPSetOptionsPrefix() and PCFieldSplitSetIS(). > > May I ask you how does that work? What do you mean by “depending on where you > set the options prefix t

Re: [petsc-users] PCFIELDSPLIT prefix

2018-04-08 Thread Rossi, Simone
That’s good to know. Thanks. Simone > On Apr 8, 2018, at 12:42 PM, Smith, Barry F. wrote: > > > >> On Apr 8, 2018, at 11:39 AM, Rossi, Simone wrote: >> >> Thanks Barry, >> That did it: I only had to specify KSPSetFromOptions() between >> KSPSetOptionsPrefix() and PCFieldSplitSetIS(). >> >>

Re: [petsc-users] Index set does not match blocks

2018-04-08 Thread Rongliang Chen
Thanks Barry. I will try it but it seems highly nontrivial. Best, Rongliang On 04/08/2018 11:18 PM, Smith, Barry F. wrote: On Apr 7, 2018, at 11:03 PM, Rongliang Chen wrote: Hi Barry, I tried the petsc-3.7.7 and my code works fine. Any suggestions for debug this? Thanks. Works for 3.

Re: [petsc-users] Index set does not match blocks

2018-04-08 Thread Smith, Barry F.
> On Apr 8, 2018, at 7:17 PM, Rongliang Chen wrote: > > Thanks Barry. I will try it but it seems highly nontrivial. The first time you do it it seems overwhelming but once you get the hang of it it is actually pretty simple and very powerful. Much better than random guesses at what could b