1、完成计算控制,数据从json中读出配置

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

@ -33,6 +33,30 @@ void CFDStructDataSolverComputingControlManager::saveDataToDom(rapidjson::Docume
jsonAdd(dom, m_mpiLibType, {"couplingSolver", "mpi", "type"});
}
void CFDStructDataSolverComputingControlManager::readDataFromDom(rapidjson::Document &dom) {
QVariant temp;
jsonAdd(dom, temp, {"couplingSolver", "unSteady", "savedSteps"});
if (temp != QVariant()) {
m_DataSaveFrequency = temp.toInt();
}
jsonAdd(dom, temp, {"couplingSolver", "steady", "savedIters"});
if (temp != QVariant()) {
m_DataSaveFrequency = temp.toInt();
}
jsonAdd(dom, temp, {"couplingSolver", "mpi", "core"});
if (temp != QVariant()) {
m_NumericalComputationCores = temp.toInt();
}
jsonAdd(dom, temp, {"couplingSolver", "mpi", "on"});
if (temp != QVariant()) {
m_enableMPI = temp.toInt();
}
jsonAdd(dom, temp, {"couplingSolver", "mpi", "type"});
if (temp != QVariant()) {
m_mpiLibType = temp.toInt();
}
}
CUIConfig *CFDStructDataSolverComputingControlManager::genUIConfig() {
return new CUIConfig(
{

@ -17,6 +17,8 @@ class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverComputingControlManager : p
CUIConfig *getParamUIConfig();
void saveDataToDom(rapidjson::Document &dom);
void readDataFromDom(rapidjson::Document &dom);
private:
// 生成界面配置
CUIConfig *genUIConfig();

Loading…
Cancel
Save