From: Pascale Noyret Date: Thu, 24 Jan 2008 13:17:15 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V1_14_OT_1_0~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df9ca5530045b1cc4780f00eec3af37a8c008470;p=tools%2Feficas.git *** empty log message *** --- diff --git a/Openturns/Open_Cata_IDM_V5.py b/Openturns/Open_Cata_IDM_V5.py new file mode 100644 index 00000000..38940769 --- /dev/null +++ b/Openturns/Open_Cata_IDM_V5.py @@ -0,0 +1,1266 @@ +# -*- coding: utf-8 -*- + +# -------------------------------------------------- +# debut entete +# -------------------------------------------------- + +import Accas +from Accas import * + +class loi ( ASSD ) : pass + + +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'OPENTURNS', + execmodul = None, + regles = ( AU_MOINS_UN ( 'STUDY' ), ), + ) # Fin JDC_CATA + +# -------------------------------------------------- +# fin entete +# -------------------------------------------------- + +# 3. Version d OPENTURNS ? + +#=========================================================== + + +#================================ +# 1. Definition des LOIS +#================================ + +# Nota : les variables de type OPER doivent etre en majuscules ! +DISTRIBUTION = OPER ( nom = "DISTRIBUTION", + sd_prod = loi, + op = 68, + fr = "Definitions des lois marginales utilisees par les variables d'entree", + + +#==== +# 2. Type de la loi de distribution +#==== + + Kind = SIMP ( statut = "o", typ = "TXM", + into = ( "Beta", + "Exponential", + "Gamma", + "Geometric", + "Gumbel", + "Histogram", + "Logistic", + "LogNormal", + "MultiNomial", + "Normal", + "TruncatedNormal", + "Poisson", + "Student", + "Triangular", + "Uniform", + "UserDefined", + "Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution." ), + +#==== +# 3. Definition des parametres selon le type de la loi +#==== + +# 3.1. ==> Loi beta + + BETA = BLOC ( condition = " Kind in ( 'Beta', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "RT", "MuSigma" ), + defaut = "RT", + fr = "Parametrage de la loi beta", + ang = "Beta distribution parameter set" + ), + + RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ", + + R = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre R de la loi", + ang = "R parameter" + ), + + # T > R + T = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre T de la loi | T > R", + ang = "T parameter | T > R" + ), + + ), # Fin BLOC RT_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre A de la loi", + ang = "A parameter" + ), + + # B > A + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre B de la loi | B > A", + ang = "B parameter | B > A" + ), + + ), # Fin BLOC BETA + +# 3.2. ==> Loi exponentielle + + EXPONENTIAL = BLOC ( condition = " Kind in ( 'Exponential', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda | Lambda > 0", + ang = "Lambda parameter | Lambda > 0" + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + ), # Fin BLOC EXPONENTIAL + +# 3.3. ==> Loi gamma + + GAMMA = BLOC ( condition = " Kind in ( 'Gamma', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "KLambda", "MuSigma" ), + defaut = "KLambda", + fr = "Parametrage de la loi gamma", + ang = "Gamma distribution parameter set" + ), + + KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ", + + K = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre K de la loi | K > 0", + ang = "K parameter | K > 0" + ), + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda de la loi | Lambda > 0", + ang = "Lambda parameter | Lambda > 0" + ), + + ), # Fin BLOC KLambda_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + defaut = 0.0, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + defaut = 1.0, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + + ), # Fin BLOC GAMMA + +# 3.5. ==> Loi geometrique + + GEOMETRIC = BLOC ( condition = " Kind in ( 'Geometric', ) ", + + P = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + val_max = 1., + fr = "Parametre P | 0 < P < 1", + ang = "P parameter | 0 < P < 1" + ), + + ), # Fin BLOC GEOMETRIC + +# 3.6. ==> Loi gumbel + + GUMBEL = BLOC ( condition = " Kind in ( 'Gumbel', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi gumbel", + ang = "Gumbel distribution parameter set" + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0" + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Beta de la loi", + ang = "Beta parameter" + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + ), # Fin BLOC GUMBEL + +# 3.7. ==> Loi histogramme + + HISTOGRAM = BLOC ( condition = " Kind in ( 'Histogram', ) ", + + Sup = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la distribution", + ang = "Upper bound" + ), + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = 'R', + max = '**' + ), + + ), # Fin BLOC HISTOGRAM + +# 3.8. ==> Loi lognormale + + LOGNORMAL = BLOC ( condition = " Kind in ( 'LogNormal', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ), + defaut = "MuSigmaLog", + fr = "Parametrage de la loi lognormale", + ang = "Lognormal distribution parameter set" + ), + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', 'MuSigmaOverMu' ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi | Mu > Gamma", + ang = "Mu parameter | Mu > Gamma" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ", + + MuLog = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu log de la loi", + ang = "Mu log parameter" + ), + + SigmaLog = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma log de la loi | SigmaLog > 0", + ang = "Sigma log parameter | SigmaLog > 0" + ), + + ), # Fin BLOC MuSigmaLog_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + ), # Fin BLOC LOGNORMAL + +# 3.9. ==> Loi logistique + + LOGISTIC = BLOC ( condition = " Kind in ( 'Logistic', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Alpha de la loi", + ang = "Alpha parameter" + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > = 0", + ang = "Beta parameter | Beta > = 0" + ), + + ), # Fin BLOC LOGISTIC + +# 3.10. ==> Loi multinomiale + + MULTINOMIAL = BLOC ( condition = " Kind in ( 'MultiNomial', ) ", + + N = SIMP ( statut = "o", + typ = "E", + max = 1, + fr = "Dimension de la loi", + ang = "DISTRIBUTION dimension" + ), + + # Il faut un vecteur P de taille N + Values = SIMP ( statut = 'o', + typ = 'R', + max = '**' + ), + + ), # Fin BLOC MULTINOMIAL + +# 3.11. ==> Loi normale + + NORMAL = BLOC ( condition = " Kind in ( 'Normal', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC NORMAL + +# 3.12. ==> Loi Poisson + + POISSON = BLOC ( condition = " Kind in ( 'Poisson', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda de la loi | Lambda > 0", + ang = "Lambda parameter | Lambda > 0" + ), + + ), # Fin BLOC POISSON + +# 3.13. ==> Loi student + + STUDENT = BLOC ( condition = " Kind in ( 'Student', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Nu = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 2., + fr = "Parametre Nu de la loi | V > = 2", + ang = "Nu parameter | V > = 2" + ), + + ), # Fin BLOC STUDENT + +# 3.14. ==> Loi triangulaire + + TRIANGULAR = BLOC ( condition = " Kind in ( 'Triangular', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < = M < = B", + ang = "Lower bound | A < = M < = B" + ), + + M = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Mode de la loi | A < = M < = B", + ang = "Mode | A < = M < = B" + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < = M < = B", + ang = "Upper bound | A < = M < = B" + ), + + ), # Fin BLOC TRIANGULAR + +# 3.15. ==> Loi normale tronquee + + TRUNCATEDNORMAL = BLOC ( condition = " Kind in ( 'TruncatedNormal', ) ", + + MuN = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + SigmaN = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre SigmaN de la loi | SigmaN > 0", + ang = "SigmaN parameter | SigmaN> 0" + ), + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < = B", + ang = "Lower bound | A < = B" + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < = B", + ang = "Upper bound | A < = B" + ), + + ), # Fin BLOC TRUNCATEDNORMAL + +# 3.16. ==> uniforme + + UNIFORM = BLOC ( condition = " Kind in ( 'Uniform', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < = B", + ang = "Lower bound | A < = B" + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < = B", + ang = "Upper bound | A < = B" + ), + + ), # Fin BLOC UNIFORM + +# 3.17. ==> Loi definie par l'utilisateur + + USERDEFINED = BLOC ( condition = " Kind in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = 'R', + max = '**' + ), + + ), # Fin BLOC USERDEFINED + +# 3.18. ==> Weibull + + WEIBULL = BLOC ( condition = " Kind in ( 'Weibull', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi weibull", + ang = "Weibull distribution parameter set" + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0" + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > 0", + ang = "Beta parameter | Beta > 0" + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + ), # Fin BLOC WEIBULL + +); # Fin OPER DISTRIBUTION + +#================================ +# 2. Definition du cas d'etude +#================================ +# Nota : les variables de type PROC doivent etre en majuscules ! +STUDY = PROC ( nom = "STUDY", + op = None, + docu = "", + fr = "Mise en donnee pour le fichier de configuration de OPENTURNS.", + ang = "Writes the configuration file for OPENTURNS.", + + +#===== +# 1. Le Type d'Analyse +#===== + + Analysis = SIMP ( statut = "o", + typ = "TXM", + into = ( "Reliability", "Simulation", "QuadraticCumul" ), + fr = "Type d'Analyse", + ang = "Analysis", + ), + +#===== +# 2. Pour la probabilite +# algorithme et mode choisis +#===== + + Reliability = BLOC ( condition = " Analysis in ( 'Reliability', ) ", + +# 2.1. ==> L'algorithme + + Algorithm = SIMP ( statut = "o", + typ = "TXM", + into = ( "FORM", "SORM" ), + fr = "Algorithme de fiabilite", + ang = "Reliability algorithm" + ), + +# 2.2. ==> La methode +# 2.2.1. ==> La methode + + Method = SIMP ( statut = "o", + typ = "TXM", + into = ( "Cobyla", "AbdoRackwitz" ), + fr = "Methode d'optimisation.", + ang = "Optimisation method." + ), + +# 2.2.1. ==> Tirage d'importance + + ImportanceSampling = SIMP ( statut = "o", + typ = "TXM", + into = ( "yes", "no" ), + defaut = "no", + fr = "Tirage d'importance autour du point de conception", + ang = "Importance sampling around design point" + ), + +### +### Il faut definir ces 3 elements pour ImportanceSampling sans collisioner ceux de Simulation +### + ImportanceSamplingSettings = BLOC ( condition = "ImportanceSampling in ( 'yes', )", +# 3.1.2. ==> Nombre d... + + ImportanceSampling_BlockSize = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + defaut = 1, + fr = "Nombre maximum ...", + ang = "Maximum number of ..." + ), + +# 3.2.3. ==> ... maximum ... + + ImportanceSampling_MaximumCoefficientOfVariation = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = " maximum ...", + ang = "Absolute maximum ...." + ), + +# 3.2.4. ==> Maximum d'iterations + + ImportanceSampling_MaximumOuterSampling = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + fr = "Maximum d iterations externes.", + ang = "Maximum outer Sampling value." + ), + + ), # Fin BLOC ImportanceSamplingSettings + + +# 2.2.2. ==> Regles + + regles = ( EXCLUS ( "MaximumAbsoluteError", "RelativeAbsoluteError" ), ), + +# 2.2.3. ==> Nombre d'iterations + + MaximumIterationsNumber = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + fr = "Nombre maximum d iterations.", + ang = "Maximum number of iterations." + ), + +# 2.2.4. ==> Erreur maximum absolue + + MaximumAbsoluteError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Distance maximum absolue entre 2 iterations successifs.", + ang = "Absolute maximum distance between 2 successive iterates." + ), + +# 2.2.5. ==> Erreur maximum relative + + RelativeAbsoluteError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Distance maximum relative entre 2 iterations successifs.", + ang = "Relative maximum distance between 2 successive iterates." + ), + +# 2.2.6. ==> Ecart de contrainte absolu + + MaximumConstraintError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Valeur maximum absolue de la fonction \ + moins la valeur du niveau.", + ang = "Maximum absolute value of the constraint function \ + minus the level value." + ), + +# 2.2.7. ==> Ecart de residu absolu + + MaximumResidualError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Maximum orthogonality error.", + ang = "Maximum orthogonality error." + ), + + ), # Fin BLOC Reliability + +#===== +# 3. Pour la probabilite +# seuil par simulation : +# algorithme choisi +#===== + + Simulation = BLOC ( condition = " Analysis in ( 'Simulation', ) ", + +# 3.1. ==> L'algorithme + + Algorithm = SIMP ( statut = "o", + typ = "TXM", + into = ( "MonteCarlo", "LHS", "DirectionalSampling" ), + fr = "Algorithme de simulation", + ang = "Simulation algorithm" + ), + +# 3.1.2. ==> Nombre d... + + BlockSize = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + defaut = 1, + fr = "Nombre maximum ...", + ang = "Maximum number of ..." + ), + +# 3.2.3. ==> ... maximum ... + + MaximumCoefficientOfVariation = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = " maximum ...", + ang = "Absolute maximum ...." + ), + +# 3.2.4. ==> Maximum d'iterations + + MaximumOuterSamplingType = SIMP ( statut = "o", + typ = "TXM", + max = 1, + defaut = "UserDefined", + into = ( "Wilks", "UserDefined" ), + fr = "Mode definition du maximum d iterations", + ang = "Definition for the maximum iterations number" + ), + + MaximumOuterSamplingType_Wilks = BLOC ( condition = " MaximumOuterSamplingType in ( 'Wilks', ) ", + + Wilks_Alpha = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + val_max = 1.0, + defaut = 0.95, + fr = "Ordre du quantile.", + ang = "Order of the quantile." + ), + + Wilks_Beta = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + val_max = 1.0, + defaut = 0.90, + fr = "Confiance ...", + ang = "Confidence ..." + ), + + Wilks_I = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 0, + defaut = 0, + fr = " ...", + ang = "Rank ..." + ), + + ), # Fin BLOC Wilks + + MaximumOuterSamplingType_UserDefined = BLOC ( condition = " MaximumOuterSamplingType in ( 'UserDefined', ) ", + + MaximumOuterSampling = SIMP ( statut = "o", + typ = "I", + max = 1, + val_min = 1, + defaut = 250, + fr = "Maximum d iterations externes.", + ang = "Maximum outer Sampling value." + ), + + ), # Fin BLOC UserDefined + +# 3.2.6. ==> Root strategy + + DirectionalSampling = BLOC ( condition = " Algorithm in ( 'DirectionalSampling', ) ", + + RootStrategy = SIMP ( statut = "f", + typ = "TXM", + max = 1, + defaut = "SafeAndSlow", + into = ( "RiskyAndFast", "MediumSafe", "SafeAndSlow" ), + fr = "La strategie de recherche des racines", + ang = "Root strategy." + ), + + SamplingStrategy = SIMP ( statut = "f", + typ = "TXM", + max = 1, + defaut = "SafeAndSlow", + into = ( "OrthogonalDirection", "RandomDirection" ), + fr = "La strategie d'echantillonage", + ang = "Sampling strategy." + ), + + Solver = SIMP ( statut = "o", + typ = "TXM", + max = 1, + defaut = "Brent", + into = ( "Bisection", "Brent", "Secant" ), + fr = "Solver.", + ang = "Solver." + ), + + SolverSettings = BLOC ( condition = " Solver in ( 'Bisection', 'Brent', 'Secant' ) ", + + regles = ( ENSEMBLE ( 'AbsoluteError', 'RelativeError', 'maximumFunctionEvaluation' ), ), + + AbsoluteError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = " Absolute error ...", + ang = "Absolute error ..." + ), + + RelativeError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = " Relative error ...", + ang = "Relative error ..." + ), + + MaximumFunctionEvaluation = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + fr = " maximum Function Evaluation ...", + ang = "maximum Function Evaluation ..." + ), + + ), # Fin BLOC SolverSettings + + ), # Fin BLOC DirectionalSampling + +# 3.2.7. ==> Impression des intervalles de confiance + + ConfidenceIntervalProbability = SIMP ( statut = "f", + typ = 'R', + max = '**', + val_min = 0., + val_max = 1., + fr = "Liste des intervalles de confiance voulus", + ang = "Confidence intervals" + ), + + ), # Fin BLOC Simulation + +# QuadraticCumul = BLOC ( condition = " Analysis in ( 'QuadraticCumul', ) ", + +# ), # Fin BLOC QuadraticCumul + +#===== +# 4. Pour la probabilite evenement +#===== + + Event = BLOC ( condition = " Analysis in ( 'Reliability', 'Simulation' ) ", + + Threshold = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Le seuil de defaillance.", + ang = "Failure threshold." + ), + + ComparisonOperator = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "Less", "LessOrEqual", "Equal", "GreaterOrEqual", "Greater" ), + fr = "Que faut-il ne pas depasser : un maximum ou un minimum.", + ang = "What is the failure threshold : maximum or minimum." + ), + + ), # Fin BLOC Event + + + RandomGenerator = BLOC ( condition = " Analysis in ( 'Reliability', 'Simulation' ) ", + + SeedToBeSet = SIMP ( statut = "o", + typ = 'TXM', + into = ( 'yes', 'no' ), + defaut = 'no', + max = 1, + fr = "La racine du generateur aleatoire doit-elle etre positionnee ?", + ang = "Does the random generator seed need to be set ?" + ), + + SeedSettings = BLOC ( condition = " SeedToBeSet in ( 'yes', ) ", + + RandomGeneratorSeed = SIMP ( statut = "o", + typ = "I", + max = 1, + fr = "Racine du generateur aleatoire", + ang = "Random generator seed" + ), + + ), # Fin BLOC SeedSettings + + ), # Fin BLOC RandomGenerator + + +#==== +# 5. Definition des parametres +#==== + + Variables = FACT ( statut = "o", + min = 1, + max = "**", + +# 5.1. ==> Nom de la variable + + Name = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Nom de la variable, identique au nom dans le solver.", + ang = "Name of the variable, identical to the name in solver." + ), + + Type = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "in", "out", ), + defaut = "in", + fr = "variable d'entree ou de sortie du solver", + ang = "Input or Output variable", + ), + + Unit = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Unite", + ang = "Unit", + ), + + Comment = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Commentaire", + ang = "Comment", + ), + + Regexp = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Expression reguliere", + ang = "Regular expression", + ), + + Format = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Format d'ecriture", + ang = "Format", + ), + +# 5.2. ==> Variable d'entree +# 5.2.1. ==> Loi de distribution + + InputVariable = BLOC ( condition = " Type in ( 'in', ) ", + + MarginalDistribution = SIMP ( statut = "o", + typ = ( loi, ), + max = 1, + fr = "Choix de la loi marginale", + ang = "1D marginal distribution." + ), + +# 5.2.2. ==> Parametres de calcul + +# 5.2.2.1. ==> Quand on cherche le point de conception, on peut preferer le depart de l'algorithme. +# Si on ne le fait pas, le programme prendra la valeur mediane. + + PhysicalStartingPoint = SIMP ( statut = "f", + typ = "R", + max = 1, + fr = "Point de demarrage de l'algorithme iteratif", + ang = "Initial point for iterative process." + ), + +# 5.2.2.2. ==> Mode d'obtention du gradient par rapport au parametre + + Gradient = SIMP ( statut = "f", + typ = "TXM", + max = 1, + into = ( "OUI", "NON" ), + defaut = "NON", + fr = "ASTER calcule directement le gradient.", + ang = "ASTER computes the gradient for this parameter." + ), + + GradientProvided = BLOC ( condition = " GRADIENT in ( 'NON', ) ", + + Increment = SIMP ( statut = "f", + typ = "R", + max = 1, + fr = "Increment dans la direction.", + ang = "Direction increment." + ), + ), # Fin BLOC GradientProvided + + ), # Fin BLOC InputVariable + + ), # Fin FACT Variables + +#==== +# 6. La fonction +#==== + + + PhysicalSolver = SIMP ( statut = "o", + typ = "TXM", + max = 1, + #into = ( "Code_Aster", "Code_Saturne", "User_defined" ), + fr = "Nom du solveur de calcul", + ang = "Solver name" + ), + + WrapperPath = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "chemin d acces au wrapper", + ang = "wrapper library path" + ), + + FunctionName = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Nom de la fonction dans le wrapper", + ang = "Function's name in wrapper" + ), + + GradientName = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du gradient dans le wrapper", + ang = "gradient's name in wrapper" + ), + + HessianName = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du hessian dans le wrapper", + ang = "hessian's name in wrapper" + ), + + WrapCouplingMode = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "static-link", "dynamic-link", "fork", ), + fr = "mode de couplage du solver", + ang = "Solver coupling mode" + ), + + DTDDirectory = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "repertoire de la DTD", + ang = "DTD directory" + ), + + Fork = BLOC ( condition = " WrapCouplingMode in ( 'fork', ) ", + + Command = SIMP ( statut = "o", + max = 1, + typ = "TXM", + fr = "Chemin du solver", + ang = "solver path" + ), + ), # Fin BLOC Fork + + State = SIMP ( statut = "f", + typ = "TXM", + max = 1, + into = ( "shared", "specific" ), + fr = "partage de l etat interne entre les fonctions", + ang = "internal state sharing" + ), + + InDataTransfer = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "files", "pipe", "arguments", "socket", "CORBA", ), + fr = "mode de transfert des donnees d entree", + ang = "input transfering mode" + ), + + OutDataTransfer = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "files", "pipe", "arguments", "socket", "CORBA", ), + fr = "mode de transfert des donnees de sortie", + ang = "output transfering mode" + ), + + + +#==== +# 7. Informations sur les fichiers d'echange +#==== + + Files = FACT ( statut = "f", + min = 1, + max = "**", + + Id = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Identificateur du fichier", + ang = "File id" + ), + + Type = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "in", "out", ), + fr = "Fichier d entree ou de sortie du solveur ?", + ang = "Input or Output file ?" + ), + + Name = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du fichier", + ang = "file name" + ), + + Path = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "chemin du fichier", + ang = "path file " + ), + + Subst = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "liste de variables", + ang = "list" + ), + + ), # Fin FACT Files + +); # Fin PROC STUDY + +RESULT = PROC ( nom = "RESULT", + op = None, + docu = "", + fr = "Liste des resultats a produire", + ang = "List of results to write out", + + GeneralizedReliabilityIndex = SIMP ( statut = "o", + typ = "TXM", + into = ( "yes", "no" ), + defaut = "no", + max = 1, + fr = "Index de fiabilite generalise", + ang = "Generalized reliability index" + ), + +); # Fin PROC Result + diff --git a/Openturns/Open_Cata_IDM_V6.py b/Openturns/Open_Cata_IDM_V6.py new file mode 100644 index 00000000..fde985de --- /dev/null +++ b/Openturns/Open_Cata_IDM_V6.py @@ -0,0 +1,1202 @@ +# -*- coding: utf-8 -*- + +# -------------------------------------------------- +# debut entete +# -------------------------------------------------- + +import Accas +from Accas import * + +class loi ( ASSD ) : pass + + +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'OPENTURNS', + execmodul = None, + regles = ( AU_MOINS_UN ( 'STUDY' ), ), + ) # Fin JDC_CATA + +# -------------------------------------------------- +# fin entete +# -------------------------------------------------- + +# 3. Version d OPENTURNS ? + +#=========================================================== + + +#================================ +# 1. Definition des LOIS +#================================ + +# Nota : les variables de type OPER doivent etre en majuscules ! +DISTRIBUTION = OPER ( nom = "DISTRIBUTION", + sd_prod = loi, + op = 68, + fr = "Definitions des lois marginales utilisees par les variables d'entree", + + +#==== +# 2. Type de la loi de distribution +#==== + + Kind = SIMP ( statut = "o", typ = "TXM", + into = ( "Beta", + "Exponential", + "Gamma", + "Geometric", + "Gumbel", + "Histogram", + "Logistic", + "LogNormal", + "MultiNomial", + "Normal", + "TruncatedNormal", + "Poisson", + "Student", + "Triangular", + "Uniform", + "UserDefined", + "Weibull", + ), + fr = "Choix du type de la loi marginale", + ang = "1D marginal distribution." ), + +#==== +# 3. Definition des parametres selon le type de la loi +#==== + +# 3.1. ==> Loi beta + + BETA = BLOC ( condition = " Kind in ( 'Beta', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "RT", "MuSigma" ), + defaut = "RT", + fr = "Parametrage de la loi beta", + ang = "Beta distribution parameter set" + ), + + RT_Parameters = BLOC ( condition = " Settings in ( 'RT', ) ", + + R = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre R de la loi", + ang = "R parameter" + ), + + # T > R + T = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre T de la loi | T > R", + ang = "T parameter | T > R" + ), + + ), # Fin BLOC RT_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre A de la loi", + ang = "A parameter" + ), + + # B > A + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre B de la loi | B > A", + ang = "B parameter | B > A" + ), + + ), # Fin BLOC BETA + +# 3.2. ==> Loi exponentielle + + EXPONENTIAL = BLOC ( condition = " Kind in ( 'Exponential', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda | Lambda > 0", + ang = "Lambda parameter | Lambda > 0" + ), + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + ), # Fin BLOC EXPONENTIAL + +# 3.3. ==> Loi gamma + + GAMMA = BLOC ( condition = " Kind in ( 'Gamma', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "KLambda", "MuSigma" ), + defaut = "KLambda", + fr = "Parametrage de la loi gamma", + ang = "Gamma distribution parameter set" + ), + + KLambda_Parameters = BLOC ( condition = " Settings in ( 'KLambda', ) ", + + K = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre K de la loi | K > 0", + ang = "K parameter | K > 0" + ), + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda de la loi | Lambda > 0", + ang = "Lambda parameter | Lambda > 0" + ), + + ), # Fin BLOC KLambda_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + defaut = 0.0, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + defaut = 1.0, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + + ), # Fin BLOC GAMMA + +# 3.5. ==> Loi geometrique + + GEOMETRIC = BLOC ( condition = " Kind in ( 'Geometric', ) ", + + P = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + val_max = 1., + fr = "Parametre P | 0 < P < 1", + ang = "P parameter | 0 < P < 1" + ), + + ), # Fin BLOC GEOMETRIC + +# 3.6. ==> Loi gumbel + + GUMBEL = BLOC ( condition = " Kind in ( 'Gumbel', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi gumbel", + ang = "Gumbel distribution parameter set" + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0" + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Beta de la loi", + ang = "Beta parameter" + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + ), # Fin BLOC GUMBEL + +# 3.7. ==> Loi histogramme + + HISTOGRAM = BLOC ( condition = " Kind in ( 'Histogram', ) ", + + Sup = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la distribution", + ang = "Upper bound" + ), + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = 'R', + max = '**' + ), + + ), # Fin BLOC HISTOGRAM + +# 3.8. ==> Loi lognormale + + LOGNORMAL = BLOC ( condition = " Kind in ( 'LogNormal', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "MuSigmaLog", "MuSigma", "MuSigmaOverMu" ), + defaut = "MuSigmaLog", + fr = "Parametrage de la loi lognormale", + ang = "Lognormal distribution parameter set" + ), + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', 'MuSigmaOverMu' ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi | Mu > Gamma", + ang = "Mu parameter | Mu > Gamma" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + MuSigmaLog_Parameters = BLOC ( condition = " Settings in ( 'MuSigmaLog', ) ", + + MuLog = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu log de la loi", + ang = "Mu log parameter" + ), + + SigmaLog = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma log de la loi | SigmaLog > 0", + ang = "Sigma log parameter | SigmaLog > 0" + ), + + ), # Fin BLOC MuSigmaLog_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + ), # Fin BLOC LOGNORMAL + +# 3.9. ==> Loi logistique + + LOGISTIC = BLOC ( condition = " Kind in ( 'Logistic', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Alpha de la loi", + ang = "Alpha parameter" + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > = 0", + ang = "Beta parameter | Beta > = 0" + ), + + ), # Fin BLOC LOGISTIC + +# 3.10. ==> Loi multinomiale + + MULTINOMIAL = BLOC ( condition = " Kind in ( 'MultiNomial', ) ", + + N = SIMP ( statut = "o", + typ = "E", + max = 1, + fr = "Dimension de la loi", + ang = "DISTRIBUTION dimension" + ), + + # Il faut un vecteur P de taille N + Values = SIMP ( statut = 'o', + typ = 'R', + max = '**' + ), + + ), # Fin BLOC MULTINOMIAL + +# 3.11. ==> Loi normale + + NORMAL = BLOC ( condition = " Kind in ( 'Normal', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC NORMAL + +# 3.12. ==> Loi Poisson + + POISSON = BLOC ( condition = " Kind in ( 'Poisson', ) ", + + Lambda = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Lambda de la loi | Lambda > 0", + ang = "Lambda parameter | Lambda > 0" + ), + + ), # Fin BLOC POISSON + +# 3.13. ==> Loi student + + STUDENT = BLOC ( condition = " Kind in ( 'Student', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Nu = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 2., + fr = "Parametre Nu de la loi | V > = 2", + ang = "Nu parameter | V > = 2" + ), + + ), # Fin BLOC STUDENT + +# 3.14. ==> Loi triangulaire + + TRIANGULAR = BLOC ( condition = " Kind in ( 'Triangular', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < = M < = B", + ang = "Lower bound | A < = M < = B" + ), + + M = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Mode de la loi | A < = M < = B", + ang = "Mode | A < = M < = B" + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < = M < = B", + ang = "Upper bound | A < = M < = B" + ), + + ), # Fin BLOC TRIANGULAR + +# 3.15. ==> Loi normale tronquee + + TRUNCATEDNORMAL = BLOC ( condition = " Kind in ( 'TruncatedNormal', ) ", + + MuN = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + SigmaN = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre SigmaN de la loi | SigmaN > 0", + ang = "SigmaN parameter | SigmaN> 0" + ), + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < = B", + ang = "Lower bound | A < = B" + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < = B", + ang = "Upper bound | A < = B" + ), + + ), # Fin BLOC TRUNCATEDNORMAL + +# 3.16. ==> uniforme + + UNIFORM = BLOC ( condition = " Kind in ( 'Uniform', ) ", + + A = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne inferieure de la loi | A < = B", + ang = "Lower bound | A < = B" + ), + + B = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Borne superieure de la loi | A < = B", + ang = "Upper bound | A < = B" + ), + + ), # Fin BLOC UNIFORM + +# 3.17. ==> Loi definie par l'utilisateur + + USERDEFINED = BLOC ( condition = " Kind in ( 'UserDefined', ) ", + + # Il faut definir une collection de couples ( x,p ) + Values = SIMP ( statut = 'o', + typ = 'R', + max = '**' + ), + + ), # Fin BLOC USERDEFINED + +# 3.18. ==> Weibull + + WEIBULL = BLOC ( condition = " Kind in ( 'Weibull', ) ", + + Settings = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "AlphaBeta", "MuSigma" ), + defaut = "AlphaBeta", + fr = "Parametrage de la loi weibull", + ang = "Weibull distribution parameter set" + ), + + AlphaBeta_Parameters = BLOC ( condition = " Settings in ( 'AlphaBeta', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Alpha de la loi | Alpha > 0", + ang = "Alpha parameter | Alpha > 0" + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Beta de la loi | Beta > 0", + ang = "Beta parameter | Beta > 0" + ), + + ), # Fin BLOC AlphaBeta_Parameters + + + MuSigma_Parameters = BLOC ( condition = " Settings in ( 'MuSigma', ) ", + + Mu = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Mu de la loi", + ang = "Mu parameter" + ), + + Sigma = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0., + fr = "Parametre Sigma de la loi | Sigma > 0", + ang = "Sigma parameter | Sigma > 0" + ), + + ), # Fin BLOC MuSigma_Parameters + + Gamma = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Parametre Gamma", + ang = "Gamma parameter" + ), + + ), # Fin BLOC WEIBULL + +); # Fin OPER DISTRIBUTION + +#================================ +# 2. Definition du cas d'etude +#================================ +# Nota : les variables de type PROC doivent etre en majuscules ! +STUDY = PROC ( nom = "STUDY", + op = None, + docu = "", + fr = "Mise en donnee pour le fichier de configuration de OPENTURNS.", + ang = "Writes the configuration file for OPENTURNS.", + + +#===== +# 1. Le Type d'Analyse +#===== + + Analysis = SIMP ( statut = "o", + typ = "TXM", + into = ( "Reliability", "Simulation", "QuadraticCumul" ), + fr = "Type d'Analyse", + ang = "Analysis", + ), + +#===== +# 2. Pour la probabilite +# algorithme et mode choisis +#===== + + Reliability = BLOC ( condition = " Analysis in ( 'Reliability', ) ", + +# 2.1. ==> L'algorithme + + Algorithm = SIMP ( statut = "o", + typ = "TXM", + into = ( "FORM", "SORM" ), + fr = "Algorithme de fiabilite", + ang = "Reliability algorithm" + ), + +# 2.2. ==> La methode +# 2.2.1. ==> La methode + + Method = SIMP ( statut = "o", + typ = "TXM", + into = ( "Cobyla", "AbdoRackwitz" ), + fr = "Methode d'optimisation.", + ang = "Optimisation method." + ), + +# 2.2.2. ==> Regles + + regles = ( EXCLUS ( "MaximumAbsoluteError", "RelativeAbsoluteError" ), ), + +# 2.2.3. ==> Nombre d'iterations + + MaximumIterationsNumber = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + fr = "Nombre maximum d iterations.", + ang = "Maximum number of iterations." + ), + +# 2.2.4. ==> Erreur maximum absolue + + MaximumAbsoluteError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Distance maximum absolue entre 2 iterations successifs.", + ang = "Absolute maximum distance between 2 successive iterates." + ), + +# 2.2.5. ==> Erreur maximum relative + + RelativeAbsoluteError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Distance maximum relative entre 2 iterations successifs.", + ang = "Relative maximum distance between 2 successive iterates." + ), + +# 2.2.6. ==> Ecart de contrainte absolu + + MaximumConstraintError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Valeur maximum absolue de la fonction \ + moins la valeur du niveau.", + ang = "Maximum absolute value of the constraint function \ + minus the level value." + ), + +# 2.2.7. ==> Ecart de residu absolu + + MaximumResidualError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = "Maximum orthogonality error.", + ang = "Maximum orthogonality error." + ), + + ), # Fin BLOC Reliability + +#===== +# 3. Pour la probabilite +# seuil par simulation : +# algorithme choisi +#===== + + Simulation = BLOC ( condition = " Analysis in ( 'Simulation', ) ", + +# 3.1. ==> L'algorithme + + Algorithm = SIMP ( statut = "o", + typ = "TXM", + into = ( "MonteCarlo", "LHS", "DirectionalSampling" ), + fr = "Algorithme de simulation", + ang = "Simulation algorithm" + ), + +# 3.1.2. ==> Nombre d... + + BlockSize = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + defaut = 1, + fr = "Nombre maximum ...", + ang = "Maximum number of ..." + ), + +# 3.2.3. ==> ... maximum ... + + MaximumCoefficientOfVariation = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = " maximum ...", + ang = "Absolute maximum ...." + ), + +# 3.2.4. ==> Maximum d'iterations + + MaximumOuterSamplingType = SIMP ( statut = "f", + typ = "TXM", + max = 1, + defaut = "UserDefined", + into = ( "Wilks", "UserDefined" ), + fr = "Mode definition du maximum d iterations", + ang = "Maximum iterations number" + ), + + Wilks = BLOC ( condition = " MaximumOuterSamplingType in ( 'Wilks', ) ", + + Alpha = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0.0, + val_max = 1.0, + fr = "Ordre du quantile.", + ang = "Order of the quantile." + ), + + Beta = SIMP ( statut = "o", + typ = "R", + max = 1, + val_min = 0.0, + val_max = 1.0, + fr = "Confiance ...", + ang = "Confidence ..." + ), + + I = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 0, + defaut = 0, + fr = " ...", + ang = "Rank ..." + ), + + ), # Fin BLOC Wilks + + UserDefined = BLOC ( condition = " MaximumOuterSamplingType in ( 'UserDefined', ) ", + + MaximumOuterSampling = SIMP ( statut = "o", + typ = "I", + max = 1, + val_min = 1, + fr = "Maximum d iterations externes.", + ang = "Maximum outer Sampling value." + ), + + ), # Fin BLOC UserDefined + +# 3.2.6. ==> Root strategy + + DirectionalSampling = BLOC ( condition = " Algorithm in ( 'DirectionalSampling', ) ", + + RootStrategyImplementation = SIMP ( statut = "f", + typ = "TXM", + max = 1, + defaut = "SafeAndSlow", + into = ( "RiskyAndFast", "MediumSafe", "SafeAndSlow" ), + fr = "RootStrategyImplementation.", + ang = "RootStrategyImplementation." + ), + + SolverImplementation = SIMP ( statut = "f", + typ = "TXM", + max = 1, + defaut = "Bisection", + into = ( "Bisection", "Brent", "Secant" ), + fr = "SolverImplementation.", + ang = "SolverImplementation." + ), + + SolverImplementationg = BLOC ( condition = " SolverImplementation in ( 'Bisection', 'Brent', 'Secant' ) ", + + regles = ( ENSEMBLE ( 'AbsoluteError', 'RelativeError', 'maximumFunctionEvaluation' ), ), + + AbsoluteError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = " Absolute error ...", + ang = "Absolute error ..." + ), + + RelativeError = SIMP ( statut = "f", + typ = "R", + max = 1, + val_min = 0.0, + fr = " Relative error ...", + ang = "Relative error ..." + ), + + MaximumFunctionEvaluation = SIMP ( statut = "f", + typ = "I", + max = 1, + val_min = 1, + fr = " maximum Function Evaluation ...", + ang = "maximum Function Evaluation ..." + ), + + ), # Fin BLOC SolverImplementationg + + ), # Fin BLOC DirectionalSampling + +# 3.2.7. ==> Impression des intervalles de confiance + + ConfidenceIntervalProbability = SIMP ( statut = "f", + typ = 'R', + max = '**', + val_min = 0., + val_max = 1., + fr = "Liste des intervalles de confiance voulus", + ang = "Confidence intervals" + ), + + ), # Fin BLOC Simulation + +#===== +# 4. Pour la probabilite evenement +#===== + + Event = BLOC ( condition = " Analysis in ( 'Reliability', 'Simulation' ) ", + + Threshold = SIMP ( statut = "o", + typ = "R", + max = 1, + fr = "Le seuil de defaillance.", + ang = "Failure threshold." + ), + + ComparisonOperator = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "Less", "LessOrEqual", "Equal", "GreaterOrEqual", "Greater" ), + fr = "Que faut-il ne pas depasser : un maximum ou un minimum.", + ang = "What is the failure threshold : maximum or minimum." + ), + + ), # Fin BLOC Event + + + RandomGenerator = BLOC ( condition = " Analysis in ( 'Reliability', 'Simulation' ) ", + + SeedToBeSet = SIMP ( statut = "o", + typ = 'TXM', + into = ( 'yes', 'no' ), + defaut = 'no', + max = 1, + fr = "La racine du generateur aleatoire doit-elle etre positionnee ?", + ang = "Does the random generator seed need to be set ?" + ), + + SeedSettings = BLOC ( condition = " SeedToBeSet in ( 'yes', ) ", + + RandomGeneratorSeed = SIMP ( statut = "o", + typ = "I", + max = 1, + fr = "Racine du generateur aleatoire", + ang = "Random generator seed" + ), + + ), # Fin BLOC SeedSettings + + ), # Fin BLOC RandomGenerator + + +#==== +# 5. Definition des parametres +#==== + + Variables = FACT ( statut = "o", + min = 1, + max = "**", + +# 5.1. ==> Nom de la variable + + Name = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Nom de la variable, identique au nom dans le solver.", + ang = "Name of the variable, identical to the name in solver." + ), + + Type = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "in", "out", ), + defaut = "in", + fr = "variable d'entree ou de sortie du solver", + ang = "Input or Output variable", + ), + + Unit = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Unite", + ang = "Unit", + ), + + Comment = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Commentaire", + ang = "Comment", + ), + + Regexp = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Expression reguliere", + ang = "Regular expression", + ), + + Format = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Format d'ecriture", + ang = "Format", + ), + +# 5.2. ==> Variable d'entree +# 5.2.1. ==> Loi de distribution + + InputVariable = BLOC ( condition = " Type in ( 'in', ) ", + + MarginalDistribution = SIMP ( statut = "o", + typ = ( loi, ), + max = 1, + fr = "Choix de la loi marginale", + ang = "1D marginal distribution." + ), + +# 5.2.2. ==> Parametres de calcul + +# 5.2.2.1. ==> Quand on cherche le point de conception, on peut preferer le depart de l'algorithme. +# Si on ne le fait pas, le programme prendra la valeur mediane. + + PhysicalStartingPoint = SIMP ( statut = "f", + typ = "R", + max = 1, + fr = "Point de demarrage de l'algorithme iteratif", + ang = "Initial point for iterative process." + ), + +# 5.2.2.2. ==> Mode d'obtention du gradient par rapport au parametre + + Gradient = SIMP ( statut = "f", + typ = "TXM", + max = 1, + into = ( "OUI", "NON" ), + defaut = "NON", + fr = "ASTER calcule directement le gradient.", + ang = "ASTER computes the gradient for this parameter." + ), + + GradientProvided = BLOC ( condition = " GRADIENT in ( 'NON', ) ", + + Increment = SIMP ( statut = "f", + typ = "R", + max = 1, + fr = "Increment dans la direction.", + ang = "Direction increment." + ), + ), # Fin BLOC GradientProvided + + ), # Fin BLOC InputVariable + + ), # Fin FACT Variables + +#==== +# 6. La fonction +#==== + + + Solver = SIMP ( statut = "o", + typ = "TXM", + max = 1, + #into = ( "Code_Aster", "Code_Saturne", "User_defined" ), + fr = "Nom du solveur de calcul", + ang = "Solver name" + ), + + WrapperPath = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "chemin d acces au wrapper", + ang = "wrapper library path" + ), + + FunctionName = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Nom de la fonction dans le wrapper", + ang = "Function's name in wrapper" + ), + + GradientName = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du gradient dans le wrapper", + ang = "gradient's name in wrapper" + ), + + HessianName = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du hessian dans le wrapper", + ang = "hessian's name in wrapper" + ), + + WrapCouplingMode = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "static-link", "dynamic-link", "fork", ), + fr = "mode de couplage du solver", + ang = "Solver coupling mode" + ), + + DTDDirectory = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "repertoire de la DTD", + ang = "DTD directory" + ), + + Fork = BLOC ( condition = " WrapCouplingMode in ( 'fork', ) ", + + Command = SIMP ( statut = "o", + max = 1, + typ = "TXM", + fr = "Chemin du solver", + ang = "solver path" + ), + ), # Fin BLOC Fork + + State = SIMP ( statut = "f", + typ = "TXM", + max = 1, + into = ( "shared", "specific" ), + fr = "partage de l etat interne entre les fonctions", + ang = "internal state sharing" + ), + + InDataTransfer = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "files", "pipe", "arguments", "socket", "CORBA", ), + fr = "mode de transfert des donnees d entree", + ang = "input transfering mode" + ), + + OutDataTransfer = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "files", "pipe", "arguments", "socket", "CORBA", ), + fr = "mode de transfert des donnees de sortie", + ang = "output transfering mode" + ), + + + +#==== +# 7. Informations sur les fichiers d'echange +#==== + + Files = FACT ( statut = "f", + min = 1, + max = "**", + + Id = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Identificateur du fichier", + ang = "File id" + ), + + Type = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "in", "out", ), + fr = "Fichier d entree ou de sortie du solveur ?", + ang = "Input or Output file ?" + ), + + Name = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du fichier", + ang = "file name" + ), + + Path = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "chemin du fichier", + ang = "path file " + ), + + Subst = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "liste de variables", + ang = "list" + ), + + ), # Fin FACT Files + +); # Fin PROC STUDY + +Result = PROC ( nom = "RESULT", + op = None, + docu = "", + fr = "Liste des resultats a produire", + ang = "List of results to write out", + + GeneralizedReliabilityIndex = SIMP ( statut = "o", + typ = "TXM", + into = ( "yes", "no" ), + defaut = "no", + max = 1, + fr = "Index de fiabilite generalise", + ang = "Generalized reliability index" + ), + +); # Fin PROC Result + diff --git a/Openturns/editeur.ini b/Openturns/editeur.ini new file mode 100644 index 00000000..f8c8a518 --- /dev/null +++ b/Openturns/editeur.ini @@ -0,0 +1,30 @@ +import os + +import prefs + +rep_cata = prefs.REPINI + +# Accès à la documentation +path_doc = os.path.join(rep_cata,'Doc') +exec_acrobat = "/usr/bin/xpdf" + +# Utilisateur/Développeur +isdeveloppeur = "NON" +path_cata_dev = "/tmp/cata" + +# Répertoire temporaire +rep_travail = "/tmp" + +# Répertoire initial +initialdir=os.curdir + +# Choix des catalogues +rep_mat=" " + +catalogues = ( +# ('OPENTURNS','v0',os.path.join(rep_cata,'Open_Cata_V0.py'),'openturns'), + ('OPENTURNS','v1',os.path.join(rep_cata,'Open_Cata_V1.py'),'openturns'), + ('OPENTURNS','IDM v1',os.path.join(rep_cata,'Open_Cata_IDM_V1.py'),'openturns'), +# ('OPENTURNS','vg',os.path.join(rep_cata,'Open_Cata_gn.py'),'openturns'), + ) + diff --git a/Openturns/eficas_openturns.py b/Openturns/eficas_openturns.py new file mode 100755 index 00000000..599ad837 --- /dev/null +++ b/Openturns/eficas_openturns.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +import sys + +# Modules Eficas +import prefs +prefs.code="OPENTURNS" + +sys.path[:0]=[prefs.INSTALLDIR] + +import InterfaceTK +from InterfaceTK import eficas_go + +if len(sys.argv) > 1 : + # on veut ouvrir un fichier directement au lancement d'Eficas + eficas_go.lance_eficas(code='OPENTURNS',fichier = sys.argv[1]) +else: + # on veut ouvrir Eficas 'vide' + eficas_go.lance_eficas(code='OPENTURNS') diff --git a/Openturns/prefs.py b/Openturns/prefs.py new file mode 100644 index 00000000..8ef2419a --- /dev/null +++ b/Openturns/prefs.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os, sys + +# REPINI sert à localiser le fichier editeur.ini +# Obligatoire +REPINI=os.path.dirname(os.path.abspath(__file__)) + +# INSTALLDIR sert à localiser l'installation d'Eficas +# Obligatoire +INSTALLDIR=os.path.join(REPINI,'..') + +# CODE_PATH sert à localiser Noyau et Validation éventuellement +# non contenus dans la distribution EFICAS +# Par défaut on utilise les modules de INSTALLDIR +# Peut valoir None (defaut) +CODE_PATH = None +code = "OPENTURNS" + +# lang indique la langue utilisée pour les chaines d'aide : fr ou ang +lang='fr' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' + +EditeurDir=INSTALLDIR+"/Editeur" +sys.path[:0]=[EditeurDir] +sys.path[:0]=[INSTALLDIR] + +ICONDIR=os.path.join(INSTALLDIR,'Editeur','icons') + +# Preference +if os.name == 'nt': + userprefs = os.sep.join( [ os.environ['HOMEDRIVE'], os.environ['HOMEPATH'], 'Eficas_install', 'prefs.py' ]) +else : + userprefs=os.path.expanduser("~/Eficas_install/prefs.py") + +if os.path.isfile(userprefs): + try: + execfile(userprefs) + except: + pass + + +#------------------------------------------------------------------- +# Partie pour TK +#------------------------------------------------------------------- + +labels= ('Fichier','Edition','Jeu de commandes',) + +appli_composants=['readercata','bureau', 'options', ] + +menu_defs={ 'bureau': [ + ('Fichier',[ + ('Nouveau','newJDC',''), + ('Ouvrir','openJDC',''), + ('Enregistrer','saveJDC',''), + ('Enregistrer sous','saveasJDC',''), + None, + ('Fermer','closeJDC',''), + ('Quitter','exitEFICAS',''), + ] + ), + ('Edition',[ + ('Copier','copy',''), + ('Couper','cut',''), + ('Coller','paste',''), + ] + ), + ('Jeu de commandes',[ + ('Rapport de validation','visuCRJDC',''), + ('Fichier à plat','visu_a_plat',''), + ] + ), + ] + } + diff --git a/Openturns/properties.py b/Openturns/properties.py new file mode 100644 index 00000000..8ba0ed7e --- /dev/null +++ b/Openturns/properties.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +#@ MODIF properties Accas DATE 10/10/2002 AUTEUR gcbhhhh M.ADMINISTRATEUR +# CONFIGURATION MANAGEMENT OF EDF VERSION +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "7.1.0" +date = "23/04/2003" diff --git a/Openturns/qtEficas_openturns.py b/Openturns/qtEficas_openturns.py new file mode 100755 index 00000000..ea0782e2 --- /dev/null +++ b/Openturns/qtEficas_openturns.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +""" + Ce module sert à lancer EFICAS configuré pour Openturns +""" +# Modules Python + +# Modules Eficas +import prefs +prefs.code="OPENTURNS" +from InterfaceQT import eficas_go + +eficas_go.lance_eficas(code=prefs.code) diff --git a/Openturns/style.py b/Openturns/style.py new file mode 100644 index 00000000..7da9d534 --- /dev/null +++ b/Openturns/style.py @@ -0,0 +1 @@ +# Necessaire pour compatibilite avec Aster