]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Improving elementary storage facilities V7_main origin/V7_main
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Thu, 13 Mar 2014 19:51:20 +0000 (20:51 +0100)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Thu, 13 Mar 2014 19:56:51 +0000 (20:56 +0100)
src/daComposant/daAlgorithms/3DVAR.py
src/daComposant/daAlgorithms/EnsembleBlue.py
src/daComposant/daAlgorithms/ExtendedKalmanFilter.py
src/daComposant/daAlgorithms/KalmanFilter.py
src/daComposant/daAlgorithms/NonLinearLeastSquares.py
src/daComposant/daAlgorithms/QuantileRegression.py
src/daComposant/daAlgorithms/UnscentedKalmanFilter.py
src/daComposant/daCore/Persistence.py

index 1bc5ea627ca56199cc4d4045a74589e3bb9e0b74..c6818eb64067b4ea9989cb8abee5a569e5259e3a 100644 (file)
@@ -162,7 +162,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
             Jo  = 0.5 * (Y - _HX).T * RI * (Y - _HX)
             J   = float( Jb ) + float( Jo )
             if self._parameters["StoreInternalVariables"]:
-                self.StoredVariables["CurrentState"].store( _X.A1 )
+                self.StoredVariables["CurrentState"].store( _X )
             self.StoredVariables["CostFunctionJb"].store( Jb )
             self.StoredVariables["CostFunctionJo"].store( Jo )
             self.StoredVariables["CostFunctionJ" ].store( J )
index bb6831b88d481ac23a42353e6c1f9376c96bf8d0..890632126ea15037c32658b8caadebf149c19eca 100644 (file)
@@ -81,8 +81,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
         for iens in range(nb_ens):
             d  = EnsembleY[:,iens] - Hm * Xb[iens]
             Xa = Xb[iens] + K*d
-            
-            self.StoredVariables["CurrentState"].store( Xa.A1 )
+            self.StoredVariables["CurrentState"].store( Xa )
             self.StoredVariables["Innovation"].store( d.A1 )
         #
         # Fabrication de l'analyse
index 8db849c3b88e0654b5281ddf8ffcac354d4d81f8..49ae71bae3c98683e2f2d95b9a911ae44b5765e0 100644 (file)
@@ -177,7 +177,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
                 Jb  = 0.5 * (Xn - Xb).T * BI * (Xn - Xb)
                 Jo  = 0.5 * d.T * RI * d
                 J   = float( Jb ) + float( Jo )
-                self.StoredVariables["CurrentState"].store( Xn.A1 )
+                self.StoredVariables["CurrentState"].store( Xn )
                 self.StoredVariables["CostFunctionJb"].store( Jb )
                 self.StoredVariables["CostFunctionJo"].store( Jo )
                 self.StoredVariables["CostFunctionJ" ].store( J )
index 406cbcb6c3c300370418e30f7800cb7c1d6e9fbc..754b7720b700500a1932c8330fc0c436923ba27c 100644 (file)
@@ -152,7 +152,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
                 Jb  = 0.5 * (Xn - Xb).T * BI * (Xn - Xb)
                 Jo  = 0.5 * d.T * RI * d
                 J   = float( Jb ) + float( Jo )
-                self.StoredVariables["CurrentState"].store( Xn.A1 )
+                self.StoredVariables["CurrentState"].store( Xn )
                 self.StoredVariables["CostFunctionJb"].store( Jb )
                 self.StoredVariables["CostFunctionJo"].store( Jo )
                 self.StoredVariables["CostFunctionJ" ].store( J )
index 501046b7b7adc19c6e73d74ff17506e8bd1f9090..ed1bc5e209688e0b7f2b51205dddaf2e8cef6762 100644 (file)
@@ -138,7 +138,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
             Jo  = 0.5 * (Y - _HX).T * RI * (Y - _HX)
             J   = float( Jb ) + float( Jo )
             if self._parameters["StoreInternalVariables"]:
-                self.StoredVariables["CurrentState"].store( _X.A1 )
+                self.StoredVariables["CurrentState"].store( _X )
             self.StoredVariables["CostFunctionJb"].store( Jb )
             self.StoredVariables["CostFunctionJo"].store( Jo )
             self.StoredVariables["CostFunctionJ" ].store( J )
@@ -161,7 +161,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
             Jo  = 0.5 * (Y - _HX).T * RI * (Y - _HX)
             J   = float( Jb ) + float( Jo )
             if self._parameters["StoreInternalVariables"]:
-                self.StoredVariables["CurrentState"].store( _X.A1 )
+                self.StoredVariables["CurrentState"].store( _X )
             self.StoredVariables["CostFunctionJb"].store( Jb )
             self.StoredVariables["CostFunctionJo"].store( Jo )
             self.StoredVariables["CostFunctionJ" ].store( J )
index 95a9c9a453b2640ad04653f8a8e7ff10abde6265..59eba1856dd92104c8d0111b8da3af64a94c43a3 100644 (file)
@@ -115,7 +115,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
             Jo  = 0.
             J   = Jb + Jo
             if self._parameters["StoreInternalVariables"]:
-                self.StoredVariables["CurrentState"].store( _X.A1 )
+                self.StoredVariables["CurrentState"].store( _X )
             self.StoredVariables["CostFunctionJb"].store( Jb )
             self.StoredVariables["CostFunctionJo"].store( Jo )
             self.StoredVariables["CostFunctionJ" ].store( J )
index d66e6e021e5dc92fa55a1629513b86d6b0cad162..ffc173931a070d39d69acea105acb059225fc7db 100644 (file)
@@ -273,7 +273,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
                 Jb  = 0.5 * (Xn - Xb).T * BI * (Xn - Xb)
                 Jo  = 0.5 * d.T * RI * d
                 J   = float( Jb ) + float( Jo )
-                self.StoredVariables["CurrentState"].store( Xn.A1 )
+                self.StoredVariables["CurrentState"].store( Xn )
                 self.StoredVariables["CostFunctionJb"].store( Jb )
                 self.StoredVariables["CostFunctionJo"].store( Jo )
                 self.StoredVariables["CostFunctionJ" ].store( J )
index 4193e26e4467467424d72e7ccb086d05dd10b53c..892cd16ee94821e759879f07a36a631a598471b5 100644 (file)
@@ -76,7 +76,7 @@ class Persistence:
         """
         if value is None: raise ValueError("Value argument required")
         #
-        self.__values.append(self.__basetype(value))
+        self.__values.append(copy.copy(self.__basetype(value)))
         self.__tags.append(kwargs)
         #
         if self.__dynamic: self.__replots()