[Trilinos-Users] Teuchos::ParameterList: Control over order of entries?

Nico Schlömer nico.schloemer at ua.ac.be
Mon Mar 8 05:26:53 MST 2010


Hi all,

I'm using a Trilinos::ParameterList to some (double,int,unsigned int)
data which gets updated during runtime, and the contents of the list are
written to a file in a form like

=================== *snip* ===================
# paramA paramB specialParam ...
    0.1         12.1       -4
    0.2         12.1       -5
[...]
=================== *snap* ===================

For this, I loop through the ParameterList as

=================== *snip* ===================
for ( k=p.begin(); k!=p.end(); ++k )
{
     # print value to file
}
=================== *snap* ===================

Now, apparently loops through the list in alphabetical order of the
entry names. I'd like to have more control over the order of the column
in the file, e.g., by checking which of the entries got added first or
similar. Would it be correct to say that Teuchos::ParameterList's don't
have any such functionality at the moment?

Are there alternatives? I've looked into LOCA::ParameterVectors (which
really act like vectors, with each entry having an index), but they
don't seem to support heterogeneous content types.

Cheers,
Nico





More information about the Trilinos-Users mailing list