<div class="gmail_quote">On Sat, Mar 17, 2012 at 12:43, Mark F. Adams <span dir="ltr"><<a href="mailto:mark.adams@columbia.edu">mark.adams@columbia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">I am looking for prescriptions.  Several of my problems are local functions, I guess I can make these static (I assume this works for functions).  I made some attempt to name space some of these (<span style="font-family:'courier new',monospace">gamg_setup_events</span>) and others are tools that need to be global (<span style="font-family:'courier new',monospace">createSimpleGraph</span>)  -- how should I fix these?  PetscCreateSimpleGraph?</div>
</blockquote></div><br><div>If it doesn't have a man page, it's not a public interface, so don't let it grow outside of its current use environment. If it's in the same file, just make it static. If it needs to be shared between multiple implementation files, use the namespace you are working under, e.g. PCGAMGCreateSimpleGraph() or PCGAMGCreateSimpleGraph_Private() to make it more explicit that this is an internal interface.</div>
<div><br></div><div>I don't understand why you have this gamg_setup_events. These event names are anything but intuitive in the sense that they don't stand alone and is denormalized (which makes it non-grepable). I also don't think it makes sense for GAMG to have its own classid since it's not a new PetscObject. I suggest registering with</div>
<div><br></div><div>PetscLogEventRegister("PCGAMGCreateProl", PC_CLASSID, &PC_GAMGCreateProl);</div><div><br></div><div>and similarly for other events</div><div><br></div><div><div><font face="'courier new', monospace">PCGAMGCreateProl</font></div>
<div><font face="'courier new', monospace">PCGAMGGraph</font></div><div><font face="'courier new', monospace">PCGAMGGeoGrowSupp</font></div><div><font face="'courier new', monospace">PCGAMGGeoTriangle</font></div>
<div><font face="'courier new', monospace">PCGAMGPartLevel</font></div></div><div><font face="'courier new', monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">In most cases, the event names should approximately (subject to length constraints) match the routines that implement those events.</font></div>