]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Corrected indentation and missing parenthesis
authormichael <michael@localhost.localdomain>
Mon, 30 Nov 2020 13:13:46 +0000 (14:13 +0100)
committermichael <michael@localhost.localdomain>
Mon, 30 Nov 2020 13:13:46 +0000 (14:13 +0100)
12 files changed:
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DEF_Neumann.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_EquilateralTriangles.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredSquares_Neumann.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_2DFV_StructuredTriangles.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DEF_RoomCooling.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredCubes.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DFV_StructuredTetrahedra.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_StructuredCubes.py
CoreFlows/examples/Python/StationaryDiffusionEquation/StationaryDiffusionEquation_3DVF_RoomCooling_UnstructuredTetras.py

index 17069e6b59a808d907f5367d1131d1b926765a88..f314b787d57dbbe2b9e29a41e1411845704a2bdd 100755 (executable)
@@ -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 !!! -----------" );
 
index 74411a976a338bb8da2140422a4ab514f29b166b..6258ee174ac00cadd55492bd1b2e9d81731f30b5 100755 (executable)
@@ -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 !!! -----------" );
 
index 2cc35c3ce3acc9e804479afd7c62557dc049b03f..708147c463170fd0d070ee50fb98033db57c7435 100755 (executable)
@@ -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 !!! -----------" );
 
index d47ef43eecd36d9070a3fa8b65aa320329c3f622..4199e30cad2de9325f08c9f4647d6715b812965d 100755 (executable)
@@ -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 !!! -----------" );
 
index 041a082288a0d42ad5d8c52b4dfac2b62e57d53e..850c81ccedafb85203791aee9a1a4ecceacf5cf4 100755 (executable)
@@ -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 !!! -----------" );
 
index 8aef892362ea05d5d00e2fa838e997c5af1183f9..a6795c42c608b32c3487526014d0886e92df0cb8 100755 (executable)
@@ -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 !!! -----------" );
 
index 59fc3267645d73fe3014c6aef2471a7359e88844..1a1fc651014e42ab99234324b734b4206d6bfb07 100755 (executable)
@@ -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 !!! -----------" );
 
index a66d8cdddbb38c86cb921be828e1fa50a811fa43..e3f8360d56c2f65ce6d6797aa8bb7bcfbd05c5c8 100755 (executable)
@@ -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
index 940d99ffa4cfc5c82f0589ca1d251deece5f79b6..2007b6230024aab58db134a24394704ae8f2e53d 100755 (executable)
@@ -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 !!! -----------" );
 
index 9dba1214a543855ceb3a22db90e745889a828b94..858951b613e0bc5af18ba649bafde0c4a330ba98 100755 (executable)
@@ -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 !!! -----------" );
 
index cc244328359d9d121b293473ced39bc31f3c0166..35b922d7783a00879d1d4c6c8167b5371498209a 100755 (executable)
@@ -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
index 931bbeb4b1bf1a4af1de55ea55889f1abda4ab9a..4b6cf91e520a92f30ea9ed1d331871217b0d7f59 100755 (executable)
@@ -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