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"}); 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() { CUIConfig *CFDStructDataSolverComputingControlManager::genUIConfig() {
return new CUIConfig( return new CUIConfig(
{ {

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

Loading…
Cancel
Save