]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Correcting copy of an array in example and doc
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Mon, 30 Apr 2012 06:37:17 +0000 (08:37 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Mon, 30 Apr 2012 06:37:17 +0000 (08:37 +0200)
doc/examples.rst
examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py

index 8e937d8b9baae5046b49386367cc10f61985c80c..a79705c98824c03152a57b556be9a0713d7f3242 100644 (file)
@@ -460,9 +460,9 @@ here for convenience::
             # 
             Jacobian  = []
             for i in range( len(dX) ):
-                X_plus_dXi     = X.A1
+                X_plus_dXi     = numpy.array( X.A1 )
                 X_plus_dXi[i]  = X[i] + dX[i]
-                X_moins_dXi    = X.A1
+                X_moins_dXi    = numpy.array( X.A1 )
                 X_moins_dXi[i] = X[i] - dX[i]
                 #
                 HX_plus_dXi  = FunctionH( X_plus_dXi )
@@ -476,7 +476,7 @@ here for convenience::
             #
             HX_plus_dX = []
             for i in range( len(dX) ):
-                X_plus_dXi    = X.A1
+                X_plus_dXi    = numpy.array( X.A1 )
                 X_plus_dXi[i] = X[i] + dX[i]
                 #
                 HX_plus_dXi = FunctionH( X_plus_dXi )
index e83bbf60dbda479134b01b8c37495c17ab934558..0aa40109f85f34f484434a23ca536d5886a29b20 100644 (file)
@@ -89,9 +89,9 @@ def TangentH( X, increment = 0.01, centeredDF = False ):
         # ----------------------------------------------
         Jacobienne  = []
         for i in range( len(dX) ):
-            X_plus_dXi     = X.A1
+            X_plus_dXi     = numpy.array( X.A1 )
             X_plus_dXi[i]  = X[i] + dX[i]
-            X_moins_dXi    = X.A1
+            X_moins_dXi    = numpy.array( X.A1 )
             X_moins_dXi[i] = X[i] - dX[i]
             #
             HX_plus_dXi  = FunctionH( X_plus_dXi )
@@ -107,7 +107,7 @@ def TangentH( X, increment = 0.01, centeredDF = False ):
         # ----------------------------------------------
         HX_plus_dX = []
         for i in range( len(dX) ):
-            X_plus_dXi    = X.A1
+            X_plus_dXi    = numpy.array( X.A1 )
             X_plus_dXi[i] = X[i] + dX[i]
             #
             HX_plus_dXi = FunctionH( X_plus_dXi )