1、修改基本模型中数据从json读入的逻辑,添加了判断读出数据是否为空

feature/struct-menu-20241023
mzh 1 week ago
parent 8a040a2adf
commit b080d0ee33

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

Loading…
Cancel
Save