Added an xml storage section to importPhase(). Note this represents a

long standing bug in some ThermoPhase implementations, where the
xml tree was not being storred for the phase node in some cases.
This commit is contained in:
Harry Moffat 2009-10-11 21:38:42 +00:00
parent d503c55864
commit a258cdf083

View file

@ -418,6 +418,17 @@ namespace Cantera {
", is not a phase element.");
}
/*
* In this section of code, we get the reference to the
* phase xml tree within the ThermoPhase object. Then,
* we clear it and fill it with the current information that
* we are about to use to construct the object. We will then
* be able to resurrect the information later by calling xml().
*/
XML_Node &phaseNode_XML = th->xml();
phaseNode_XML.clear();
phase.copy(&phaseNode_XML);
// set the id attribute of the phase to the 'id' attribute
// in the XML tree.
th->setID(phase.id());