From 1ea01f24b15a194164239e6f254bb8d8cbb83d07 Mon Sep 17 00:00:00 2001 From: mzh Date: Mon, 4 Nov 2024 16:32:37 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=A1=A5=E5=85=85=E4=BA=86=E8=BE=B9?= =?UTF-8?q?=E7=95=8C=E6=9D=A1=E4=BB=B6=E7=9A=84=E7=9A=84=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ructDataSolverBoundaryConditionManager.cpp | 59 ++++++++++++++----- ...StructDataSolverBoundaryConditionManager.h | 3 + 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp index 91272ad..ad6e879 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp @@ -45,27 +45,36 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::getParamUIConfig() return genFarFieldModeUIConfig(); if (m_BoundaryType == 2) { - if(m_BoundaryType_sub == 0){ - if(m_VelocityDirectionType == 0){ + if (m_BoundaryType_sub == 0) + { + if (m_VelocityDirectionType == 0) + { return genPressureInletModeSupersonicCylindricalUIConfig(); - }if(m_VelocityDirectionType == 1){ + } + if (m_VelocityDirectionType == 1) + { return genPressureInletModeSupersonicCartesianUIConfig(); - }if(m_VelocityDirectionType == 2){ + } + if (m_VelocityDirectionType == 2) + { return genPressureInletModeSupersonicSurfaceUIConfig(); } } - if(m_BoundaryType_sub == 1){ - if(m_VelocityDirectionType == 0){ + if (m_BoundaryType_sub == 1) + { + if (m_VelocityDirectionType == 0) + { return genPressureInletModeSubsonicCylindricalUIConfig(); } - if(m_VelocityDirectionType == 1){ + if (m_VelocityDirectionType == 1) + { return genPressureInletModeSubsonicCartesianUIConfig(); } - if(m_VelocityDirectionType == 2){ + if (m_VelocityDirectionType == 2) + { return genPressureInletModeSubsonicSurfaceUIConfig(); } } - } if (m_BoundaryType == 3) return genPressureOutletUIConfig(); @@ -358,8 +367,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupe }), // TODO 用户自定义 new CUIConfig({ - {"type", "CheckButton"}, + {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); @@ -504,8 +515,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupe }), // TODO 用户自定义 new CUIConfig({ - {"type", "CheckButton"}, + {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); @@ -643,8 +656,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupe }), // TODO 用户自定义 new CUIConfig({ - {"type", "CheckButton"}, + {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); @@ -782,8 +797,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubs }), // TODO 用户自定义 new CUIConfig({ - {"type", "CheckButton"}, + {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); @@ -922,8 +939,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubs }), // TODO 用户自定义 new CUIConfig({ - {"type", "CheckButton"}, + {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); @@ -1054,8 +1073,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubs }), // TODO 用户自定义 new CUIConfig({ - {"type", "CheckButton"}, + {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); @@ -1154,6 +1175,8 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); @@ -1812,6 +1835,8 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); return nullptr; @@ -1926,6 +1951,8 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); return nullptr; @@ -2042,6 +2069,8 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); return nullptr; diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h index 826642c..66880b5 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h @@ -156,6 +156,9 @@ private: //边界类型,选中总压入口时,出现的子选项,可选声速、亚声速 int m_BoundaryType_sub = 0; + + //用户自定义 + int m_UserDefined = 0; }; #endif // CFDSTRUCTDATASOLVERBOUNDARYCONDITIONMANAGER_H