<div class="gmail_quote">On Tue, Aug 21, 2012 at 10:30 PM, Zhang <span dir="ltr"><<a href="mailto:zyzhang@nuaa.edu.cn" target="_blank">zyzhang@nuaa.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#000000"><br>Hi,<br><br>I am using Petsc to write a multi-block CFD solver.<br>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 <br>
</font><pre width="80"><font color="#000000"> <a>DMCompositeGetEntries(...), etc.<br><br>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<br>
<br> DM* da_array[2];<br></a></font><a> </a><a>DMCompositeGetEntries</a>(user->pack,2,da_array);</pre></blockquote><div><br></div><div>There is also</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCompositeGetEntriesArray.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCompositeGetEntriesArray.html</a></div>
<div><br></div><div>You can write an application-specific accessor that pulls out only the ones you are interested in.</div></div>