[petsc-users] 2 level schur

Matthew Knepley knepley at gmail.com
Fri Mar 21 18:29:55 CDT 2014


On Fri, Mar 21, 2014 at 3:33 PM, Luc Berger-Vergiat <lb2653 at columbia.edu>wrote:

>  I hear you though that is not what petsc does.
> When I name the fields as you suggest:
>
> -fieldsplit_0_fieldsplit_Field_0_fields 1
>  -fieldsplit_0_fieldsplit_Field_1_fields 0
>
>
I could be wrong. Is it possible to reproduce this bad behavior with SNES
ex19, which has four fields?

  Thanks,

     Matt


> petsc ignores it and still call the fields
>
> -fieldsplit_0_fieldsplit_Field_2
> -fieldsplit_0_fieldsplit_Field_3
>
> But the automatic naming scheme is not really the issue. It would just be
> nice to be able to switch the two fields.
> I will try to change the order in which I pass the IS to the DM and see if
> I can go around the problem that way.
>
> Best,
> Luc
>
> On 03/21/2014 12:13 PM, Matthew Knepley wrote:
>
>  On Fri, Mar 21, 2014 at 9:37 AM, Luc Berger-Vergiat <lb2653 at columbia.edu>wrote:
>
>>  Is there a way to now what the new numbering is?
>> I am assuming that in y example since there are two fields only the
>> numbers associated with them are 0 and 1 hence I tried:
>>
>> -fieldsplit_0_fieldsplit_Field_2_fields 1
>> -fieldsplit_0_fieldsplit_Field_3_fields 0
>>
>>
>  If its an inner fieldsplit, the numbering for options starts over again
>
>    -fieldsplit_0_fieldsplit_Field_0_fields 1
>    -fieldsplit_0_fieldsplit_Field_1_fields 0
>
>    Thanks,
>
>       Matt
>
>>   which did not work. As mentioned earlier, the following does not work
>> either:
>>
>> -fieldsplit_0_fieldsplit_Field_2_fields 3
>> -fieldsplit_0_fieldsplit_Field_3_fields 2
>>
>> and without too much expectation I also passed the following
>>
>> -fieldsplit_0_fieldsplit_Field_2_fields Field_3
>> -fieldsplit_0_fieldsplit_Field_3_fields Field_2
>>
>> to no avail.
>>
>> By the way I attached the output from -ksp_view in case I might be doing
>> something wrong?
>>
>> Best,
>> Luc
>>
>> On 03/20/2014 09:01 PM, Matthew Knepley wrote:
>>
>>  On Thu, Mar 20, 2014 at 6:20 PM, Luc Berger-Vergiat <lb2653 at columbia.edu
>> > wrote:
>>
>>>  Hi all,
>>> I am solving a four field problem using two Schur complements. Here are
>>> the arguments that I usually pass to PETSc to do it:
>>>
>>> -ksp_type gmres -pc_type fieldsplit -pc_fieldsplit_type schur
>>> -pc_fieldsplit_schur_factorization_type full
>>> -pc_fieldsplit_schur_precondition selfp -pc_fieldsplit_0_fields 2,3
>>> -pc_fieldsplit_1_fields 0,1 -fieldsplit_0_ksp_type preonly
>>> -fieldsplit_0_pc_type fieldsplit -fieldsplit_0_pc_fieldsplit_type schur
>>> -fieldsplit_0_pc_fieldsplit_schur_factorization_type full
>>> -fieldsplit_0_pc_fieldsplit_schur_precondition selfp
>>> -fieldsplit_0_fieldsplit_Field_2_fields 2
>>> -fieldsplit_0_fieldsplit_Field_3_fields 3
>>> -fieldsplit_0_fieldsplit_Field_2_ksp_type preonly
>>> -fieldsplit_0_fieldsplit_Field_2_pc_type ilu
>>> -fieldsplit_0_fieldsplit_Field_3_ksp_type preonly
>>> -fieldsplit_0_fieldsplit_Field_3_pc_type jacobi -fieldsplit_1_ksp_type
>>> preonly -fieldsplit_1_pc_type lu -malloc_log mlog -log_summary time.log
>>>
>>> One issue with this is that when I change
>>> -fieldsplit_0_fieldsplit_Field_2_fields 2 to
>>> -fieldsplit_0_fieldsplit_Field_2_fields 3 it is ineffective, as if PETSc
>>> automatically assign IS 2 to Field 2 even though it is not what I want.
>>> Is there a way to pass the arguments correctly so that PETSc goes about
>>> switching the IS set of -fieldsplit_0_fieldsplit_Field_2 and
>>> -fieldsplit_0_fieldsplit_Field_3?
>>> This is crucial to me since I am using the selfp option and the matrix
>>> associated to IS 3 is diagonal. By assigning the fields correctly I can get
>>> an exact Schur preconditioner and hence very fast convergence. Right now my
>>> convergence is not optimal because of this.
>>>
>>
>>  I believe the inner Schur field statements should not be using the
>> original numbering, but the inner numbering, after they have been reordered.
>>
>>     Matt
>>
>>
>>> Thanks!
>>>
>>> Best,
>>> Luc
>>>
>>
>>
>>
>>  --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>>
>>
>
>
>  --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140321/925efc5f/attachment-0001.html>


More information about the petsc-users mailing list