]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Fix for unusual shape behaviors
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Sat, 16 Apr 2022 04:38:02 +0000 (06:38 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Sat, 16 Apr 2022 04:38:02 +0000 (06:38 +0200)
src/daComposant/daAlgorithms/Atoms/ecwblue.py
src/daComposant/daAlgorithms/Atoms/ecwexblue.py

index 0e62f6a3ecebe8a382b43ab2a73d4aeb5dcc2e98..617c3527515f3a88a34adfb636d4d5855144cb4e 100644 (file)
@@ -77,12 +77,12 @@ def ecwblue(selfA, Xb, Y, U, HO, CM, R, B, __storeState = False):
     if Y.size <= Xb.size:
         _HNHt = numpy.dot(Hm, B @ Ha)
         _A = R + _HNHt
-        _u = numpy.linalg.solve( _A , Innovation )
-        Xa = Xb + (B @ (Ha @ _u)).reshape((-1,1))
+        _u = numpy.linalg.solve( _A , numpy.ravel(Innovation) )
+        Xa = Xb + (B @ numpy.ravel(Ha @ _u)).reshape((-1,1))
     else:
         _HtRH = numpy.dot(Ha, RI @ Hm)
         _A = BI + _HtRH
-        _u = numpy.linalg.solve( _A , numpy.dot(Ha, RI @ Innovation) )
+        _u = numpy.linalg.solve( _A , numpy.ravel(numpy.dot(Ha, RI @ numpy.ravel(Innovation))) )
         Xa = Xb + _u.reshape((-1,1))
     #
     if __storeState: selfA._setInternalState("Xn", Xa)
index 8ddefc99ad00e51888ed0912b8fd576e91f1de60..eeb358abd4b978783279b819b0c1e4903effa011 100644 (file)
@@ -78,12 +78,12 @@ def ecwexblue(selfA, Xb, Y, U, HO, CM, R, B, __storeState = False):
     if Y.size <= Xb.size:
         _HNHt = numpy.dot(Hm, B @ Ha)
         _A = R + _HNHt
-        _u = numpy.linalg.solve( _A , Innovation )
-        Xa = Xb + (B @ (Ha @ _u)).reshape((-1,1))
+        _u = numpy.linalg.solve( _A , numpy.ravel(Innovation) )
+        Xa = Xb + (B @ numpy.ravel(Ha @ _u)).reshape((-1,1))
     else:
         _HtRH = numpy.dot(Ha, RI @ Hm)
         _A = BI + _HtRH
-        _u = numpy.linalg.solve( _A , numpy.dot(Ha, RI @ Innovation) )
+        _u = numpy.linalg.solve( _A , numpy.ravel(numpy.dot(Ha, RI @ numpy.ravel(Innovation))) )
         Xa = Xb + _u.reshape((-1,1))
     #
     if __storeState: selfA._setInternalState("Xn", Xa)