From 78de49e1c0308e0755475ad9be4c4ddafc0d5241 Mon Sep 17 00:00:00 2001 From: mzh Date: Thu, 7 Nov 2024 10:47:29 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=AE=A1=E7=AE=97=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=86=99=E5=85=A5json=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E5=85=B6=E4=B8=AD=E3=80=90=E6=95=B0=E6=8D=AE=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=96=87=E4=BB=B6=E4=BD=8D=E7=BD=AE=E3=80=81=E5=B9=B6?= =?UTF-8?q?=E8=A1=8C=E5=BC=80=E5=85=B3=E3=80=81mpi=E5=BA=93=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E3=80=91=E6=9C=AA=E8=AE=BE=E7=BD=AE=EF=BC=8C=E3=80=90?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=BB=84=E8=A3=85=E6=A0=B8=E6=95=B0=E3=80=91?= =?UTF-8?q?=E6=9C=AA=E7=A1=AE=E8=AE=A4=E4=BA=8Ejson=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E4=BD=95=E5=A4=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tructDataSolverComputingControlManager.cpp | 29 ++++++++----------- ...DStructDataSolverComputingControlManager.h | 14 ++++----- 2 files changed, 19 insertions(+), 24 deletions(-) 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; };