Skip to content

Commit 41dd2cc

Browse files
committed
update solver translator for stopping criteria and fix unit test
1 parent dcb4e1b commit 41dd2cc

File tree

49 files changed

+36
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+36
-75
lines changed

flow360/component/simulation/translator/solver_translator.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,12 +1927,11 @@ def get_solver_json(
19271927
translated["runControl"]["monitorProcessorHash"] = calculate_monitor_semaphore_hash(
19281928
input_params
19291929
)
1930-
translated["runControl"]["stoppingCriteria"] = []
1930+
stopping_criteria = []
19311931
if input_params.run_control and bool(input_params.run_control.stopping_criteria):
19321932
for criterion in input_params.run_control.stopping_criteria:
1933-
translated["runControl"]["stoppingCriteria"].append(
1934-
get_stop_criterion_settings(criterion, input_params)
1935-
)
1933+
stopping_criteria.append(get_stop_criterion_settings(criterion, input_params))
1934+
translated["runControl"]["stoppingCriteria"] = stopping_criteria
19361935

19371936
translated["usingLiquidAsMaterial"] = isinstance(
19381937
input_params.operating_condition, LiquidOperatingCondition

tests/simulation/ref/value_or_expression/angular_velocity_with_expression.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@
124124
"velocityScale": 20.0
125125
},
126126
"runControl": {
127-
"shouldCheckStopCriterion": false,
128127
"externalProcessMonitorOutput": false
129128
}
130-
}
129+
}

tests/simulation/ref/value_or_expression/liquid_op_vel_mag.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
"velocityScale": 20.0
106106
},
107107
"runControl": {
108-
"shouldCheckStopCriterion": false,
109108
"externalProcessMonitorOutput": false
110109
}
111-
}
110+
}

tests/simulation/ref/value_or_expression/op_vel_mag.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
"velocityScale": 1.0
9999
},
100100
"runControl": {
101-
"shouldCheckStopCriterion": false,
102101
"externalProcessMonitorOutput": false
103102
}
104-
}
103+
}

tests/simulation/ref/value_or_expression/ref_area_with_expression.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
"velocityScale": 20.0
109109
},
110110
"runControl": {
111-
"shouldCheckStopCriterion": false,
112111
"externalProcessMonitorOutput": false
113112
}
114-
}
113+
}

tests/simulation/ref/value_or_expression/time_stepping_with_expression.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
"velocityScale": 20.0
106106
},
107107
"runControl": {
108-
"shouldCheckStopCriterion": false,
109108
"externalProcessMonitorOutput": false
110109
}
111-
}
110+
}

tests/simulation/translator/ref/Flow360_CHT_three_cylinders.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"absoluteTolerance": 1e-15,
4747
"maxIterations": 100
4848
},
49-
"modelType":"HeatEquation",
49+
"modelType": "HeatEquation",
5050
"maxForceJacUpdatePhysicalSteps": 0,
5151
"orderOfAccuracy": 2,
5252
"relativeTolerance": 0.0,
@@ -187,7 +187,6 @@
187187
"velocityScale": 1.0
188188
},
189189
"runControl": {
190-
"shouldCheckStopCriterion": false,
191190
"externalProcessMonitorOutput": false
192191
}
193192
}

tests/simulation/translator/ref/Flow360_NestedCylindersSRF.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,12 @@
128128
"v": "v",
129129
"w": "w"
130130
},
131-
"userDefinedFields":[],
131+
"userDefinedFields": [],
132132
"usingLiquidAsMaterial": false,
133133
"outputRescale": {
134134
"velocityScale": 1.0
135135
},
136136
"runControl": {
137-
"shouldCheckStopCriterion": false,
138137
"externalProcessMonitorOutput": false
139138
}
140-
}
139+
}

tests/simulation/translator/ref/Flow360_TurbFlatPlate137x97_BoxTrip.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@
189189
"velocityScale": 1.0
190190
},
191191
"runControl": {
192-
"shouldCheckStopCriterion": false,
193192
"externalProcessMonitorOutput": false
194193
}
195194
}

tests/simulation/translator/ref/Flow360_XV15HoverMRF.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,12 @@
141141
"v": "v",
142142
"w": "w"
143143
},
144-
"userDefinedFields":[],
144+
"userDefinedFields": [],
145145
"usingLiquidAsMaterial": false,
146146
"outputRescale": {
147147
"velocityScale": 1.0
148148
},
149149
"runControl": {
150-
"shouldCheckStopCriterion": false,
151150
"externalProcessMonitorOutput": false
152151
}
153-
}
152+
}

0 commit comments

Comments
 (0)