From: michael Date: Mon, 30 Nov 2020 13:13:46 +0000 (+0100) Subject: Corrected indentation and missing parenthesis X-Git-Tag: V9_7_0~111 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a20f0e8ce670ef978a029a28bad08091d6c7cbdf;p=tools%2Fsolverlab.git Corrected indentation and missing parenthesis --- diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF.py index 17069e6..f314b78 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF.py @@ -31,7 +31,7 @@ def StationaryDiffusionEquation_2DEF_StructuredTriangles(): M.setGroupAtPlan(ysup,1,eps,"Bord3") M.setGroupAtPlan(yinf,1,eps,"Bord4") - print "Built a regular triangular 2D mesh from a square mesh with ", nx,"x" ,ny, " cells" + print( "Built a regular triangular 2D mesh from a square mesh with ", nx,"x" ,ny, " cells") FEComputation=True myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); @@ -91,7 +91,7 @@ def StationaryDiffusionEquation_2DEF_StructuredTriangles(): print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF_Neumann.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF_Neumann.py index 74411a9..6258ee1 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF_Neumann.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF_Neumann.py @@ -21,8 +21,8 @@ def StationaryDiffusionEquation_2DEF_StructuredTriangles_Neumann(): xsup = 1.0; yinf = 0.0; ysup = 1.0; - nx=20; - ny=20; + nx=3; + ny=3; M=cm.Mesh(xinf,xsup,nx,yinf,ysup,ny,0)#Regular triangular mesh # set the limit field for each boundary eps=1e-6; @@ -31,7 +31,7 @@ def StationaryDiffusionEquation_2DEF_StructuredTriangles_Neumann(): M.setGroupAtPlan(ysup,1,eps,"Bord3") M.setGroupAtPlan(yinf,1,eps,"Bord4") - print "Built a regular triangular 2D mesh from a square mesh with ", nx,"x" ,ny, " cells" + print( "Built a regular triangular 2D mesh from a square mesh with ", nx,"x" ,ny, " cells") FEComputation=True myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); @@ -86,7 +86,7 @@ def StationaryDiffusionEquation_2DEF_StructuredTriangles_Neumann(): print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_EquilateralTriangles.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_EquilateralTriangles.py index 2cc35c3..708147c 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_EquilateralTriangles.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_EquilateralTriangles.py @@ -78,10 +78,10 @@ def StationaryDiffusionEquation_2DFV_EquilateralTriangles(): print("Absolute error = max(| exact solution - numerical solution |) = ",erreur_abs ) print("Relative error = max(| exact solution - numerical solution |)/max(| exact solution |) = ",erreur_abs/max_abs_sol_exacte) - print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) + print("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares.py index d47ef43..4199e30 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares.py @@ -31,7 +31,7 @@ def StationaryDiffusionEquation_2DFV_StructuredSquares(): M.setGroupAtPlan(ysup,1,eps,"Bord3") M.setGroupAtPlan(yinf,1,eps,"Bord4") - print "Built a regular 2D square mesh with ", nx,"x" ,ny, " cells" + print( "Built a regular 2D square mesh with ", nx,"x" ,ny, " cells") FEComputation=False myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); @@ -89,10 +89,10 @@ def StationaryDiffusionEquation_2DFV_StructuredSquares(): print("Absolute error = max(| exact solution - numerical solution |) = ",erreur_abs ) print("Relative error = max(| exact solution - numerical solution |)/max(| exact solution |) = ",erreur_abs/max_abs_sol_exacte) - print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) + print("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares_Neumann.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares_Neumann.py index 041a082..850c81c 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares_Neumann.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares_Neumann.py @@ -31,18 +31,12 @@ def StationaryDiffusionEquation_2DFV_StructuredSquares_Neumann(): M.setGroupAtPlan(ysup,1,eps,"Bord3") M.setGroupAtPlan(yinf,1,eps,"Bord4") - print "Built a regular 2D square mesh with ", nx,"x" ,ny, " cells" + print( "Built a regular 2D square mesh with ", nx,"x" ,ny, " cells") FEComputation=False myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); myProblem.setMesh(M); - # set the limit value for each boundary - T1=0; - T2=0; - T3=0; - T4=0; - myProblem.setNeumannBoundaryCondition("Bord1") myProblem.setNeumannBoundaryCondition("Bord2") myProblem.setNeumannBoundaryCondition("Bord3") @@ -89,10 +83,10 @@ def StationaryDiffusionEquation_2DFV_StructuredSquares_Neumann(): print("Absolute error = max(| exact solution - numerical solution |) = ",erreur_abs ) print("Relative error = max(| exact solution - numerical solution |)/max(| exact solution |) = ",erreur_abs/max_abs_sol_exacte) - print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) + print("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredTriangles.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredTriangles.py index 8aef892..a6795c4 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredTriangles.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredTriangles.py @@ -31,7 +31,7 @@ def StationaryDiffusionEquation_2DFV_StructuredTriangles(): M.setGroupAtPlan(ysup,1,eps,"Bord3") M.setGroupAtPlan(yinf,1,eps,"Bord4") - print "Built a regular triangular 2D mesh from a square mesh with ", nx,"x" ,ny, " cells" + print( "Built a regular triangular 2D mesh from a square mesh with ", nx,"x" ,ny, " cells") FEComputation=False myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); @@ -89,10 +89,10 @@ def StationaryDiffusionEquation_2DFV_StructuredTriangles(): print("Absolute error = max(| exact solution - numerical solution |) = ",erreur_abs ) print("Relative error = max(| exact solution - numerical solution |)/max(| exact solution |) = ",erreur_abs/max_abs_sol_exacte) - print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) + print("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF.py index 59fc326..1a1fc65 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF.py @@ -36,7 +36,7 @@ def StationaryDiffusionEquation_3DEF_StructuredTriangles(): M.setGroupAtPlan(zsup,2,eps,"Bord5") M.setGroupAtPlan(zinf,2,eps,"Bord6") - print "Built a regular tetrahedra 3D mesh from a cube mesh with ", nx,"x" ,ny,"x" ,nz, " cells" + print( "Built a regular tetrahedra 3D mesh from a cube mesh with ", nx,"x" ,ny,"x" ,nz, " cells") FEComputation=True myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); @@ -98,10 +98,10 @@ def StationaryDiffusionEquation_3DEF_StructuredTriangles(): print("Absolute error = max(| exact solution - numerical solution |) = ",erreur_abs ) print("Relative error = max(| exact solution - numerical solution |)/max(| exact solution |) = ",erreur_abs/max_abs_sol_exacte) - print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) + print("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF_RoomCooling.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF_RoomCooling.py index a66d8cd..e3f8360 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF_RoomCooling.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF_RoomCooling.py @@ -19,7 +19,7 @@ def StationaryDiffusionEquation_3DEF_RoomCooling(): #============================================== my_mesh = cdmath.Mesh("../resources/RoomWithTetras2488.med") - print "Loaded unstructured 3D mesh" + print( "Loaded unstructured 3D mesh") #Conditions limites Tmur=20 diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredCubes.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredCubes.py index 940d99f..2007b62 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredCubes.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredCubes.py @@ -36,7 +36,7 @@ def StationaryDiffusionEquation_3DFV_StructuredCubes(): M.setGroupAtPlan(zsup,2,eps,"Bord5") M.setGroupAtPlan(zinf,2,eps,"Bord6") - print "Built a regular 3D cube mesh with ", nx,"x" ,ny,"x" ,nz, " cells" + print( "Built a regular 3D cube mesh with ", nx,"x" ,ny,"x" ,nz, " cells") FEComputation=False myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); @@ -99,10 +99,10 @@ def StationaryDiffusionEquation_3DFV_StructuredCubes(): print("Absolute error = max(| exact solution - numerical solution |) = ",erreur_abs ) print("Relative error = max(| exact solution - numerical solution |)/max(| exact solution |) = ",erreur_abs/max_abs_sol_exacte) - print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) + print("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredTetrahedra.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredTetrahedra.py index 9dba121..858951b 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredTetrahedra.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredTetrahedra.py @@ -36,7 +36,7 @@ def StationaryDiffusionEquation_3DFV_StructuredTetrahedra(): M.setGroupAtPlan(zsup,2,eps,"Bord5") M.setGroupAtPlan(zinf,2,eps,"Bord6") - print "Built a regular 3D tetrahedral mesh from ", nx,"x" ,ny,"x" ,nz, " cubic cells" + print( "Built a regular 3D tetrahedral mesh from ", nx,"x" ,ny,"x" ,nz, " cubic cells") FEComputation=False myProblem = cf.StationaryDiffusionEquation(spaceDim,FEComputation); @@ -99,10 +99,10 @@ def StationaryDiffusionEquation_3DFV_StructuredTetrahedra(): print("Absolute error = max(| exact solution - numerical solution |) = ",erreur_abs ) print("Relative error = max(| exact solution - numerical solution |)/max(| exact solution |) = ",erreur_abs/max_abs_sol_exacte) - print ("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) + print("Maximum numerical solution = ", max_sol_num, " Minimum numerical solution = ", min_sol_num) assert erreur_abs/max_abs_sol_exacte <1. - pass + pass print( "------------ !!! End of calculation !!! -----------" ); diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_StructuredCubes.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_StructuredCubes.py index cc24432..35b922d 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_StructuredCubes.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_StructuredCubes.py @@ -19,7 +19,7 @@ def StationaryDiffusionEquation_3DVF_RoomCooling_StructuredCubes(): #============================================== my_mesh = cdmath.Mesh("../resources/RoomWithCubes480.med") - print "Loaded Structured 3D mesh" + print( "Loaded Structured 3D mesh") #Conditions limites Tmur=20 diff --git a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_UnstructuredTetras.py b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_UnstructuredTetras.py index 931bbeb..4b6cf91 100755 --- a/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_UnstructuredTetras.py +++ b/CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_UnstructuredTetras.py @@ -19,7 +19,7 @@ def StationaryDiffusionEquation_3DVF_RoomCooling_UnstructuredTetras(): #============================================== my_mesh = cdmath.Mesh("../resources/RoomWithTetras2488.med") - print "Loaded Structured 3D mesh" + print( "Loaded Structured 3D mesh") #Conditions limites Tmur=20