[petsc-dev] please review quick patch
Barry Smith
bsmith at mcs.anl.gov
Thu Jun 30 20:41:48 CDT 2011
On Jun 30, 2011, at 5:23 PM, Lisandro Dalcin wrote:
> On 30 June 2011 18:04, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>
>> 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
>>
>
> Yes, you could have one...
>
>>
>> } else if (!snes->jacobian && snes->ops->computejacobian == MatMFFDComputeJacobian) {
>>
>>
>
> Yep, that should work... Could you push this fix?
Done
>
>> ?
>>
>> 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.
>>
>
> OK, That makes sense...
>
> Eventually, we will have a "basic" DM type that will work as a factory
> for Vec's and Mat's, and things should become actually simpler...
Maybe we should do it sooner rather than later, then we could do some simplifications and clean up the code.
Barry
>
>
> --
> 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