]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Minor documentation and code review corrections (5)
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Thu, 18 Nov 2021 07:32:46 +0000 (08:32 +0100)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Thu, 18 Nov 2021 07:32:46 +0000 (08:32 +0100)
Correct optionnal requirement

src/daComposant/daCore/NumericObjects.py

index 609ac9686f4d1842c417b379e95cd1b763708de6..b641e70b98307c9c8a8b95bce1fdcf852f5da2f5 100644 (file)
@@ -902,6 +902,7 @@ def c2ukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q):
         RI = R.getI()
     #
     __n = Xb.size
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         Xn = Xb
@@ -1131,6 +1132,7 @@ def cekf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q):
         RI = R.getI()
     #
     __n = Xb.size
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         Xn = Xb
@@ -1479,6 +1481,8 @@ def etkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q,
     #
     __n = Xb.size
     __m = selfA._parameters["NumberOfMembers"]
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
+    previousJMinimum = numpy.finfo(float).max
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         Xn = EnsembleOfBackgroundPerturbations( Xb, None, __m )
@@ -1492,8 +1496,6 @@ def etkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q,
     elif selfA._parameters["nextStep"]:
         Xn = selfA._getInternalState("Xn")
     #
-    previousJMinimum = numpy.finfo(float).max
-    #
     for step in range(duration-1):
         numpy.random.set_state(selfA._getInternalState("seed"))
         if hasattr(Y,"store"):
@@ -1834,6 +1836,7 @@ def exkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q):
         RI = R.getI()
     #
     __n = Xb.size
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         Xn = Xb
@@ -2027,6 +2030,8 @@ def ienkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="IEnKF12",
     #
     __n = Xb.size
     __m = selfA._parameters["NumberOfMembers"]
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
+    previousJMinimum = numpy.finfo(float).max
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         if hasattr(B,"asfullmatrix"): Pn = B.asfullmatrix(__n)
@@ -2042,8 +2047,6 @@ def ienkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="IEnKF12",
     elif selfA._parameters["nextStep"]:
         Xn = selfA._getInternalState("Xn")
     #
-    previousJMinimum = numpy.finfo(float).max
-    #
     for step in range(duration-1):
         numpy.random.set_state(selfA._getInternalState("seed"))
         if hasattr(Y,"store"):
@@ -2508,6 +2511,8 @@ def mlef(selfA, Xb, Y, U, HO, EM, CM, R, B, Q,
     #
     __n = Xb.size
     __m = selfA._parameters["NumberOfMembers"]
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
+    previousJMinimum = numpy.finfo(float).max
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         Xn = EnsembleOfBackgroundPerturbations( Xb, None, __m )
@@ -2521,8 +2526,6 @@ def mlef(selfA, Xb, Y, U, HO, EM, CM, R, B, Q,
     elif selfA._parameters["nextStep"]:
         Xn = selfA._getInternalState("Xn")
     #
-    previousJMinimum = numpy.finfo(float).max
-    #
     for step in range(duration-1):
         numpy.random.set_state(selfA._getInternalState("seed"))
         if hasattr(Y,"store"):
@@ -3135,6 +3138,8 @@ def senkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q,
     #
     __n = Xb.size
     __m = selfA._parameters["NumberOfMembers"]
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
+    previousJMinimum = numpy.finfo(float).max
     #
     if hasattr(R,"asfullmatrix"): Rn = R.asfullmatrix(__p)
     else:                         Rn = R
@@ -3150,8 +3155,6 @@ def senkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q,
     elif selfA._parameters["nextStep"]:
         Xn = selfA._getInternalState("Xn")
     #
-    previousJMinimum = numpy.finfo(float).max
-    #
     for step in range(duration-1):
         numpy.random.set_state(selfA._getInternalState("seed"))
         if hasattr(Y,"store"):
@@ -3839,6 +3842,7 @@ def stdkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q):
         RI = R.getI()
     #
     __n = Xb.size
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         Xn = Xb
@@ -4042,6 +4046,7 @@ def uskf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q):
         RI = R.getI()
     #
     __n = Xb.size
+    nbPreviousSteps  = len(selfA.StoredVariables["Analysis"])
     #
     if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
         Xn = Xb