[petsc-users] Variable arguments for DMComposite functions

Jed Brown jedbrown at mcs.anl.gov
Wed Aug 22 00:11:41 CDT 2012


On Tue, Aug 21, 2012 at 10:30 PM, Zhang <zyzhang at nuaa.edu.cn> wrote:

>
> Hi,
>
> I am using Petsc to write a multi-block CFD solver.
> Sometimes I just need access one or two specific DMs in a DMComposite, I
> just wonder how I can do this work other than to list all DMs in those
> DMComposite- functions with variable arguments, such as
>
>  DMCompositeGetEntries(...), etc.
>
> Why the developer not choose the arguments by number of DM to be accessed and then an array of pointers to them? Or is it possible for user to rewrite our own version of the above functions, like
>
>  DM* da_array[2];
>  DMCompositeGetEntries(user->pack,2,da_array);
>
>
There is also

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCompositeGetEntriesArray.html

You can write an application-specific accessor that pulls out only the ones
you are interested in.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120822/b32e1a4c/attachment.html>


More information about the petsc-users mailing list