diff --git a/dart/api/internal/polar.py b/dart/api/internal/polar.py index 682dc6e2a7d0a4b3c4d523245c6c435eda2eb261..695312ccd876f111845848087c07282da4d41fa5 100644 --- a/dart/api/internal/polar.py +++ b/dart/api/internal/polar.py @@ -132,6 +132,6 @@ class Polar: print(self.tms) # plot results if self.alphas[0] != self.alphas[-1]: - tU.plot(self.alphas, self.Cls, 'alpha', 'Cl', '') - tU.plot(self.alphas, self.Cds, 'alpha', 'Cd', '') - tU.plot(self.alphas, self.Cms, 'alpha', 'Cm', '') + tU.plot(self.alphas, self.Cls, {'xlabel': 'alpha', 'ylabel': 'Cl'}) + tU.plot(self.alphas, self.Cds, {'xlabel': 'alpha', 'ylabel': 'Cd'}) + tU.plot(self.alphas, self.Cms, {'xlabel': 'alpha', 'ylabel': 'Cm'}) diff --git a/dart/tests/lift.py b/dart/tests/lift.py index aeeaea9bdf93be7e4367697baeb63f7ae7a0feec..345eacf55887f3b92bbba5097f267f1cee508a3b 100644 --- a/dart/tests/lift.py +++ b/dart/tests/lift.py @@ -80,7 +80,7 @@ def main(): # visualize solution and plot results floD.initViewer(pbl) - tboxU.plot(Cp[:,0], Cp[:,3], 'x', 'Cp', 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), True) + tboxU.plot(Cp[:,0], Cp[:,3], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), 'invert': True}) # check results print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) diff --git a/dart/tests/morpher.py b/dart/tests/morpher.py index 5bca5c11e4ebff7b62457edeb725c770d69267ba..1c9e6a386e79434fb16a969b212c0d594eb39806 100644 --- a/dart/tests/morpher.py +++ b/dart/tests/morpher.py @@ -128,8 +128,8 @@ def main(): print(tms) # visualize solution and plot results - tboxU.plot(Cp[:,0], Cp[:,3], 'x', 'Cp', 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), True) - tboxU.plot(Cp_ref[:,0], Cp_ref[:,3], 'x', 'Cp', 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver_ref.Cl, solver_ref.Cd, solver_ref.Cm, 4), True) + tboxU.plot(Cp[:,0], Cp[:,3], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), 'invert': True}) + tboxU.plot(Cp_ref[:,0], Cp_ref[:,3], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver_ref.Cl, solver_ref.Cd, solver_ref.Cm, 4), 'invert': True}) # check results print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) diff --git a/dart/tests/nonlift.py b/dart/tests/nonlift.py index 4a70f23a98d06a97888968f3a4fe57525f90de21..c9c543be6f9fbcde1f14521f0a3fd7a06f4e68df 100644 --- a/dart/tests/nonlift.py +++ b/dart/tests/nonlift.py @@ -80,7 +80,7 @@ def main(): # visualize solution and plot results floD.initViewer(pbl) - tboxU.plot(Cp[:,0], Cp[:,3], 'x', 'Cp', 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), True) + tboxU.plot(Cp[:,0], Cp[:,3], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), 'invert': True}) # check results print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) diff --git a/dart/validation/agard.py b/dart/validation/agard.py index f1085d78f2caf4f9e11770ccb48ecc3e9a9c20b8..b2debb13fd29bbcb8b39f9b5e4df7fa7f7bd8de0 100644 --- a/dart/validation/agard.py +++ b/dart/validation/agard.py @@ -85,7 +85,7 @@ def main(): if canPost: floU.writeSlices(msh.name,[0.01, 0.37, 0.75],5) data = tbxU.read('agard445_slice_1.dat') - tbxU.plot(data[:,3], data[:,4], 'x', 'Cp', 'Pressure distribution at MAC', True) + tbxU.plot(data[:,3], data[:,4], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Pressure distribution at MAC', 'invert': True}) tms['post'].stop() # display timers diff --git a/dart/validation/onera.py b/dart/validation/onera.py index 2b13015741a302acbcdfea6f692e38c66b751ef6..90d65952246cea415444779b6d0c27fcd6f0235c 100644 --- a/dart/validation/onera.py +++ b/dart/validation/onera.py @@ -83,7 +83,7 @@ def main(): if canPost: floU.writeSlices(msh.name,[0.01, 0.239, 0.526, 0.777, 0.957, 1.076, 1.136, 1.184],5) data = tbxU.read('oneraM6_slice_2.dat') - tbxU.plot(data[:,3], data[:,4], 'x', 'Cp', 'Pressure distribution at MAC', True) + tbxU.plot(data[:,3], data[:,4], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Pressure distribution at MAC', 'invert': True}) tms['post'].stop() # display timers diff --git a/ext/amfe b/ext/amfe index fab1af115a6197d8d31f9746d33436fd99ce5851..bed0e7b82d06153dfa5822ba62bb34fa74261faa 160000 --- a/ext/amfe +++ b/ext/amfe @@ -1 +1 @@ -Subproject commit fab1af115a6197d8d31f9746d33436fd99ce5851 +Subproject commit bed0e7b82d06153dfa5822ba62bb34fa74261faa diff --git a/vii/src/DDriver.cpp b/vii/src/DDriver.cpp index a5d8b1a4d586959e688a74deab7456307ed14fb9..f226c03f199ce271717eb47be3ac633c95b48905 100644 --- a/vii/src/DDriver.cpp +++ b/vii/src/DDriver.cpp @@ -357,7 +357,7 @@ void Driver::averageTransition(size_t iPoint, BoundaryLayer *bl, int forced) */ void Driver::computeSectionalDrag(std::vector<BoundaryLayer *> const &bl, size_t i) { - unsigned int nVar = bl[0]->getnVar(); + size_t nVar = bl[0]->getnVar(); size_t lastWkPt = (bl[2]->mesh->getnMarkers() - 1) * nVar; // Normalize friction and dissipation coefficients. diff --git a/vii/tests/bli2D.py b/vii/tests/bli2D.py index 34a824744a78bdde3b5aa9341a1c19fe9aea7e90..c7938061f20e900388e969d1a3ee58e5065ff35a 100644 --- a/vii/tests/bli2D.py +++ b/vii/tests/bli2D.py @@ -25,7 +25,7 @@ # - Transition routines. # - Compressible flow routines. # - Laminar and turbulent flow. -# +# # Untested functionalities. # - Separation routines. # - Multiple failure case at one iteration. @@ -114,8 +114,8 @@ def main(): tests.run() # Plot results - tboxU.plot(Cp[:,0], Cp[:,3], 'x', 'Cp', 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(iSolverAPI.getCl(), vSolver.Cdt, iSolverAPI.getCm(), 4), True) - tboxU.plot(vSolution['x/c'], vSolution['Cf'], '$x/c$', '$c_f$', 'Cdt = {0:.{3}f}, Cdf = {1:.{3}f}, Cdp = {2:.{3}f}'.format(vSolver.Cdt, vSolver.Cdf, vSolver.Cdp, 4)) + tboxU.plot(Cp[:,0], Cp[:,3], {'xlabel': 'x', 'ylabel': 'Cp', 'title': 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(iSolverAPI.getCl(), vSolver.Cdt, iSolverAPI.getCm(), 4), 'invert': True}) + tboxU.plot(vSolution['x/c'], vSolution['Cf'], {'xlabel': '$x/c$', 'ylabel': '$c_f$', 'title': 'Cdt = {0:.{3}f}, Cdf = {1:.{3}f}, Cdp = {2:.{3}f}'.format(vSolver.Cdt, vSolver.Cdf, vSolver.Cdp, 4), 'xlim': [0, 1]}) # eof. print('')