From fdc13afb9f1b06d95c2d43454b62689a285ff829 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 18 Dec 2012 00:12:41 +0000 Subject: [PATCH] [1D] save/restore now includes the temperature fixed point This partially addresses Issue 90. --- src/oneD/StFlow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/oneD/StFlow.cpp b/src/oneD/StFlow.cpp index 5303de74c..775ef0b36 100644 --- a/src/oneD/StFlow.cpp +++ b/src/oneD/StFlow.cpp @@ -109,6 +109,9 @@ StFlow::StFlow(IdealGasPhase* ph, size_t nsp, size_t points) : m_points = points; m_thermo = ph; + m_zfixed = Undef; + m_tfixed = Undef; + if (ph == 0) { return; // used to create a dummy object } @@ -1064,6 +1067,8 @@ void StFlow::restore(const XML_Node& dom, doublereal* soln, int loglevel) pp = getFloat(dom, "pressure", "pressure"); setPressure(pp); + getOptionalFloat(dom, "t_fixed", m_tfixed); + getOptionalFloat(dom, "z_fixed", m_zfixed); vector d; dom.child("grid_data").getChildren("floatArray",d); @@ -1217,6 +1222,12 @@ void StFlow::save(XML_Node& o, const doublereal* const sol) } XML_Node& gv = flow.addChild("grid_data"); addFloat(flow, "pressure", m_press, "Pa", "pressure"); + + if (m_zfixed != Undef) { + addFloat(flow, "z_fixed", m_zfixed, "m"); + addFloat(flow, "t_fixed", m_tfixed, "K"); + } + addFloatArray(gv,"z",m_z.size(),DATA_PTR(m_z), "m","length"); vector_fp x(soln.nColumns());