1、计算控制数据写入json配置,其中【数据保存文件位置、并行开关、mpi库类型】未设置,【网格组装核数】未确认于json中的何处

feature/struct-menu-20241023
mzh 1 week ago
parent b4142f5992
commit 78de49e1c0

@ -1,27 +1,22 @@
#include "CFDStructDataSolverComputingControlManager.h"
#include "CFDStructDataSolverTimeModeManager.h" #include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h" #include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h" #include "CFDStructSigsCenter.h"
#include "CUIProperty/CUIConfig.h"
#include "CUIProperty/CUISigsCenter.h" #include "CUIProperty/CUISigsCenter.h"
#include <QVariant> #include <QVariant>
#include "CFDStructDataSolverComputingControlManager.h"
CFDStructDataSolverComputingControlManager::CFDStructDataSolverComputingControlManager(QObject *parent) : CFDStructDataManagerBase(parent) CFDStructDataSolverComputingControlManager::CFDStructDataSolverComputingControlManager(QObject *parent) : CFDStructDataManagerBase(parent) {
{
m_uiConfig = nullptr; m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) { emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); });
{ emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); });
} }
CFDStructDataSolverComputingControlManager::~CFDStructDataSolverComputingControlManager() CFDStructDataSolverComputingControlManager::~CFDStructDataSolverComputingControlManager() {
{
// CFDStructDataManagerBase::~CFDStructDataManagerBase(); // CFDStructDataManagerBase::~CFDStructDataManagerBase();
} }
CUIConfig *CFDStructDataSolverComputingControlManager::getParamUIConfig() CUIConfig *CFDStructDataSolverComputingControlManager::getParamUIConfig() {
{ if (m_uiConfig != nullptr) {
if (m_uiConfig != nullptr)
{
delete m_uiConfig; delete m_uiConfig;
m_uiConfig = nullptr; m_uiConfig = nullptr;
} }
@ -30,13 +25,13 @@ CUIConfig *CFDStructDataSolverComputingControlManager::getParamUIConfig()
return m_uiConfig; 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( return new CUIConfig(
{ {
{"type", "Widget"}, {"type", "Widget"},

@ -4,32 +4,32 @@
#ifndef CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H #ifndef CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H
#define CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H #define CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H
#include <CFDStructDataManagerBase.h>
#include "CFDStructDataManager_global.h" #include "CFDStructDataManager_global.h"
#include <CFDStructDataManagerBase.h>
class CUIConfig; class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverComputingControlManager : public CFDStructDataManagerBase class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverComputingControlManager : public CFDStructDataManagerBase {
{
Q_OBJECT Q_OBJECT
public: public:
explicit CFDStructDataSolverComputingControlManager(QObject *parent = nullptr); explicit CFDStructDataSolverComputingControlManager(QObject *parent = nullptr);
~CFDStructDataSolverComputingControlManager(); ~CFDStructDataSolverComputingControlManager();
CUIConfig *getParamUIConfig(); CUIConfig *getParamUIConfig();
void saveDataToDom(rapidjson::Document &dom); void saveDataToDom(rapidjson::Document &dom);
private: private:
// 生成界面配置 // 生成界面配置
CUIConfig *genUIConfig(); CUIConfig *genUIConfig();
signals: signals:
private: private:
// 数据保存频率 // 数据保存频率
int m_DataSaveFrequency; // Data Save Frequency int m_DataSaveFrequency; // Data Save Frequency
// 数值计算核数 // 数值计算核数
int m_NumericalComputationCores = 0; int m_NumericalComputationCores = 0;
// ??表中没有
// 网格组装核数 // 网格组装核数
int m_MeshAssemblyCores = 0; int m_MeshAssemblyCores = 0;
}; };

Loading…
Cancel
Save