From 90b9c6064653d49a854cdb9e58b9d49c37e37d90 Mon Sep 17 00:00:00 2001 From: Paul Dechamps <paul.dechamps@uliege.be> Date: Thu, 27 Feb 2025 18:43:06 +0100 Subject: [PATCH] (feat) Modify test case for data structures modifications --- blast/tests/dart/t_rae2822_3D.py | 3 ++- blast/tests/t_sections_3D.py | 2 +- blast/validation/v_rae2822_2D.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/blast/tests/dart/t_rae2822_3D.py b/blast/tests/dart/t_rae2822_3D.py index f58d79b..b4018f5 100644 --- a/blast/tests/dart/t_rae2822_3D.py +++ b/blast/tests/dart/t_rae2822_3D.py @@ -175,6 +175,7 @@ def main(): from matplotlib import pyplot as plt for icp in range(len(cpi)): + blaster_nodes = isol.vBnd[0][icp][0].getNodes('all') plt.figure() plt.plot(cpi[icp][:, 0], cpi[icp][:, 2], label='Inviscid') plt.plot(cpv[icp][:, 0], cpv[icp][:, 2], label='Viscous') @@ -184,7 +185,7 @@ def main(): plt.legend() plt.draw() plt.figure() - plt.plot(isol.vBnd[0][icp][0].nodesCoord[:,0], isol.vBnd[0][icp][0].nodesCoord[:,2], '-', label='Paulzer') + plt.plot(blaster_nodes[:,0], blaster_nodes[:,2], '-', label='BLASTER') plt.plot(cpi[icp][:, 0], cpi[icp][:, 1], '--', label='VTK') plt.legend() plt.axis('equal') diff --git a/blast/tests/t_sections_3D.py b/blast/tests/t_sections_3D.py index 75d015e..e2e8070 100644 --- a/blast/tests/t_sections_3D.py +++ b/blast/tests/t_sections_3D.py @@ -133,7 +133,7 @@ def main(): tms[gen_section].stop() for isec in range(len(vcfg['sections']['wing'])): - wing_sections[imethod].append(copy.deepcopy(isol.vBnd[0][isec][0].nodesCoord)) + wing_sections[imethod].append(copy.deepcopy(isol.vBnd[0][isec][0].getNodes('all'))) del isol tms['total'].stop() diff --git a/blast/validation/v_rae2822_2D.py b/blast/validation/v_rae2822_2D.py index e812ca6..7a6f15b 100644 --- a/blast/validation/v_rae2822_2D.py +++ b/blast/validation/v_rae2822_2D.py @@ -87,7 +87,7 @@ def cfgBlast(verb): 'couplTol' : 1e-4, # Tolerance of the VII methodology 'iterPrint': 1, # int, number of iterations between outputs 'resetInv' : True, # bool, flag to reset the inviscid calculation at every iteration. - 'sections' : [0], + 'sections' : {'airfoil': [0]}, 'xtrF' : [0.03, 0.03],# Forced transition location 'interpolator' : 'Matching', 'nDim' : 2 @@ -124,7 +124,7 @@ def main(): print('{0:6.1f}e6 {1:8.2f} {2:8.1f} {3:8.4f} {4:8.4f} {5:8.4f} {6:8.4f} {7:8.4f}'.format(vcfg['Re']/1e6, isol.getMinf(), isol.getAoA()*180/math.pi, isol.getCl(), vsol.Cdt, vsol.Cdp, vsol.Cdf, isol.getCm())) # Write results to file. - vSolution = vutils.getSolution(isol.sec) + vSolution = vutils.getSolution(vsol.bodies[0].sections)[0] tms['total'].stop() print(ccolors.ANSI_BLUE + 'PyTiming...' + ccolors.ANSI_RESET) -- GitLab