A[0,i+1]= c0*normal[i]*coeff
A[i+1,0]= c0*normal[i]*coeff
- return (A-absA)/2
+ return (A-absA)*0.5
def computeDivergenceMatrix(my_mesh,nbVoisinsMax,dt,scaling,test_bc):
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()
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"])
else:
dUn=divMat*Un-S*dt