diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.cpp index 187c5da..2597f5a 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.cpp @@ -38,17 +38,29 @@ void CFDStructDataSolverBasicModelManager::saveDataToDom(rapidjson::Document &do void CFDStructDataSolverBasicModelManager::readDataFromDom(rapidjson::Document &dom) { QVariant temp; jsonRead(dom, temp, {"region", 0, "flowType"}); - m_FlowModel = temp.toInt(); + if (temp != QVariant()) { + m_FlowModel = temp.toInt(); + } jsonRead(dom, temp, {"region", 0, "chimeraMesh"}); - m_OverlayNetwork = temp.toInt(); + if (temp != QVariant()) { + m_OverlayNetwork = temp.toInt(); + } jsonRead(dom, temp, {"region", 0, "refValue", "rgas_mean"}); - m_Rgasmean = temp.toDouble(); + if (temp != QVariant()) { + m_Rgasmean = temp.toDouble(); + } jsonRead(dom, temp, {"region", 0, "refValue", "gamma"}); - m_Gmean = temp.toDouble(); + if (temp != QVariant()) { + m_Gmean = temp.toDouble(); + } jsonRead(dom, temp, {"region", 0, "solver", "turbModel", "RANS", "params", "Prl"}); - m_Prlmean = temp.toDouble(); + if (temp != QVariant()) { + m_Prlmean = temp.toDouble(); + } jsonRead(dom, temp, {"region", 0, "solver", "turbModel", "RANS", "params", "Prt"}); - m_Prtmean = temp.toDouble(); + if (temp != QVariant()) { + m_Prtmean = temp.toDouble(); + } } /**