From: michael Date: Sat, 28 Nov 2020 23:03:22 +0000 (+0100) Subject: Replaced /2 by *0.5 X-Git-Tag: V9_7_0~136 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=305d033b3e97506bdc2720f689ced8d1333aabc0;p=tools%2Fsolverlab.git Replaced /2 by *0.5 --- diff --git a/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_DISK/FiniteElements2DPoissonStiffBC_DISK.py b/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_DISK/FiniteElements2DPoissonStiffBC_DISK.py old mode 100644 new mode 100755 index 497dbf1..cd1775d --- a/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_DISK/FiniteElements2DPoissonStiffBC_DISK.py +++ b/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_DISK/FiniteElements2DPoissonStiffBC_DISK.py @@ -154,9 +154,9 @@ def solve(filename,resolution,meshName, testColor): values1=[0,1,0] values2=[0,0,1] - GradShapeFunc0 = gradientNodal(M,values0)/2 - GradShapeFunc1 = gradientNodal(M,values1)/2 - GradShapeFunc2 = gradientNodal(M,values2)/2 + GradShapeFunc0 = gradientNodal(M,values0)*0.5 + GradShapeFunc1 = gradientNodal(M,values1)*0.5 + GradShapeFunc2 = gradientNodal(M,values2)*0.5 #Création d'un tableau (numéro du noeud, gradient de la fonction de forme) GradShapeFuncs={nodeId0 : GradShapeFunc0} @@ -189,7 +189,7 @@ def solve(filename,resolution,meshName, testColor): else: u2=0 boundaryContributionAdded=True#Contribution from the boundary to matrix line j is done in one step - GradGh = gradientNodal(M,[u0,u1,u2])/2 + GradGh = gradientNodal(M,[u0,u1,u2])*0.5 RHS[j_int] += -(GradGh*GradShapeFuncs[j])/Ci.getMeasure() print("Linear system matrix building done") diff --git a/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_SQUARE/FiniteElements2DPoissonStiffBC_SQUARE.py b/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_SQUARE/FiniteElements2DPoissonStiffBC_SQUARE.py old mode 100644 new mode 100755 index 2b72d89..6824858 --- a/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_SQUARE/FiniteElements2DPoissonStiffBC_SQUARE.py +++ b/CDMATH/tests/validation/scripts/Poisson2DEF_StiffBC_SQUARE/FiniteElements2DPoissonStiffBC_SQUARE.py @@ -152,9 +152,9 @@ def solve(filename,resolution,meshName, testColor): values1=[0,1,0] values2=[0,0,1] - GradShapeFunc0 = gradientNodal(M,values0)/2 - GradShapeFunc1 = gradientNodal(M,values1)/2 - GradShapeFunc2 = gradientNodal(M,values2)/2 + GradShapeFunc0 = gradientNodal(M,values0)*0.5 + GradShapeFunc1 = gradientNodal(M,values1)*0.5 + GradShapeFunc2 = gradientNodal(M,values2)*0.5 #Création d'un tableau (numéro du noeud, gradient de la fonction de forme) GradShapeFuncs={nodeId0 : GradShapeFunc0} @@ -187,7 +187,7 @@ def solve(filename,resolution,meshName, testColor): else: u2=0 boundaryContributionAdded=True#Contribution from the boundary to matrix line j is done in one step - GradGh = gradientNodal(M,[u0,u1,u2])/2 + GradGh = gradientNodal(M,[u0,u1,u2])*0.5 RHS[j_int] += -(GradGh*GradShapeFuncs[j])/Ci.getMeasure() print("Linear system matrix building done")