#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 "CFDStructDataSolverMonitorAerodynamicManager.h" #include "CFDStructDataSolverMonitorImpellerManager.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(SolutionAnalysisModuleProperty sig, QVariant idx) { if(m_solverBoundaryConditionManager == nullptr){ qDebug()<<"manager is null"; } switch (sig) { case SolutionAnalysisModuleProperty::Time_Mode: return m_solverTimeModeManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Basic_Model: return m_solverBasicModeManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Viscosity_Model: return m_solverKvislManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::NUumerical_Methods: return m_solverNumericalMethodManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Motion_Properties: return m_solverSportsAttributesManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Boundary_Conditions: return m_solverBoundaryConditionManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Initialization: return m_solverInitializationManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Computational_Control_Reference_Quantity: return m_solverReferenceQuantityManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Computational_Control: return m_solverComputingControlManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Monitors_Residual: return m_solverMonitorResidualManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Monitors_AerodynamicForce: return m_solverMonitorAerodynamicForceManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Monitors_Tubomachinery_Performance: return m_solverMonitorTubomachineryPerformanceManager->getParamUIConfig(); default: break; } 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; m_solverMonitorAerodynamicForceManager = new CFDStructDataSolverMonitorAerodynamicManager; m_solverMonitorTubomachineryPerformanceManager = new CFDStructDataSolverMonitorImpellerManager; }