优化点1,2.
This commit is contained in:
@@ -19,14 +19,13 @@ classdef EDFMAppController < handle
|
||||
{'case01', 'case02', 'case03', 'case04', 'case05', 'case06', 'case07'}, ...
|
||||
'case01');
|
||||
obj.setDropDownItems('ResultTypeDropDown', {'Time Steps', 'Newtons vs Time'}, 'Time Steps');
|
||||
obj.setDropDownItems('ModelFlagDropDown', {'1'}, '1');
|
||||
obj.setDropDownItems('ModelGridModelDropDown', {'1', '2'}, '1');
|
||||
obj.setDropDownItems('ModelFlowModelDropDown', {'1', '2', '3'}, '1');
|
||||
obj.setDropDownItems('FractureInputStyleDropDown', {'1', '2', '3', '4'}, '1');
|
||||
obj.setDropDownItems('GWgas_modelDropDown', {'1', '2'}, '1');
|
||||
obj.setDropDownItems('OWoil_modelDropDown', {'1', '2'}, '1');
|
||||
obj.setDropDownItems('MCgas_modelDropDown', {'1', '2'}, '1');
|
||||
obj.configureWellTables();
|
||||
obj.applyFixedUIState();
|
||||
|
||||
obj.Results = struct();
|
||||
obj.loadTemplate('case01');
|
||||
@@ -35,7 +34,7 @@ classdef EDFMAppController < handle
|
||||
end
|
||||
|
||||
function newConfig(obj)
|
||||
obj.Config = create_empty_config();
|
||||
obj.Config = normalize_config(create_empty_config());
|
||||
obj.Results = struct();
|
||||
obj.refreshUIFromConfig();
|
||||
obj.refreshResults();
|
||||
@@ -355,9 +354,9 @@ classdef EDFMAppController < handle
|
||||
if isempty(fieldnames(obj.Config))
|
||||
return;
|
||||
end
|
||||
c = obj.Config;
|
||||
c = normalize_config(obj.Config);
|
||||
obj.Config = c;
|
||||
|
||||
obj.setDropDownValue('ModelFlagDropDown', c.model.modelflag);
|
||||
obj.setDropDownValue('ModelGridModelDropDown', c.model.grid_model);
|
||||
obj.setDropDownValue('ModelFlowModelDropDown', c.model.flow_model);
|
||||
|
||||
@@ -366,11 +365,7 @@ classdef EDFMAppController < handle
|
||||
obj.setTextAreaExpr('GridDzTextArea', c.grid.dz);
|
||||
obj.setTextAreaExpr('GridNTGTextArea', c.grid.NTG);
|
||||
|
||||
obj.setDropDownValue('FractureInputStyleDropDown', c.fracture.input_style);
|
||||
obj.setTextAreaExpr('FractureInputTextArea', c.fracture.input_content);
|
||||
obj.setTextAreaExpr('FractureLinesTextArea', c.fracture.fractureLines);
|
||||
obj.setTextAreaExpr('FractureHeightsTextArea', c.fracture.fractureHeights);
|
||||
obj.setTextAreaExpr('FractureFlowBarrierFlagsTextArea', c.fracture.flowBarrierFlags);
|
||||
|
||||
obj.setTextAreaExpr('SPBoundaryTextArea', c.discretization.sp.boundary_polygon);
|
||||
obj.setTextAreaExpr('SPInvalidLayerTextArea', c.discretization.sp.invalid_layer);
|
||||
@@ -468,6 +463,7 @@ classdef EDFMAppController < handle
|
||||
obj.setNumericFieldValue('EpsAveEditField', c.solver.epsave);
|
||||
obj.setNumericFieldValue('EpsMaxEditField', c.solver.epsmax);
|
||||
|
||||
obj.applyFixedUIState();
|
||||
obj.syncModelTabs();
|
||||
end
|
||||
|
||||
@@ -475,9 +471,8 @@ classdef EDFMAppController < handle
|
||||
if isempty(fieldnames(obj.Config))
|
||||
obj.Config = create_empty_config();
|
||||
end
|
||||
c = obj.Config;
|
||||
c = normalize_config(obj.Config);
|
||||
|
||||
c.model.modelflag = obj.getNumericDropDownValue('ModelFlagDropDown', c.model.modelflag);
|
||||
c.model.grid_model = obj.getNumericDropDownValue('ModelGridModelDropDown', c.model.grid_model);
|
||||
c.model.flow_model = obj.getNumericDropDownValue('ModelFlowModelDropDown', c.model.flow_model);
|
||||
|
||||
@@ -489,11 +484,7 @@ classdef EDFMAppController < handle
|
||||
c.grid.ny = numel(c.grid.dy);
|
||||
c.grid.nz = numel(c.grid.dz);
|
||||
|
||||
c.fracture.input_style = obj.getNumericDropDownValue('FractureInputStyleDropDown', c.fracture.input_style);
|
||||
c.fracture.input_content = obj.getTextAreaExpr('FractureInputTextArea', c.fracture.input_content);
|
||||
c.fracture.fractureLines = obj.getTextAreaExpr('FractureLinesTextArea', c.fracture.fractureLines);
|
||||
c.fracture.fractureHeights = obj.getTextAreaExpr('FractureHeightsTextArea', c.fracture.fractureHeights);
|
||||
c.fracture.flowBarrierFlags = obj.getTextAreaExpr('FractureFlowBarrierFlagsTextArea', c.fracture.flowBarrierFlags);
|
||||
|
||||
c.discretization.sp.boundary_polygon = obj.getTextAreaExpr('SPBoundaryTextArea', c.discretization.sp.boundary_polygon);
|
||||
c.discretization.sp.invalid_layer = obj.getTextAreaExpr('SPInvalidLayerTextArea', c.discretization.sp.invalid_layer);
|
||||
@@ -602,6 +593,22 @@ classdef EDFMAppController < handle
|
||||
obj.syncModelTabs();
|
||||
end
|
||||
|
||||
function applyFixedUIState(obj)
|
||||
obj.setControlVisible('ModelFlagDropDownLabel', false);
|
||||
obj.setControlVisible('ModelFlagDropDown', false);
|
||||
obj.setControlVisible('FractureInputStyleDropDownLabel', false);
|
||||
obj.setControlVisible('FractureInputStyleDropDown', false);
|
||||
obj.setControlVisible('FractureLinesTextAreaLabel', false);
|
||||
obj.setControlVisible('FractureLinesTextArea', false);
|
||||
obj.setControlVisible('FractureHeightsTextAreaLabel', false);
|
||||
obj.setControlVisible('FractureHeightsTextArea', false);
|
||||
obj.setControlVisible('FlowBarrierFlagsTextAreaLabel', false);
|
||||
obj.setControlVisible('FractureFlowBarrierFlagsTextArea', false);
|
||||
|
||||
obj.setEditableState('ModelFlagDropDown', false);
|
||||
obj.setEditableState('FractureInputStyleDropDown', false);
|
||||
end
|
||||
|
||||
function refreshResults(obj)
|
||||
summary = {};
|
||||
if isempty(fieldnames(obj.Results))
|
||||
|
||||
Reference in New Issue
Block a user