[Trilinos-Users] A question about ParamerList names and the XML name attribute
Kurtis Nusbaum
klnusbaum at gmail.com
Thu Apr 7 09:58:37 MDT 2011
This is functionality that in the past hasn't been part of ParameterLists. I
however have added it and its available in the current dev branch. It will
be available in the next release of Trilinos along with a mountain of other
new ParameterList serialization capabilities.
-------------
Peace, Love, and Source Code,
Kurtis
On Apr 7, 2011 10:52 AM, "Lori Pritchett-Sheats" <lpritch at lanl.gov> wrote:
I've been playing around with sample code based on the cxx_main.cpp
program in the ParameterList test directory and I noticed that I can not
set an XML name attribute for a ParameterList object but I can set an
XML name attribute for a sublist of a ParameterList object. Why?
Here's my code snippet based on cxx_main.cpp
ParameterList Sample("Sample Parameter List");
Sample.set("Parameter 1",1);
Sample.set("Parameter 2", "some kind of string");
Sample.set("Parameter 3", 1.23456789E-10);
ParameterList& SB_1 = Sample.sublist("Sublist 1");
SB_1.set("Num of iterations", 100);
SB_1.set("Tolerance", 1.000E-6);
writeParameterListToXmlFile(Sample,"Sample.xml");
and this is what I see in the XML file Sample.xml
<ParameterList>
<Parameter name="Parameter 1" type="int" value="1"/>
<Parameter name="Parameter 2" type="string" value="some kind of string"/>
<Parameter name="Parameter 3" type="double" value="1.23457e-10"/>
<ParameterList name="Sublist 1">
<Parameter name="Num of iterations" type="int" value="100"/>
<Parameter name="Tolerance" type="double" value="1e-06"/>
</ParameterList>
</ParameterList>
I expected to see '<ParameterList name="Sample Parameter List">' in the
first tag.
Is there a way to do that?
--
Lori A. Pritchett-Sheats, PhD.
CCS-2, Computational Physics and Methods
Office: 505-665-6675
Fax: 505-665-4972
Los Alamos National Laboratory
P.O. Box 1663
MS D413
Los Alamos, NM 87544
_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20110407/1ab3e913/attachment.html
More information about the Trilinos-Users
mailing list