<div class="gmail_quote">On Sat, Aug 13, 2011 at 23:09, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":3h">Not sure it is really a viewer? It is an AMS published memory (bunch of fields) for the object, not sure if it makes sense to consider that a subclass of PetscViewer<br></div></blockquote><div><br></div><div>
In the viewer/monitor case, some of those fields are stack, not heap. They may be computed and thrown away. This makes them different in that in addition to being read-only, they can only be accessed at the moment they are published. Is this somehow not a relevant distinction?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":3h">
<div class="im"><br>
> that has the object, name, type, and help string for every piece of information being exposed?<br>
<br>
</div>   Yes, I think the only thing missing is the "help string" for each field.  For example currently it is<br>
<br>
ierr = AMS_Memory_add_field(obj->amem,"its",&ksp->its,1,AMS_INT,AMS_READ,AMS_COMMON,AMS_REDUCT_UNDEF);CHKERRQ(ierr);<br>
<br>
"its" is the help string. We could have a convention that the string is done as "variablename: useful message" for example  "its: the number of iterations the Krylov solver is currently at" then the GUI can process it anyway it wants.</div>
</blockquote></div><br><div>Might be better to change the API now to distinguish the name and the help string just like for options?</div>