diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp index 24bca3d..fe4ae1a 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp @@ -1,27 +1,22 @@ +#include "CFDStructDataSolverComputingControlManager.h" #include "CFDStructDataSolverTimeModeManager.h" -#include "CUIProperty/CUIConfig.h" #include "CFDStructMain/CFDStructDefine.h" #include "CFDStructSigsCenter.h" +#include "CUIProperty/CUIConfig.h" #include "CUIProperty/CUISigsCenter.h" #include -#include "CFDStructDataSolverComputingControlManager.h" -CFDStructDataSolverComputingControlManager::CFDStructDataSolverComputingControlManager(QObject *parent) : CFDStructDataManagerBase(parent) -{ +CFDStructDataSolverComputingControlManager::CFDStructDataSolverComputingControlManager(QObject *parent) : CFDStructDataManagerBase(parent) { m_uiConfig = nullptr; - connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) - { emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); }); + connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) { emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); }); } -CFDStructDataSolverComputingControlManager::~CFDStructDataSolverComputingControlManager() -{ +CFDStructDataSolverComputingControlManager::~CFDStructDataSolverComputingControlManager() { // CFDStructDataManagerBase::~CFDStructDataManagerBase(); } -CUIConfig *CFDStructDataSolverComputingControlManager::getParamUIConfig() -{ - if (m_uiConfig != nullptr) - { +CUIConfig *CFDStructDataSolverComputingControlManager::getParamUIConfig() { + if (m_uiConfig != nullptr) { delete m_uiConfig; m_uiConfig = nullptr; } @@ -30,13 +25,13 @@ CUIConfig *CFDStructDataSolverComputingControlManager::getParamUIConfig() return m_uiConfig; } -void CFDStructDataSolverComputingControlManager::saveDataToDom(rapidjson::Document &dom) -{ - +void CFDStructDataSolverComputingControlManager::saveDataToDom(rapidjson::Document &dom) { + jsonAdd(dom, m_DataSaveFrequency, {couplingSolver unSteady savedSteps}); + jsonAdd(dom, m_DataSaveFrequency, {couplingSolver steady savedIters}); + jsonAdd(dom, m_NumericalComputationCores, {couplingSolver mpi core}); } -CUIConfig *CFDStructDataSolverComputingControlManager::genUIConfig() -{ +CUIConfig *CFDStructDataSolverComputingControlManager::genUIConfig() { return new CUIConfig( { {"type", "Widget"}, diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h index 647760e..f4f579a 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h @@ -4,32 +4,32 @@ #ifndef CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H #define CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H -#include #include "CFDStructDataManager_global.h" +#include class CUIConfig; -class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverComputingControlManager : public CFDStructDataManagerBase -{ +class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverComputingControlManager : public CFDStructDataManagerBase { Q_OBJECT -public: + public: explicit CFDStructDataSolverComputingControlManager(QObject *parent = nullptr); ~CFDStructDataSolverComputingControlManager(); CUIConfig *getParamUIConfig(); void saveDataToDom(rapidjson::Document &dom); -private: + private: // 生成界面配置 CUIConfig *genUIConfig(); -signals: + signals: -private: + private: // 数据保存频率 int m_DataSaveFrequency; // Data Save Frequency // 数值计算核数 int m_NumericalComputationCores = 0; + // ??表中没有 // 网格组装核数 int m_MeshAssemblyCores = 0; };