]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Corrected error in test
authormichael <michael@localhost.localdomain>
Wed, 7 Oct 2020 08:23:44 +0000 (10:23 +0200)
committermichael <michael@localhost.localdomain>
Wed, 7 Oct 2020 08:23:44 +0000 (10:23 +0200)
CDMATH/tests/examples/SpectrumLaplace2DEF/SpectrumLaplace2DEF_SQUARE.py

index f34f58aaf1783ab4bc02d3162178af71feee817e..3301a1da1a8331f2f86db4e6ef7989fbf7a9d3a2 100755 (executable)
@@ -91,12 +91,12 @@ for i in range(nbCells):
        N2=my_mesh.getNode(nodeId2)
 
        #Formule des gradients voir EF P1 -> calcul déterminants
-       GradShapeFunc0[0]= (N1.y()-N2.y())/2
-       GradShapeFunc0[1]=-(N1.x()-N2.x())/2
-       GradShapeFunc1[0]=-(N0.y()-N2.y())/2
-       GradShapeFunc1[1]= (N0.x()-N2.x())/2
-       GradShapeFunc2[0]= (N0.y()-N1.y())/2
-       GradShapeFunc2[1]=-(N0.x()-N1.x())/2
+       GradShapeFunc0[0]= (N1.y()-N2.y())*0.5
+       GradShapeFunc0[1]=-(N1.x()-N2.x())*0.5
+       GradShapeFunc1[0]=-(N0.y()-N2.y())*0.5
+       GradShapeFunc1[1]= (N0.x()-N2.x())*0.5
+       GradShapeFunc2[0]= (N0.y()-N1.y())*0.5
+       GradShapeFunc2[1]=-(N0.x()-N1.x())*0.5
 
        #Création d'un tableau (numéro du noeud, gradient de la fonction de forme
        GradShapeFuncs={nodeId0 : GradShapeFunc0}