Salome HOME
projects
/
modules
/
adao.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding user time measure
[modules/adao.git]
/
src
/
daComposant
/
daAlgorithms
/
GradientTest.py
diff --git
a/src/daComposant/daAlgorithms/GradientTest.py
b/src/daComposant/daAlgorithms/GradientTest.py
index 03a43520e25967b70381bb3ef2b9204b4a8091a1..81814c3f43b5ba42debfd64c763e6ac6156b7352 100644
(file)
--- a/
src/daComposant/daAlgorithms/GradientTest.py
+++ b/
src/daComposant/daAlgorithms/GradientTest.py
@@
-1,6
+1,6
@@
# -*- coding: utf-8 -*-
#
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2008-20
17
EDF R&D
+# Copyright (C) 2008-20
20
EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@
-100,14
+100,21
@@
class ElementaryAlgorithm(BasicObjects.Algorithm):
default = [],
typecast = tuple,
message = "Liste de calculs supplémentaires à stocker et/ou effectuer",
default = [],
typecast = tuple,
message = "Liste de calculs supplémentaires à stocker et/ou effectuer",
- listval = ["CurrentState", "Residu", "SimulatedObservationAtCurrentState"]
+ listval = [
+ "CurrentState",
+ "Residu",
+ "SimulatedObservationAtCurrentState",
+ ]
)
self.requireInputArguments(
mandatory= ("Xb", "HO"),
)
)
self.requireInputArguments(
mandatory= ("Xb", "HO"),
)
+ self.setAttributes(tags=(
+ "Checking",
+ ))
def run(self, Xb=None, Y=None, U=None, HO=None, EM=None, CM=None, R=None, B=None, Q=None, Parameters=None):
def run(self, Xb=None, Y=None, U=None, HO=None, EM=None, CM=None, R=None, B=None, Q=None, Parameters=None):
- self._pre_run(Parameters, Xb, Y, R, B, Q)
+ self._pre_run(Parameters, Xb, Y,
U, HO, EM, CM,
R, B, Q)
#
Hm = HO["Direct"].appliedTo
if self._parameters["ResiduFormula"] in ["Taylor", "TaylorOnNorm"]:
#
Hm = HO["Direct"].appliedTo
if self._parameters["ResiduFormula"] in ["Taylor", "TaylorOnNorm"]:
@@
-121,9
+128,9
@@
class ElementaryAlgorithm(BasicObjects.Algorithm):
FX = numpy.asmatrix(numpy.ravel( Hm( X ) )).T
NormeX = numpy.linalg.norm( X )
NormeFX = numpy.linalg.norm( FX )
FX = numpy.asmatrix(numpy.ravel( Hm( X ) )).T
NormeX = numpy.linalg.norm( X )
NormeFX = numpy.linalg.norm( FX )
- if
"CurrentState" in self._parameters["StoreSupplementaryCalculations"]
:
+ if
self._toStore("CurrentState")
:
self.StoredVariables["CurrentState"].store( numpy.ravel(Xn) )
self.StoredVariables["CurrentState"].store( numpy.ravel(Xn) )
- if
"SimulatedObservationAtCurrentState" in self._parameters["StoreSupplementaryCalculations"]
:
+ if
self._toStore("SimulatedObservationAtCurrentState")
:
self.StoredVariables["SimulatedObservationAtCurrentState"].store( numpy.ravel(FX) )
#
if len(self._parameters["InitialDirection"]) == 0:
self.StoredVariables["SimulatedObservationAtCurrentState"].store( numpy.ravel(FX) )
#
if len(self._parameters["InitialDirection"]) == 0:
@@
-237,9
+244,9
@@
class ElementaryAlgorithm(BasicObjects.Algorithm):
FX_plus_dX = Hm( X + dX )
FX_plus_dX = numpy.asmatrix(numpy.ravel( FX_plus_dX )).T
#
FX_plus_dX = Hm( X + dX )
FX_plus_dX = numpy.asmatrix(numpy.ravel( FX_plus_dX )).T
#
- if
"CurrentState" in self._parameters["StoreSupplementaryCalculations"]
:
+ if
self._toStore("CurrentState")
:
self.StoredVariables["CurrentState"].store( numpy.ravel(X + dX) )
self.StoredVariables["CurrentState"].store( numpy.ravel(X + dX) )
- if
"SimulatedObservationAtCurrentState" in self._parameters["StoreSupplementaryCalculations"]
:
+ if
self._toStore("SimulatedObservationAtCurrentState")
:
self.StoredVariables["SimulatedObservationAtCurrentState"].store( numpy.ravel(FX_plus_dX) )
#
NormedX = numpy.linalg.norm( dX )
self.StoredVariables["SimulatedObservationAtCurrentState"].store( numpy.ravel(FX_plus_dX) )
#
NormedX = numpy.linalg.norm( dX )
@@
-377,4
+384,4
@@
def dessiner(
# ==============================================================================
if __name__ == "__main__":
# ==============================================================================
if __name__ == "__main__":
- print('\n AUTODIAGNOSTIC
\n')
+ print('\n AUTODIAGNOSTIC\n')