From: Jean-Philippe ARGAUD Date: Sun, 31 Jan 2021 16:19:02 +0000 (+0100) Subject: Improvement of EnKF algorithm internals X-Git-Tag: V9_7_0b1~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a0e51689f8c1c889f6f7e4647ac1e2e54f5b4b5a;p=modules%2Fadao.git Improvement of EnKF algorithm internals --- diff --git a/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py b/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py index 9716d2c..a7e178e 100644 --- a/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py +++ b/src/daComposant/daAlgorithms/EnsembleKalmanFilter.py @@ -50,6 +50,8 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): "MLEF-T", "MLEF-B", "IEnKF-T", + "IEnKF-B", + "IEKF", ], ) self.defineRequiredParameter( @@ -204,6 +206,10 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): elif self._parameters["Minimizer"] in ["IEnKF-T", "IEnKF"]: NumericObjects.ienkf(self, Xb, Y, U, HO, EM, CM, R, B, Q, BnotT=False) # + elif self._parameters["Minimizer"] in ["IEnKF-B", "IEKF"]: + NumericObjects.ienkf(self, Xb, Y, U, HO, EM, CM, R, B, Q, BnotT=True) + # + #-------------------------- else: raise ValueError("Error in Minimizer name: %s"%self._parameters["Minimizer"]) # diff --git a/src/daComposant/daCore/NumericObjects.py b/src/daComposant/daCore/NumericObjects.py index 095a51c..1e97bf6 100644 --- a/src/daComposant/daCore/NumericObjects.py +++ b/src/daComposant/daCore/NumericObjects.py @@ -1594,6 +1594,10 @@ def ienkf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="IEnKF12", # A2 = EnsembleCenteredAnomalies( E2 ) # + if BnotT: + Ta = numpy.real(scipy.linalg.sqrtm(numpy.linalg.inv( mH ))) + A2 = numpy.sqrt(__m-1) * A2 @ Ta / _epsilon + # Xn = vx2 + A2 #-------------------------- else: