[petsc-dev] please review quick patch
Barry Smith
bsmith at mcs.anl.gov
Thu Jun 30 16:04:36 CDT 2011
On Jun 30, 2011, at 3:58 PM, Lisandro Dalcin wrote:
> On 30 June 2011 13:03, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>
>> Don't expect me to know send this to petsc-dev.
>>
>
> After running hg annotate, I mailed you.
>
> changeset: 19287:a207bd97a600
> parent: 19277:0315f81e6125
> user: Barry Smith <bsmith at mcs.anl.gov>
> date: Mon Jun 20 09:04:56 2011 -0600
> summary: SNES handles -snes_mf_operator and -snes_mf with
> -snes_grid_sequencing and SNESSetDM()
>
>>
>> I am not sure why you only want to do this if snes->dm? ????
>>
>
> Because the code seems wrong: it overrides any MatMFFD already set in
> SNES, thus ignoring any -snes_mf_version option.
So you already have a matrix in there? Then perhaps it should check
} else if (!snes->jacobian && snes->ops->computejacobian == MatMFFDComputeJacobian) {
?
The reason I add this is because if the SNES is reset (for example because the grid is refined) the old matrices are lost but it knows it should be using MatMFFDComputeJacobian and hence needs a MatMFFD
I admit this is slightly hacky but it comes from the fact that I don't want to require another call to SNESSetFromOptions() after the SNESReset() and I don't have a clean universal solution.
Barry
>
> I though this change was required for handling snes->dm, but it seems
> I was wrong.
>
>
>
>
>
> --
> Lisandro Dalcin
> ---------------
> CIMEC (INTEC/CONICET-UNL)
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> 3000 Santa Fe, Argentina
> Tel: +54-342-4511594 (ext 1011)
> Tel/Fax: +54-342-4511169
More information about the petsc-dev
mailing list