From: michael Date: Sat, 28 Nov 2020 23:17:16 +0000 (+0100) Subject: Python3 requires parenthesis for print X-Git-Tag: V9_7_0~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d4b8531071796ea6ccd18d036f24fe3b7f1008d;p=tools%2Fsolverlab.git Python3 requires parenthesis for print --- diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionEF_Delaunay_triangles/test_validation2DDiffusionEF_Delaunay_triangles.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionEF_Delaunay_triangles/test_validation2DDiffusionEF_Delaunay_triangles.py old mode 100644 new mode 100755 index e1db5c5..9601301 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionEF_Delaunay_triangles/test_validation2DDiffusionEF_Delaunay_triangles.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionEF_Delaunay_triangles/test_validation2DDiffusionEF_Delaunay_triangles.py @@ -9,7 +9,7 @@ convergence_synthesis=dict(FiniteElements2DDiffusion_SQUARE.test_desc) def test_validation2DEF_Delaunay_triangles(): start = time.time() #### 2D FE Delaunay triangle mesh - meshList=['squareWithTriangles_1','squareWithTriangles_2','squareWithTriangles_3','squareWithTriangles_4','squareWithTriangles_5'] + meshList=['squareWithTriangles_1','squareWithTriangles_2','squareWithTriangles_3','squareWithTriangles_4','squareWithTriangles_5']#linear system is hard to solve for 'squareWithTriangles_5' meshType="Unstructured_triangles" testColor="Green" nbMeshes=len(meshList) diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_Delaunay_triangles/test_validation2DDiffusionVF_Delaunay_triangles.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_Delaunay_triangles/test_validation2DDiffusionVF_Delaunay_triangles.py old mode 100644 new mode 100755 index 78276a2..2a59e3d --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_Delaunay_triangles/test_validation2DDiffusionVF_Delaunay_triangles.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_Delaunay_triangles/test_validation2DDiffusionVF_Delaunay_triangles.py @@ -57,7 +57,7 @@ def test_validation2DVF_triangles(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D triangle meshes : scheme order is ", -a + print( "FV for diffusion on 2D triangle meshes : scheme order is ", -a) assert abs(a+0.05)<0.01 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_brickwall/test_validation2DDiffusionVF_brickwall.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_brickwall/test_validation2DDiffusionVF_brickwall.py old mode 100644 new mode 100755 index 1ae5409..4138577 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_brickwall/test_validation2DDiffusionVF_brickwall.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_brickwall/test_validation2DDiffusionVF_brickwall.py @@ -57,7 +57,7 @@ def test_validation2DVF_brickwall(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D brickwall meshes : scheme order is ", -a + print( "FV for diffusion on 2D brickwall meshes : scheme order is ", -a) assert abs(a-0.13)<0.01 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_checkerboard/test_validation2DDiffusionVF_checkerboard.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_checkerboard/test_validation2DDiffusionVF_checkerboard.py old mode 100644 new mode 100755 index 7666854..6300f81 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_checkerboard/test_validation2DDiffusionVF_checkerboard.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_checkerboard/test_validation2DDiffusionVF_checkerboard.py @@ -57,7 +57,7 @@ def test_validation2DVF_checkerboard(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D checkerboard meshes : scheme order is ", -a + print( "FV for diffusion on 2D checkerboard meshes : scheme order is ", -a) assert abs(a+0.5475)<0.001 #The scheme is not converging # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_cross_triangles/test_validation2DDiffusionVF_cross_triangles.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_cross_triangles/test_validation2DDiffusionVF_cross_triangles.py old mode 100644 new mode 100755 index 5662d77..7692f94 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_cross_triangles/test_validation2DDiffusionVF_cross_triangles.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_cross_triangles/test_validation2DDiffusionVF_cross_triangles.py @@ -61,7 +61,7 @@ def test_validation2DVF_cross_triangles(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D cross triangles meshes : scheme order is ", -a + print( "FV for diffusion on 2D cross triangles meshes : scheme order is ", -a) assert abs(a+0.035)<0.001 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_deformedQuadrangles/test_validation2DDiffusionVF_deformedQuadrangles.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_deformedQuadrangles/test_validation2DDiffusionVF_deformedQuadrangles.py old mode 100644 new mode 100755 index 9ae8f32..f1c2782 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_deformedQuadrangles/test_validation2DDiffusionVF_deformedQuadrangles.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_deformedQuadrangles/test_validation2DDiffusionVF_deformedQuadrangles.py @@ -57,7 +57,7 @@ def test_validation2DVF_deformedQuadrangles(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D deformed quadrangles meshes : scheme order is ", -a + print( "FV for diffusion on 2D deformed quadrangles meshes : scheme order is ", -a) assert abs(a+0.944)<0.001 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_flat_cross_triangles/test_validation2DDiffusionVF_flat_cross_triangles.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_flat_cross_triangles/test_validation2DDiffusionVF_flat_cross_triangles.py old mode 100644 new mode 100755 index e0852f3..8bf2e2d --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_flat_cross_triangles/test_validation2DDiffusionVF_flat_cross_triangles.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_flat_cross_triangles/test_validation2DDiffusionVF_flat_cross_triangles.py @@ -61,7 +61,7 @@ def test_validation2DVF_flat_cross_triangles(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D flat cross triangles meshes : scheme order is ", -a + print( "FV for diffusion on 2D flat cross triangles meshes : scheme order is ", -a) assert abs(a-0.32)<0.1 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_hexagons/test_validation2DDiffusionVF_hexagons.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_hexagons/test_validation2DDiffusionVF_hexagons.py old mode 100644 new mode 100755 index 0d75cab..ad22658 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_hexagons/test_validation2DDiffusionVF_hexagons.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_hexagons/test_validation2DDiffusionVF_hexagons.py @@ -26,7 +26,6 @@ def test_validation2DVF_hexagons(): # Storing of numerical errors, mesh sizes and diagonal values for filename in meshList: error_tab[i], mesh_size_tab[i], diag_data[i], min_sol_num, max_sol_num, time_tab[i] =FiniteVolumes2DDiffusion_SQUARE.solve_file(mesh_path+filename,resolution,meshType,testColor) - print min_sol_num assert min_sol_num>-0.03 assert max_sol_num<1.2 plt.plot(curv_abs, diag_data[i], label= str(mesh_size_tab[i]) + ' cells') @@ -58,7 +57,7 @@ def test_validation2DVF_hexagons(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D hexagonal meshes : scheme order is ", -a + print( "FV for diffusion on 2D hexagonal meshes : scheme order is ", -a) assert abs(a+1.95)<0.01 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_loc_ref/test_validation2DDiffusionVF_loc_ref.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_loc_ref/test_validation2DDiffusionVF_loc_ref.py old mode 100644 new mode 100755 index a8cbdaf..3f2bac0 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_loc_ref/test_validation2DDiffusionVF_loc_ref.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_loc_ref/test_validation2DDiffusionVF_loc_ref.py @@ -57,7 +57,7 @@ def test_validation2DVF_loc_ref(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D refined squares meshes : scheme order is ", -a + print( "FV for diffusion on 2D refined squares meshes : scheme order is ", -a) assert abs(a+0.982)<0.001 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_long_rectangles/test_validation2DDiffusionVF_long_rectangles.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_long_rectangles/test_validation2DDiffusionVF_long_rectangles.py old mode 100644 new mode 100755 index 7e98e98..4ab6a4d --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_long_rectangles/test_validation2DDiffusionVF_long_rectangles.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_long_rectangles/test_validation2DDiffusionVF_long_rectangles.py @@ -62,7 +62,7 @@ def test_validation2DVF_long_rectangles(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D long rectangles meshes : scheme order is ", -a + print( "FV for diffusion on 2D long rectangles meshes : scheme order is ", -a) assert abs(a+1.488)<0.1 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_skinny_triangles/test_validation2DDiffusionVF_skinny_triangles.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_skinny_triangles/test_validation2DDiffusionVF_skinny_triangles.py old mode 100644 new mode 100755 index bdd08aa..e93d900 --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_skinny_triangles/test_validation2DDiffusionVF_skinny_triangles.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_skinny_triangles/test_validation2DDiffusionVF_skinny_triangles.py @@ -62,7 +62,7 @@ def test_validation2DVF_skinny_triangles(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D skinny triangles meshes : scheme order is ", -a + print( "FV for diffusion on 2D skinny triangles meshes : scheme order is ", -a) assert abs(a-0.442)<0.01 # Plot of convergence curve diff --git a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_squares/test_validation2DDiffusionVF_squares.py b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_squares/test_validation2DDiffusionVF_squares.py old mode 100644 new mode 100755 index aba00cc..2ed0bbd --- a/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_squares/test_validation2DDiffusionVF_squares.py +++ b/CDMATH/tests/validation/AnisotropicDiffusion/2DDiffusionVF_squares/test_validation2DDiffusionVF_squares.py @@ -62,7 +62,7 @@ def test_validation2DVF_squares(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV for diffusion on 2D rectangular meshes : scheme order is ", -a + print( "FV for diffusion on 2D rectangular meshes : scheme order is ", -a) assert abs(a+2)<0.1 # Plot of convergence curve diff --git a/CDMATH/tests/validation/Poisson/3DPoissonVF_checkerboard/test_validation3DPoissonVF_checkerboard.py b/CDMATH/tests/validation/Poisson/3DPoissonVF_checkerboard/test_validation3DPoissonVF_checkerboard.py old mode 100644 new mode 100755 index b45be75..93daa40 --- a/CDMATH/tests/validation/Poisson/3DPoissonVF_checkerboard/test_validation3DPoissonVF_checkerboard.py +++ b/CDMATH/tests/validation/Poisson/3DPoissonVF_checkerboard/test_validation3DPoissonVF_checkerboard.py @@ -63,7 +63,7 @@ def test_validation3DVF_checkerboard(): a=( a3*b1-a2*b2)/det b=(-a2*b1+a1*b2)/det - print "FV on 3D checkerboard mesh : scheme order is ", -a + print( "FV on 3D checkerboard mesh : scheme order is ", -a) assert abs(a-0.26)<0.01 # Plot of convergence curve diff --git a/CDMATH/tests/validation/WaveSystem_stationary_source/2DWaveSystemPStagCheckerboard/test_validation2DWaveSystemPStagCheckerboard_source.py b/CDMATH/tests/validation/WaveSystem_stationary_source/2DWaveSystemPStagCheckerboard/test_validation2DWaveSystemPStagCheckerboard_source.py old mode 100644 new mode 100755 index d7a1d90..89ddfdf --- a/CDMATH/tests/validation/WaveSystem_stationary_source/2DWaveSystemPStagCheckerboard/test_validation2DWaveSystemPStagCheckerboard_source.py +++ b/CDMATH/tests/validation/WaveSystem_stationary_source/2DWaveSystemPStagCheckerboard/test_validation2DWaveSystemPStagCheckerboard_source.py @@ -134,9 +134,9 @@ def test_validation2DWaveSystemSourcePStagCheckerboard(scaling): bp=(-a2*b1p+a1*b2p)/det if(scaling==0): - print "FV pseudo staggered on 2D checkerboard meshes : scheme order for pressure without scaling is ", -ap + print( "FV pseudo staggered on 2D checkerboard meshes : scheme order for pressure without scaling is ", -ap) else: - print "FV pseudo staggered on 2D checkerboard meshes : scheme order for pressure with scaling is ", -ap + print( "FV pseudo staggered on 2D checkerboard meshes : scheme order for pressure with scaling is ", -ap) b1u=np.dot(error_u_tab,mesh_size_tab) b2u=np.sum(error_u_tab) @@ -144,9 +144,9 @@ def test_validation2DWaveSystemSourcePStagCheckerboard(scaling): bu=(-a2*b1u+a1*b2u)/det if(scaling==0): - print "FV pseudo staggered on 2D checkerboard meshes : scheme order for velocity without scaling is ", -au + print( "FV pseudo staggered on 2D checkerboard meshes : scheme order for velocity without scaling is ", -au) else: - print "FV pseudo staggered on 2D checkerboard meshes : scheme order for velocity with scaling is ", -au + print( "FV pseudo staggered on 2D checkerboard meshes : scheme order for velocity with scaling is ", -au) # Plot of convergence curves plt.close()