You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/CFDStruct/CFDStructDataManager/CFDStructDataManager.cpp

82 lines
3.1 KiB
C++

#include "CFDStructDataManager.h"
#include "CFDStructDataSolverTimeModeManager.h"
#include "CFDStructDataSolverBasicModelManager.h"
#include "CFDStructDataSolverKvislManager.h"
#include "CFDStructDataSolverNumericalMethodManager.h"
#include "CFDStructDataSolverSportsAttributesManager.h"
#include "CFDStructDataSolverBoundaryConditionManager.h"
#include "CFDStructDataSolverInitializationManager.h"
#include "CFDStructDataSolverReferenceQuantityManager.h"
#include "CFDStructDataSolverComputingControlManager.h"
#include "CFDStructDataSolverMonitorResidualManager.h"
#include "CUIProperty/CUIConfig.h"
CFDStructDataManager *CFDStructDataManager::m_instance = NULL;
CFDStructDataManager::CFDStructDataManager()
{
this->initDataManagers();
}
CFDStructDataManager *CFDStructDataManager::getInstance()
{
if (m_instance == nullptr)
{
m_instance = new CFDStructDataManager;
}
return m_instance;
}
CUIConfig *CFDStructDataManager::getActionParamUIConfig(QString s)
{
if (s == "actionTimeModeEdit")
{
qDebug("DataManager create TimeMode CUIConfig");
return m_solverTimeModeManager->getParamUIConfig();
}
if (s == "actionBasicModelEdit")
return m_solverBasicModeManager->getParamUIConfig();
if (s == "actionViscosityModelEdit")
return m_solverKvislManager->getParamUIConfig();
if (s == "actionNumericalMethodsEdit")
return m_solverNumericalMethodManager->getParamUIConfig();
// 运动属性
if (s == "actionMotionPropertiesEdit")
return m_solverSportsAttributesManager->getParamUIConfig();
// Pressure-Inlet
if (s == "actionPressureInletEdit")
return m_solverBoundaryConditionManager->getParamUIConfig();
// 初始化
if (s == "actionInitializationEdit")
return m_solverInitializationManager->getParamUIConfig();
// 参考量
if (s == "actionReferenceQuantityEdit")
return m_solverReferenceQuantityManager->getParamUIConfig();
// 计算控制
if (s == "actionComputationalControlEdit")
return m_solverComputingControlManager->getParamUIConfig();
if (s == "actionComputationalMonitorsResidual")
return m_solverMonitorResidualManager->getParamUIConfig();
qDebug() << "DataManager return null CUIConfig";
return nullptr;
}
void CFDStructDataManager::initDataManagers()
{
m_solverTimeModeManager = new CFDStructDataSolverTimeModeManager;
m_solverBasicModeManager = new CFDStructDataSolverBasicModelManager;
m_solverKvislManager = new CFDStructDataSolverKvislManager;
m_solverNumericalMethodManager = new CFDStructDataSolverNumericalMethodManager;
m_solverSportsAttributesManager = new CFDStructDataSolverSportsAttributesManager;
m_solverBoundaryConditionManager = new CFDStructDataSolverBoundaryConditionManager;
m_solverInitializationManager = new CFDStructDataSolverInitializationManager;
m_solverReferenceQuantityManager = new CFDStructDataSolverReferenceQuantityManager;
m_solverComputingControlManager = new CFDStructDataSolverComputingControlManager;
m_solverMonitorResidualManager = new CFDStructDataSolverMonitorResidualManager;
}