]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Remove misused names in examples
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 19 Apr 2013 09:05:12 +0000 (11:05 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 19 Apr 2013 09:05:12 +0000 (11:05 +0200)
examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py
examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationOperator_H.py

index b189a7c1eb4b88768206c5a8cadcb73e680480f9..a1fadfcd0fdc72e9ec6cb6725550b7b892fed39b 100644 (file)
@@ -34,7 +34,7 @@ import os, numpy, time
 #
 # ==============================================================================
 #
-def FunctionH( XX ):
+def DirectOperator( XX ):
     """ Direct non-linear simulation operator """
     #
     # --------------------------------------> EXAMPLE TO BE REMOVED
@@ -62,8 +62,8 @@ def TangentHMatrix( X, increment = 0.01, centeredDF = False ):
             X_moins_dXi    = numpy.array( X.A1 )
             X_moins_dXi[i] = X[i] - dX[i]
             #
-            HX_plus_dXi  = FunctionH( X_plus_dXi )
-            HX_moins_dXi = FunctionH( X_moins_dXi )
+            HX_plus_dXi  = DirectOperator( X_plus_dXi )
+            HX_moins_dXi = DirectOperator( X_moins_dXi )
             #
             HX_Diff = ( HX_plus_dXi - HX_moins_dXi ) / (2.*dX[i])
             #
@@ -76,11 +76,11 @@ def TangentHMatrix( X, increment = 0.01, centeredDF = False ):
             X_plus_dXi    = numpy.array( X.A1 )
             X_plus_dXi[i] = X[i] + dX[i]
             #
-            HX_plus_dXi = FunctionH( X_plus_dXi )
+            HX_plus_dXi = DirectOperator( X_plus_dXi )
             #
             HX_plus_dX.append( HX_plus_dXi )
         #
-        HX = FunctionH( X )
+        HX = DirectOperator( X )
         #
         Jacobian = []
         for i in range( len(dX) ):
@@ -90,13 +90,13 @@ def TangentHMatrix( X, increment = 0.01, centeredDF = False ):
     #
     return Jacobian
 #
-def TangentH( X ):
+def TangentOperator( X ):
     """ Tangent operator """
     _X = numpy.asmatrix(X).flatten().T
     HtX = self.TangentHMatrix( _X ) * _X
     return HtX.A1
 #
-def AdjointH( (X, Y) ):
+def AdjointOperator( (X, Y) ):
     """ Ajoint operator """
     #
     Jacobian = TangentHMatrix( X, centeredDF = False )
@@ -116,6 +116,6 @@ if __name__ == "__main__":
     from Physical_data_and_covariance_matrices import True_state
     X0, noms = True_state()
  
-    FX = FunctionH( X0 )
+    FX = DirectOperator( X0 )
     print "FX =", FX
     print
index 4ff3b0947487b704d9bd21058691f8a1ca3f4f43..640bdd6174687fa87f4ae167c75192643c327fd0 100644 (file)
@@ -53,27 +53,27 @@ logging.info("ComputationFunctionNode: Found method is \'%s\'"%method)
 # Loading the H operator functions from external definitions
 # ----------------------------------------------------------
 logging.info("ComputationFunctionNode: Loading operator functions")
-FunctionH = Physical_simulation_functions.FunctionH
-TangentH  = Physical_simulation_functions.TangentH
-AdjointH  = Physical_simulation_functions.AdjointH
+DirectOperator = Physical_simulation_functions.DirectOperator
+TangentOperator  = Physical_simulation_functions.TangentOperator
+AdjointOperator  = Physical_simulation_functions.AdjointOperator
 #
 # Executing the possible computations
 # -----------------------------------
 if method == "Direct":
     logging.info("ComputationFunctionNode: Direct computation")
     Xcurrent = computation["inputValues"][0][0][0]
-    data = FunctionH(numpy.matrix( Xcurrent ).T)
+    data = DirectOperator(numpy.matrix( Xcurrent ).T)
 #
 if method == "Tangent":
     logging.info("ComputationFunctionNode: Tangent computation")
     Xcurrent = computation["inputValues"][0][0][0]
-    data = TangentH(numpy.matrix( Xcurrent ).T)
+    data = TangentOperator(numpy.matrix( Xcurrent ).T)
 #
 if method == "Adjoint":
     logging.info("ComputationFunctionNode: Adjoint computation")
     Xcurrent = computation["inputValues"][0][0][0]
     Ycurrent = computation["inputValues"][0][0][1]
-    data = AdjointH((numpy.matrix( Xcurrent ).T, numpy.matrix( Ycurrent ).T))
+    data = AdjointOperator((numpy.matrix( Xcurrent ).T, numpy.matrix( Ycurrent ).T))
 #
 # Formatting the output
 # ---------------------