Skip to content

Commit c8cbf90

Browse files
committed
fix bug, update hybrid regressions
1 parent 53bd556 commit c8cbf90

3 files changed

Lines changed: 38 additions & 34 deletions

File tree

Common/src/linear_algebra/CSysMatrix.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,7 @@ void CSysMatrix<ScalarType>::ComputeLineletPreconditioner(const CSysVector<Scala
12811281
template<class ScalarType>
12821282
void CSysMatrix<ScalarType>::ComputeResidual(const CSysVector<ScalarType> & sol, const CSysVector<ScalarType> & f,
12831283
CSysVector<ScalarType> & res) const {
1284+
SU2_OMP_BARRIER
12841285
SU2_OMP_FOR_DYN(omp_heavy_size)
12851286
for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
12861287
ScalarType aux_vec[MAXNVAR];

SU2_CFD/src/solvers/CFEASolver.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,13 +1952,16 @@ void CFEASolver::Postprocessing(CGeometry *geometry, CSolver **solver_container,
19521952
CSysVector<su2double> LinSysAux(nPoint, nPointDomain, nVar, nullptr);
19531953
#endif
19541954

1955+
#if defined(CODI_REVERSE_TYPE) || defined(USE_MIXED_PRECISION)
1956+
/*--- We need temporaries to interface with the passive matrix. ---*/
1957+
CSysVector<su2mixedfloat> sol, res;
1958+
#endif
1959+
19551960
SU2_OMP_PARALLEL
19561961
{
19571962
#if !defined(CODI_REVERSE_TYPE) && !defined(USE_MIXED_PRECISION)
19581963
Jacobian.ComputeResidual(LinSysSol, LinSysRes, LinSysAux);
19591964
#else
1960-
/*--- We need temporaries to interface with the passive matrix. ---*/
1961-
CSysVector<su2mixedfloat> sol, res;
19621965
sol.PassiveCopy(LinSysSol);
19631966
res.PassiveCopy(LinSysRes);
19641967
Jacobian.ComputeResidual(sol, res, LinSysAux);

TestCases/hybrid_regression.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def main():
7979
fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012"
8080
fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg"
8181
fixedCL_naca0012.test_iter = 10
82-
fixedCL_naca0012.test_vals = [-12.130263, -6.703735, 0.300000, 0.019470]
82+
fixedCL_naca0012.test_vals = [-12.130189, -6.702728, 0.300000, 0.019470]
8383
test_list.append(fixedCL_naca0012)
8484

8585
# HYPERSONIC FLOW PAST BLUNT BODY
@@ -107,31 +107,31 @@ def main():
107107
cylinder.cfg_dir = "navierstokes/cylinder"
108108
cylinder.cfg_file = "lam_cylinder.cfg"
109109
cylinder.test_iter = 25
110-
cylinder.test_vals = [-6.765432, -1.297428, 0.019596, 0.310245]
110+
cylinder.test_vals = [-6.765432, -1.297428, 0.019596, 0.310240]
111111
test_list.append(cylinder)
112112

113113
# Laminar cylinder (low Mach correction)
114114
cylinder_lowmach = TestCase('cylinder_lowmach')
115115
cylinder_lowmach.cfg_dir = "navierstokes/cylinder"
116116
cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg"
117117
cylinder_lowmach.test_iter = 25
118-
cylinder_lowmach.test_vals = [-6.850130, -1.388096, -0.056203, 108.140820]
118+
cylinder_lowmach.test_vals = [-6.850130, -1.388096, -0.056203, 108.140819]
119119
test_list.append(cylinder_lowmach)
120120

121121
# 2D Poiseuille flow (body force driven with periodic inlet / outlet)
122122
poiseuille = TestCase('poiseuille')
123123
poiseuille.cfg_dir = "navierstokes/poiseuille"
124124
poiseuille.cfg_file = "lam_poiseuille.cfg"
125125
poiseuille.test_iter = 10
126-
poiseuille.test_vals = [-5.048279, 0.650817, 0.008715, 13.677768]
126+
poiseuille.test_vals = [-5.048282, 0.650814, 0.008714, 13.677678]
127127
test_list.append(poiseuille)
128128

129129
# 2D Poiseuille flow (inlet profile file)
130130
poiseuille_profile = TestCase('poiseuille_profile')
131131
poiseuille_profile.cfg_dir = "navierstokes/poiseuille"
132132
poiseuille_profile.cfg_file = "profile_poiseuille.cfg"
133133
poiseuille_profile.test_iter = 10
134-
poiseuille_profile.test_vals = [-12.494741, -7.712718, -0.000000, 2.085796]
134+
poiseuille_profile.test_vals = [-12.494721, -7.712408, -0.000000, 2.085796]
135135
test_list.append(poiseuille_profile)
136136

137137
##########################
@@ -175,31 +175,31 @@ def main():
175175
turb_oneram6.cfg_dir = "rans/oneram6"
176176
turb_oneram6.cfg_file = "turb_ONERAM6.cfg"
177177
turb_oneram6.test_iter = 10
178-
turb_oneram6.test_vals = [-2.372345, -6.579369, 0.229866, 0.147638]
178+
turb_oneram6.test_vals = [-2.372346, -6.579370, 0.229866, 0.147638]
179179
test_list.append(turb_oneram6)
180180

181181
# NACA0012 (SA, FUN3D finest grid results: CL=1.0983, CD=0.01242)
182182
turb_naca0012_sa = TestCase('turb_naca0012_sa')
183183
turb_naca0012_sa.cfg_dir = "rans/naca0012"
184184
turb_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
185185
turb_naca0012_sa.test_iter = 10
186-
turb_naca0012_sa.test_vals = [-12.076423, -16.147693, 1.064326, 0.019770]
186+
turb_naca0012_sa.test_vals = [-12.076819, -16.049252, 1.064326, 0.019770]
187187
test_list.append(turb_naca0012_sa)
188188

189189
# NACA0012 (SST, FUN3D finest grid results: CL=1.0840, CD=0.01253)
190190
turb_naca0012_sst = TestCase('turb_naca0012_sst')
191191
turb_naca0012_sst.cfg_dir = "rans/naca0012"
192192
turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
193193
turb_naca0012_sst.test_iter = 10
194-
turb_naca0012_sst.test_vals = [-15.273727, -6.243780, 1.049988, 0.019165]
194+
turb_naca0012_sst.test_vals = [-15.273728, -6.243783, 1.049988, 0.019165]
195195
test_list.append(turb_naca0012_sst)
196196

197197
# NACA0012 (SST_SUST, FUN3D finest grid results: CL=1.0840, CD=0.01253)
198198
turb_naca0012_sst_sust = TestCase('turb_naca0012_sst_sust')
199199
turb_naca0012_sst_sust.cfg_dir = "rans/naca0012"
200200
turb_naca0012_sst_sust.cfg_file = "turb_NACA0012_sst_sust.cfg"
201201
turb_naca0012_sst_sust.test_iter = 10
202-
turb_naca0012_sst_sust.test_vals = [-14.851214, -6.062557, 1.005233, 0.019014]
202+
turb_naca0012_sst_sust.test_vals = [-14.851214, -6.062566, 1.005233, 0.019014]
203203
test_list.append(turb_naca0012_sst_sust)
204204

205205
# PROPELLER
@@ -232,39 +232,39 @@ def main():
232232
turb_naca0012_1c.cfg_dir = "rans_uq/naca0012"
233233
turb_naca0012_1c.cfg_file = "turb_NACA0012_uq_1c.cfg"
234234
turb_naca0012_1c.test_iter = 10
235-
turb_naca0012_1c.test_vals = [-4.906594, 1.338035, 6.086178, 2.412995]
235+
turb_naca0012_1c.test_vals = [-4.906563, 1.338083, 6.086180, 2.412997]
236236
test_list.append(turb_naca0012_1c)
237237

238238
# NACA0012 2c
239239
turb_naca0012_2c = TestCase('turb_naca0012_2c')
240240
turb_naca0012_2c.cfg_dir = "rans_uq/naca0012"
241241
turb_naca0012_2c.cfg_file = "turb_NACA0012_uq_2c.cfg"
242242
turb_naca0012_2c.test_iter = 10
243-
turb_naca0012_2c.test_vals = [-5.230219, 1.262228, 6.086155, 2.412757]
243+
turb_naca0012_2c.test_vals = [-5.230218, 1.262228, 6.086157, 2.412759]
244244
test_list.append(turb_naca0012_2c)
245245

246246
# NACA0012 3c
247247
turb_naca0012_3c = TestCase('turb_naca0012_3c')
248248
turb_naca0012_3c.cfg_dir = "rans_uq/naca0012"
249249
turb_naca0012_3c.cfg_file = "turb_NACA0012_uq_3c.cfg"
250250
turb_naca0012_3c.test_iter = 10
251-
turb_naca0012_3c.test_vals = [-5.277130, 1.246265, 6.086050, 2.412462]
251+
turb_naca0012_3c.test_vals = [-5.277130, 1.246265, 6.086053, 2.412464]
252252
test_list.append(turb_naca0012_3c)
253253

254254
# NACA0012 p1c1
255255
turb_naca0012_p1c1 = TestCase('turb_naca0012_p1c1')
256256
turb_naca0012_p1c1.cfg_dir = "rans_uq/naca0012"
257257
turb_naca0012_p1c1.cfg_file = "turb_NACA0012_uq_p1c1.cfg"
258258
turb_naca0012_p1c1.test_iter = 10
259-
turb_naca0012_p1c1.test_vals = [-5.012853, 1.310014, 6.086064, 2.412930]
259+
turb_naca0012_p1c1.test_vals = [-5.012946, 1.309725, 6.086066, 2.412931]
260260
test_list.append(turb_naca0012_p1c1)
261261

262262
# NACA0012 p1c2
263263
turb_naca0012_p1c2 = TestCase('turb_naca0012_p1c2')
264264
turb_naca0012_p1c2.cfg_dir = "rans_uq/naca0012"
265265
turb_naca0012_p1c2.cfg_file = "turb_NACA0012_uq_p1c2.cfg"
266266
turb_naca0012_p1c2.test_iter = 10
267-
turb_naca0012_p1c2.test_vals = [-5.264020, 1.251315, 6.086450, 2.413069]
267+
turb_naca0012_p1c2.test_vals = [-5.264019, 1.251314, 6.086451, 2.413070]
268268
test_list.append(turb_naca0012_p1c2)
269269

270270
######################################
@@ -298,15 +298,15 @@ def main():
298298
cavity.cfg_dir = "moving_wall/cavity"
299299
cavity.cfg_file = "lam_cavity.cfg"
300300
cavity.test_iter = 25
301-
cavity.test_vals = [-5.627934, -0.164469, 0.051998, 2.547062]
301+
cavity.test_vals = [-5.627934, -0.164469, 0.051998, 2.547065]
302302
test_list.append(cavity)
303303

304304
# Spinning cylinder
305305
spinning_cylinder = TestCase('spinning_cylinder')
306306
spinning_cylinder.cfg_dir = "moving_wall/spinning_cylinder"
307307
spinning_cylinder.cfg_file = "spinning_cylinder.cfg"
308308
spinning_cylinder.test_iter = 25
309-
spinning_cylinder.test_vals = [-7.996310, -2.601760, 1.510694, 1.493879]
309+
spinning_cylinder.test_vals = [-7.996313, -2.601764, 1.510692, 1.493876]
310310
test_list.append(spinning_cylinder)
311311

312312
######################################
@@ -318,7 +318,7 @@ def main():
318318
square_cylinder.cfg_dir = "unsteady/square_cylinder"
319319
square_cylinder.cfg_file = "turb_square.cfg"
320320
square_cylinder.test_iter = 3
321-
square_cylinder.test_vals = [-1.162563, 0.066395, 1.399790, 2.220393]
321+
square_cylinder.test_vals = [-1.162572, 0.066371, 1.399790, 2.220393]
322322
square_cylinder.unsteady = True
323323
test_list.append(square_cylinder)
324324

@@ -358,15 +358,15 @@ def main():
358358
edge_VW.cfg_dir = "nicf/edge"
359359
edge_VW.cfg_file = "edge_VW.cfg"
360360
edge_VW.test_iter = 100
361-
edge_VW.test_vals = [-5.040282, 1.124488, -0.000009, 0.000000]
361+
edge_VW.test_vals = [-5.040283, 1.124491, -0.000009, 0.000000]
362362
test_list.append(edge_VW)
363363

364364
# Rarefaction shock wave edge_PPR
365365
edge_PPR = TestCase('edge_PPR')
366366
edge_PPR.cfg_dir = "nicf/edge"
367367
edge_PPR.cfg_file = "edge_PPR.cfg"
368368
edge_PPR.test_iter = 100
369-
edge_PPR.test_vals = [-5.401709, 0.738096, -0.000035, 0.000000]
369+
edge_PPR.test_vals = [-5.401640, 0.738165, -0.000035, 0.000000]
370370
test_list.append(edge_PPR)
371371

372372
######################################
@@ -378,7 +378,7 @@ def main():
378378
Jones_tc.cfg_dir = "turbomachinery/APU_turbocharger"
379379
Jones_tc.cfg_file = "Jones.cfg"
380380
Jones_tc.test_iter = 5
381-
Jones_tc.test_vals = [-5.280316, 0.379652, 44.725470, 2.271540]
381+
Jones_tc.test_vals = [-5.280316, 0.379651, 44.725470, 2.271540]
382382
Jones_tc.new_output = False
383383
test_list.append(Jones_tc)
384384

@@ -387,7 +387,7 @@ def main():
387387
Jones_tc_rst.cfg_dir = "turbomachinery/APU_turbocharger"
388388
Jones_tc_rst.cfg_file = "Jones_rst.cfg"
389389
Jones_tc_rst.test_iter = 5
390-
Jones_tc_rst.test_vals = [-4.625318, -1.569633, 34.014100, 10.187650]
390+
Jones_tc_rst.test_vals = [-4.625319, -1.569634, 34.014100, 10.187660]
391391
Jones_tc_rst.new_output = False
392392
test_list.append(Jones_tc_rst)
393393

@@ -396,7 +396,7 @@ def main():
396396
axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D"
397397
axial_stage2D.cfg_file = "Axial_stage2D.cfg"
398398
axial_stage2D.test_iter = 20
399-
axial_stage2D.test_vals = [-1.933199, 5.381564, 73.357910, 1.780510]
399+
axial_stage2D.test_vals = [-1.933199, 5.381560, 73.357900, 1.780500]
400400
axial_stage2D.new_output = False
401401
test_list.append(axial_stage2D)
402402

@@ -405,7 +405,7 @@ def main():
405405
transonic_stator.cfg_dir = "turbomachinery/transonic_stator_2D"
406406
transonic_stator.cfg_file = "transonic_stator.cfg"
407407
transonic_stator.test_iter = 20
408-
transonic_stator.test_vals = [-0.563532, 5.823231, 96.736000, 0.062426]
408+
transonic_stator.test_vals = [-0.563540, 5.823232, 96.736080, 0.062426]
409409
transonic_stator.new_output = False
410410
test_list.append(transonic_stator)
411411

@@ -414,7 +414,7 @@ def main():
414414
transonic_stator_rst.cfg_dir = "turbomachinery/transonic_stator_2D"
415415
transonic_stator_rst.cfg_file = "transonic_stator_rst.cfg"
416416
transonic_stator_rst.test_iter = 20
417-
transonic_stator_rst.test_vals = [-6.621624, -0.614368, 5.002986, 0.002951]
417+
transonic_stator_rst.test_vals = [-6.621626, -0.614379, 5.002986, 0.002951]
418418
transonic_stator_rst.new_output = False
419419
test_list.append(transonic_stator_rst)
420420

@@ -427,7 +427,7 @@ def main():
427427
uniform_flow.cfg_dir = "sliding_interface/uniform_flow"
428428
uniform_flow.cfg_file = "uniform_NN.cfg"
429429
uniform_flow.test_iter = 5
430-
uniform_flow.test_vals = [5.000000, 0.000000, -0.188748, -10.631524]
430+
uniform_flow.test_vals = [5.000000, 0.000000, -0.188748, -10.631530]
431431
uniform_flow.unsteady = True
432432
uniform_flow.multizone = True
433433
test_list.append(uniform_flow)
@@ -437,7 +437,7 @@ def main():
437437
channel_2D.cfg_dir = "sliding_interface/channel_2D"
438438
channel_2D.cfg_file = "channel_2D_WA.cfg"
439439
channel_2D.test_iter = 2
440-
channel_2D.test_vals = [2.000000, 0.000000, 0.397938, 0.352783, 0.405451]
440+
channel_2D.test_vals = [2.000000, 0.000000, 0.398089, 0.352762, 0.405397]
441441
channel_2D.unsteady = True
442442
channel_2D.multizone = True
443443
test_list.append(channel_2D)
@@ -447,7 +447,7 @@ def main():
447447
channel_3D.cfg_dir = "sliding_interface/channel_3D"
448448
channel_3D.cfg_file = "channel_3D_WA.cfg"
449449
channel_3D.test_iter = 2
450-
channel_3D.test_vals = [2.000000, 0.000000, 0.620157, 0.505143, 0.415205]
450+
channel_3D.test_vals = [2.000000, 0.000000, 0.620151, 0.505157, 0.415249]
451451
channel_3D.unsteady = True
452452
channel_3D.multizone = True
453453
test_list.append(channel_3D)
@@ -457,7 +457,7 @@ def main():
457457
pipe.cfg_dir = "sliding_interface/pipe"
458458
pipe.cfg_file = "pipe_NN.cfg"
459459
pipe.test_iter = 2
460-
pipe.test_vals = [0.150024, 0.491949, 0.677756, 0.963990, 1.006943]
460+
pipe.test_vals = [0.150024, 0.491949, 0.677757, 0.963990, 1.006944]
461461
pipe.unsteady = True
462462
pipe.multizone = True
463463
test_list.append(pipe)
@@ -500,7 +500,7 @@ def main():
500500
statbeam3d.cfg_dir = "fea_fsi/StatBeam_3d"
501501
statbeam3d.cfg_file = "configBeam_3d.cfg"
502502
statbeam3d.test_iter = 0
503-
statbeam3d.test_vals = [-8.500954, -8.212289, -8.117113, 64095.000000]
503+
statbeam3d.test_vals = [-2.378370, -1.585252, -2.028505, 6.4359e+04]
504504
test_list.append(statbeam3d)
505505

506506
# Dynamic beam, 2d
@@ -527,7 +527,7 @@ def main():
527527
stat_fsi.cfg_dir = "fea_fsi/stat_fsi"
528528
stat_fsi.cfg_file = "config.cfg"
529529
stat_fsi.test_iter = 7
530-
stat_fsi.test_vals = [-3.242709, -4.866601, 0.000000, 11.000000]
530+
stat_fsi.test_vals = [-3.242834, -4.866608, 0.000000, 11.000000]
531531
stat_fsi.multizone = True
532532
test_list.append(stat_fsi)
533533

@@ -536,7 +536,7 @@ def main():
536536
dyn_fsi.cfg_dir = "fea_fsi/dyn_fsi"
537537
dyn_fsi.cfg_file = "config.cfg"
538538
dyn_fsi.test_iter = 4
539-
dyn_fsi.test_vals = [-4.379823, -4.005990, 0.000000, 0.000000]
539+
dyn_fsi.test_vals = [-4.379823, -4.005990, 0.000000, 74.000000]
540540
dyn_fsi.multizone = True
541541
dyn_fsi.unsteady = True
542542
test_list.append(dyn_fsi)
@@ -546,7 +546,7 @@ def main():
546546
stat_fsi_restart.cfg_dir = "fea_fsi/stat_fsi"
547547
stat_fsi_restart.cfg_file = "config_restart.cfg"
548548
stat_fsi_restart.test_iter = 1
549-
stat_fsi_restart.test_vals = [-3.474236, -4.250645, 0.000000, 35.000000]
549+
stat_fsi_restart.test_vals = [-3.474239, -4.250710, 0.000000, 36.000000]
550550
stat_fsi_restart.multizone = True
551551
test_list.append(stat_fsi_restart)
552552

0 commit comments

Comments
 (0)