|
|
|
@ -1,51 +1,44 @@
|
|
|
|
|
#include "CFDStructDataManager.h"
|
|
|
|
|
|
|
|
|
|
#include "CFDStructDataSolverTimeModeManager.h"
|
|
|
|
|
#include "CFDStructDataSolverBasicModelManager.h"
|
|
|
|
|
#include "CFDStructDataSolverKvislManager.h"
|
|
|
|
|
#include "CFDStructDataSolverNumericalMethodManager.h"
|
|
|
|
|
#include "CFDStructDataSolverTimeModeManager.h"
|
|
|
|
|
|
|
|
|
|
#include "CFDStructDataSolverSportsAttributesManager.h"
|
|
|
|
|
#include "CFDStructDataSolverBoundaryConditionManager.h"
|
|
|
|
|
#include "CFDStructDataSolverInitializationManager.h"
|
|
|
|
|
#include "CFDStructDataSolverReferenceQuantityManager.h"
|
|
|
|
|
#include "CFDStructDataSolverComputingControlManager.h"
|
|
|
|
|
#include "CFDStructDataSolverMonitorResidualManager.h"
|
|
|
|
|
#include "CFDStructDataSolverInitializationManager.h"
|
|
|
|
|
#include "CFDStructDataSolverMonitorAerodynamicManager.h"
|
|
|
|
|
#include "CFDStructDataSolverMonitorImpellerManager.h"
|
|
|
|
|
#include "CFDStructDataSolverMonitorResidualManager.h"
|
|
|
|
|
#include "CFDStructDataSolverReferenceQuantityManager.h"
|
|
|
|
|
#include "CFDStructDataSolverSportsAttributesManager.h"
|
|
|
|
|
|
|
|
|
|
#include "CUIProperty/CUIConfig.h"
|
|
|
|
|
|
|
|
|
|
#include <rapidjson/writer.h>
|
|
|
|
|
#include <rapidjson/stringbuffer.h>
|
|
|
|
|
#include <rapidjson/writer.h>
|
|
|
|
|
|
|
|
|
|
CFDStructDataManager *CFDStructDataManager::m_instance = NULL;
|
|
|
|
|
CFDStructDataManager::CFDStructDataManager()
|
|
|
|
|
{
|
|
|
|
|
CFDStructDataManager::CFDStructDataManager() {
|
|
|
|
|
this->initDataManagers();
|
|
|
|
|
this->initJson();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CFDStructDataManager *CFDStructDataManager::getInstance()
|
|
|
|
|
{
|
|
|
|
|
if (m_instance == nullptr)
|
|
|
|
|
{
|
|
|
|
|
CFDStructDataManager *CFDStructDataManager::getInstance() {
|
|
|
|
|
if (m_instance == nullptr) {
|
|
|
|
|
m_instance = new CFDStructDataManager;
|
|
|
|
|
}
|
|
|
|
|
return m_instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataManager::getActionParamUIConfig(SolutionAnalysisModuleProperty sig, QVariant idx)
|
|
|
|
|
{
|
|
|
|
|
if (m_solverBoundaryConditionManager == nullptr)
|
|
|
|
|
{
|
|
|
|
|
CUIConfig *CFDStructDataManager::getActionParamUIConfig(SolutionAnalysisModuleProperty sig, QVariant idx) {
|
|
|
|
|
if (m_solverBoundaryConditionManager == nullptr) {
|
|
|
|
|
qDebug() << "manager is null";
|
|
|
|
|
}
|
|
|
|
|
CUIConfig *res = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (sig)
|
|
|
|
|
{
|
|
|
|
|
switch (sig) {
|
|
|
|
|
case SolutionAnalysisModuleProperty::Time_Mode:
|
|
|
|
|
res = m_solverTimeModeManager->getParamUIConfig();
|
|
|
|
|
break;
|
|
|
|
@ -90,8 +83,7 @@ CUIConfig *CFDStructDataManager::getActionParamUIConfig(SolutionAnalysisModulePr
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataManager::initDataManagers()
|
|
|
|
|
{
|
|
|
|
|
void CFDStructDataManager::initDataManagers() {
|
|
|
|
|
m_solverTimeModeManager = new CFDStructDataSolverTimeModeManager;
|
|
|
|
|
m_solverBasicModeManager = new CFDStructDataSolverBasicModelManager;
|
|
|
|
|
m_solverKvislManager = new CFDStructDataSolverKvislManager;
|
|
|
|
@ -106,13 +98,11 @@ void CFDStructDataManager::initDataManagers()
|
|
|
|
|
m_solverMonitorTubomachineryPerformanceManager = new CFDStructDataSolverMonitorImpellerManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataManager::initJson()
|
|
|
|
|
{
|
|
|
|
|
void CFDStructDataManager::initJson() {
|
|
|
|
|
m_dom.SetObject();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataManager::updateJson()
|
|
|
|
|
{
|
|
|
|
|
void CFDStructDataManager::updateJson() {
|
|
|
|
|
m_dom.SetObject();
|
|
|
|
|
|
|
|
|
|
m_solverTimeModeManager->saveDataToDom(m_dom);
|
|
|
|
@ -129,10 +119,8 @@ void CFDStructDataManager::updateJson()
|
|
|
|
|
m_solverMonitorTubomachineryPerformanceManager->saveDataToDom(m_dom);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
void CFDStructDataManager::printJson()
|
|
|
|
|
{
|
|
|
|
|
void CFDStructDataManager::printJson() {
|
|
|
|
|
using namespace rapidjson;
|
|
|
|
|
|
|
|
|
|
StringBuffer buffer;
|
|
|
|
|