[petsc-users] Create a DM given sets of IS's

Matthew Knepley knepley at gmail.com
Mon Dec 31 13:46:31 CST 2018


This does not do the coupling unless you do it by hand, which is equivalent
to the Section, but more cumbersome in my opinion.

  Matt

On Mon, Dec 31, 2018 at 10:20 AM Stefano Zampini via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> DMComposite?
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCompositeCreate.html#DMCompositeCreate
>
> Il giorno Lun 31 Dic 2018, 08:40 Justin Chang via petsc-users <
> petsc-users at mcs.anl.gov> ha scritto:
>
>> Hi all,
>>
>> I am solving a six field battery problem (concentration and potential for
>> each of the two solid and one electrolyte domains) and I want to experiment
>> with nested/recursice fieldsplitting. I have the IS's and am able to use
>> these to define my PCFieldSplitsSetIS(). However, I can imagine this
>> getting really messy from a programming standpoint, especially once I need
>> to add temperature into the mix, so it is my hope that I can translate
>> these index sets and fields into a DM (maybe DMShell?) so that I can just
>> rely on command line options to play around with various combinations of
>> field assignments and splits (e.g. -pc_fieldsplit_X_fields)
>>
>> However, it doesn't seem clear to me how I would create a DM when you
>> already know the IS's for each fields. If I understand functions like
>> DMCreateFieldDecomposition() correctly, it seems that it returns to you the
>> IS's and sub DM's associated with the original DM, whereas I want to do it
>> the other way around. Perhaps the "reversal" of something like
>> DMCreateFieldIS()
>> <https://www.mcs.anl.gov/petsc/petsc-dev/src/dm/interface/dm.c.html#DMCreateFieldIS>,
>> where you convert the IS into a PetscSection or is there an easier/better
>> way?
>>
>> Any thoughts/help appreciated!
>>
>> Justin
>>
>

-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181231/2c8066cb/attachment.html>


More information about the petsc-users mailing list