From 41b3e4fc1723e0277d8760c88dcec29d94ad48da Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 29 Nov 2020 00:05:09 +0100 Subject: [PATCH] Replaced /2 by *0.5 --- .../scripts/WaveSystemCentered/WaveSystemCentered.py | 8 +++----- .../validation/scripts/WaveSystemPStag/WaveSystemPStag.py | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) mode change 100644 => 100755 CDMATH/tests/validation/scripts/WaveSystemCentered/WaveSystemCentered.py mode change 100644 => 100755 CDMATH/tests/validation/scripts/WaveSystemPStag/WaveSystemPStag.py diff --git a/CDMATH/tests/validation/scripts/WaveSystemCentered/WaveSystemCentered.py b/CDMATH/tests/validation/scripts/WaveSystemCentered/WaveSystemCentered.py old mode 100644 new mode 100755 index 9b4b24d..300ba81 --- a/CDMATH/tests/validation/scripts/WaveSystemCentered/WaveSystemCentered.py +++ b/CDMATH/tests/validation/scripts/WaveSystemCentered/WaveSystemCentered.py @@ -130,7 +130,7 @@ def jacobianMatrices(normal, coeff, scaling): A[0,i+1]= c0*normal[i]*coeff A[i+1,0]= c0*normal[i]*coeff - return A/2 + return A*0.5 def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt,scaling,test_bc): @@ -289,7 +289,6 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc LS=cdmath.LinearSolver(divMat,Un+S*dt,iterGMRESMax, precision, "GMRES","ILU") else: LS=cdmath.LinearSolver(divMat,Vn+S*dt,iterGMRESMax, precision, "GMRES","ILU") - LS.setComputeConditionNumber() test_desc["Linear_solver_algorithm"]=LS.getNameOfMethod() test_desc["Linear_solver_preconditioner"]=LS.getNameOfPc() @@ -331,7 +330,6 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc test_desc["Linear_system_max_actual_iterations_number"]=max(LS.getNumberOfIter(),test_desc["Linear_system_max_actual_iterations_number"]) test_desc["Linear_system_max_actual_error"]=max(LS.getResidu(),test_desc["Linear_system_max_actual_error"]) - test_desc["Linear_system_max_actual_condition number"]=max(LS.getConditionNumber(),test_desc["Linear_system_max_actual_condition number"]) maxVector=dUn.maxVector(dim+1) @@ -347,7 +345,7 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc #Sauvegardes if(it==1 or it%output_freq==0 or it>=ntmax or isStationary or time >=tmax): - print"-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt) + print( "-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt) ) if(with_source): print("Variation temporelle relative : pressure ", maxVector[0] ,", velocity x", maxVector[1]/rho0 ,", velocity y", maxVector[2]/rho0) else: @@ -383,7 +381,7 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc else: print("Ecart au stationnaire exact : error_p= ",delta_press/p0," error_||u||= ",delta_v.maxVector()[0]) print - print"-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt) + print("-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt)) if(with_source): print("Variation temporelle relative : pressure ", maxVector[0] ,", velocity x", maxVector[1]/rho0 ,", velocity y", maxVector[2]/rho0) else: diff --git a/CDMATH/tests/validation/scripts/WaveSystemPStag/WaveSystemPStag.py b/CDMATH/tests/validation/scripts/WaveSystemPStag/WaveSystemPStag.py old mode 100644 new mode 100755 index ce411f0..66e3178 --- a/CDMATH/tests/validation/scripts/WaveSystemPStag/WaveSystemPStag.py +++ b/CDMATH/tests/validation/scripts/WaveSystemPStag/WaveSystemPStag.py @@ -134,7 +134,7 @@ def jacobianMatrices(normal, coeff, signun,scaling): absA[0,i+1]= signun*A[0,i+1] absA[i+1,0]=-signun*A[i+1,0] - return (A-absA)/2 + return (A-absA)*0.5 def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt,scaling,test_bc): @@ -297,7 +297,6 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc LS=cdmath.LinearSolver(divMat,Un+S*dt,iterGMRESMax, precision, "GMRES","ILU") else: LS=cdmath.LinearSolver(divMat,Vn+S*dt,iterGMRESMax, precision, "GMRES","ILU") - LS.setComputeConditionNumber() test_desc["Linear_solver_algorithm"]=LS.getNameOfMethod() test_desc["Linear_solver_preconditioner"]=LS.getNameOfPc() @@ -339,7 +338,6 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc test_desc["Linear_system_max_actual_iterations_number"]=max(LS.getNumberOfIter(),test_desc["Linear_system_max_actual_iterations_number"]) test_desc["Linear_system_max_actual_error"]=max(LS.getResidu(),test_desc["Linear_system_max_actual_error"]) - test_desc["Linear_system_max_actual_condition number"]=max(LS.getConditionNumber(),test_desc["Linear_system_max_actual_condition number"]) maxVector=dUn.maxVector(dim+1) @@ -355,7 +353,7 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc #Sauvegardes if(it==1 or it%output_freq==0 or it>=ntmax or isStationary or time >=tmax): - print"-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt) + print( "-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt) ) if(with_source): print("Variation temporelle relative : pressure ", maxVector[0] ,", velocity x", maxVector[1]/rho0 ,", velocity y", maxVector[2]/rho0) else: @@ -391,7 +389,7 @@ def WaveSystemVF(ntmax, tmax, cfl, my_mesh, output_freq, meshName, resolution,sc else: print("Ecart au stationnaire exact : error_p= ",delta_press/p0," error_||u||= ",delta_v.maxVector()[0]) print - print"-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt) + print("-- Iter: " + str(it) + ", Time: " + str(time) + ", dt: " + str(dt)) if(with_source): print("Variation temporelle relative : pressure ", maxVector[0] ,", velocity x", maxVector[1]/rho0 ,", velocity y", maxVector[2]/rho0) else: -- 2.39.2