[petsc-dev] Lagging the numerical factorization for one of the fields of fieldsplit preconditioner
Barry Smith
bsmith at mcs.anl.gov
Mon Mar 14 18:49:47 CDT 2011
On Mar 14, 2011, at 6:38 PM, Shri wrote:
>
>
> ----- Original Message -----
>> Shri,
>>
>> In theory the flag for KSPSetOperators() (for example
>> SAME_PRECONDITIONER) is propagated down through the PCFIELDSPLIT into
>> the PC that is used on the A block. So in at least simple
>> circumstances if you use -snes_lag_preconditioner it should "just
>> work". I traced through the PCFIELDSPLIT and it does attempt to pass
>> it down.
>>
>> Is it not working as expected?
>
> Yes,-snes_lag_preconditioner works as expected i.e it either builds both or none.
>
>>
>> Of course this means that any other part of the preconditioner are
>> also not rebuilt. So I guess if you used additive or multiplicative
>> fieldsplit with 2 splits it won't update a factorization of D etc.
>
>> Do you want other things rebuilt, just not this one thing.
>
> Yes. This is exactly that i am looking for.
>
> The system i'm trying to solve is of the form
> 0 = A*y + g(x)
> 0 = f(x,y)
> which has the jacobian
>
> | A dg_dx |
> | df_dy df_dx |
>
> I'm using the schur preconditioner which needs factorization of A and (df_dx - df_dy*inv(A)*dg_dx). Since,A is constant
> it needs to be factorized only once while (df_dx - df_dy*inv(A)*dg_dx) is not constant and needs to be refactorized.
>
>> This will be
>> tricky because we don't have a mechanism to pass this information down
>> into PCFIELDSPLIT. Tell me exactly what you want to do that it cannot
>> currently do and I'll what we can do about it.
>
> Currently,the factorization is done for 'both or none'.I wanted the factorization to be done for 'either,both,or none'.
> I was thinking about having an option say -fieldsplit_xxx_lag_preconditioner <niterations> which
> will delay the refactorization for field xxx by niterations and if niterations
> is set to -1 then it will not update the factorization.
Yuck, I hate to have something so specific to this case. I'll think about it see if there is a better way.
Barry
>
> Thanks,
> Shri
>
>>
>> Barry
>>
>>
>>
>> On Mar 14, 2011, at 4:41 PM, Shri wrote:
>>
>>>
>>> | A B | |dx| |fx|
>>> Jacobian = =
>>> | C D | |dy| |fy|
>>>
>>> While solving this linear system with a fieldsplit precondioner,is
>>> there a way to lag the numerical factorization of the A matrix. The
>>> A matrix in my application is constant and is about 3-4 times bigger
>>> than the D matrix. The log summary shows that about 90% of the time
>>> is spent in the numerical factorization phase. So i would like to do
>>> the numerical factorization for A matrix just once and not have it
>>> factorized for all the snes iterations.
>>> Speaking on the same note, should snes lag_preconditioner
>>> functionality be moved to ksp or maybe a
>>> -fieldsplit_xxx_lag_preconditioner option?
>>>
>>> Thanks,
>>> Shri
More information about the petsc-dev
mailing list