Changeset 994

Show
Ignore:
Timestamp:
10/31/08 11:06:47 (2 months ago)
Author:
lebrun
Message:

MERGE: merging from trunk into lebrun/devel (rev. 990:993)
lebrun/devel> svn merge -r 990:993 https://.../trunk

Synchronization with trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/lebrun/devel/doc/configure.ac

    r971 r994  
    113113           src/ReferenceGuide/Makefile 
    114114           src/ContributionGuide/Makefile 
     115           src/ExamplesGuide/Makefile 
    115116]) 
    116117#           src/CodingRulesGuide/Makefile 
     
    118119 
    119120cat <<EOT > summary 
     121(doc) 
    120122EOT 
    121123cat summary 
  • branches/lebrun/devel/doc/src/DocumentationGuide/OpenTURNS_DocumentationGuide.tex

    r867 r994  
    7575\begin{itemize} 
    7676   \item[$\bullet$] {\itshape Open TURNS - Reference Guide}, 
    77   \item[$\bullet$] {\itshape Open TURNS - Example Guide} (to appear soon)
     77  \item[$\bullet$] {\itshape Open TURNS - Examples Guide}
    7878\end{itemize} 
    7979 
     
    8989  \item[$\bullet$] {\bf Link with the Open TURNS Methodology} : this field recalls the position of the algorithm in the Global Methodology. It precises to which step of the Global Methodology it participates. 
    9090  \item[$\bullet$] {\bf References and theoretical basics} : this field gives some usefull references to the User who wants to know more about the method. It recalls, too, some limits in the use of the method. 
    91   \item[$\bullet$] {\bf Examples} : this field applies the method on a simple example. Most of the forms of this documentation present the analytical example of a cantilever beam, of Young's modulus E, length L, section modulus I, which undergoes a concentrated bending force at one end. We study then the vertical displacement of the extreme end. 
    92 \end{itemize} 
    93  
    94 To have an example of the use of a particular algorithm or of a particular method, the User is invited to refer either to the documentation {\itshape Reference Guide - Open TURNS}  in its section {Example} or to the documentation {\itshape Example Guide - Open TURNS} which applies the Global Methodology on a particular example.\\ 
     91  \item[$\bullet$] {\bf Examples} : this field applies the method on some examples. Most of the forms of this documentation present the analytical example of a cantilever beam, of Young's modulus E, length L, section modulus I, which undergoes a concentrated bending force at one end. We study then the vertical displacement of the extreme end. 
     92\end{itemize} 
     93 
     94To have an example of the use of a particular algorithm or of a particular method, the User is invited to refer either to the documentation {\itshape Reference Guide - Open TURNS}  in its section {Example} or to the documentation {\itshape Examples Guide - Open TURNS} which applies the Global Methodology on a particular example.\\ 
    9595 
    9696Some hyperlinks are present to facilitate the navigation between the documentation {\itshape Uncertainty Reference Guide - Open TURNS} and the others ones. 
    9797 
    9898 
    99         \subsection{ Example Guide} 
    100  
    101 This Guide applies the whole Global Methodology on the following analytical example :  the evaluation of the height of an embankment to protect from flows.\\ 
    102  
    103 The User may find in this documentation a complete probabilistic uncertainty treatment study. In particular, all the results are discussed and the documentation aims at explicitating the interest of such a study. \\ 
    104 Let's note that the documentation {\itshape Open TURNS - Use Cases Guide for the Textual User Interface} gives also the example of an uncertainty study, performed on the analytical example of a cantilever beam wich undergoes a concentrated bending force at one end.\\ 
     99        \subsection{Examples Guide} 
     100 
     101This Guide applies the whole Global Methodology on some analytical examples. For now, there is only one example: the case of a cantilever beam wich undergoes a concentrated bending force at one end.\\ 
     102 
     103The User may find in this documentation a complete probabilistic uncertainty treatment study.\\ 
    105104 
    106105The User is invited to refer to that documentation in particular to apprehend properly the signification of the results of the methods preconised in the Globel Methodology.\\ 
    107106 
    108 Some links are present to facilitate the navigation between the documentation {\itshape Example Guide - Open TURNS} and the {\itshape Reference Guide - Open TURNS} one. 
     107Some links are present to facilitate the navigation between the documentation {\itshape Examples Guide - Open TURNS} and the {\itshape Reference Guide - Open TURNS} one. 
    109108 
    110109 
     
    141140The presentation follows the steps preconised in the Global Methodology.\\ 
    142141 
    143 The User is invited to consult this documentation before implementating a study through the TUI : he will probably find there an example of what he wants to perform. The documentation is made to enable the User to make some cut/copy from the documentation into his study.\\ 
    144  
    145 An example of complete uncertainty study is given at the end of the documentation : the analytical example of a cantilever beam wich undergoes a concentrated bending force at one end. 
     142The User is invited to consult this documentation before implementating a study through the TUI : he will probably find there an example of what he wants to perform. The documentation is made to enable the User to make some cut/copy from the documentation into his study. 
    146143 
    147144\section{Software Source.} 
     
    201198\item {\itshape Reference Guide} : \\ 
    202199source file $OpenTURNS\_ReferenceGuide.tex$, 
    203 \item {\itshape Example Guide} : \\ 
    204 source file $OpenTURNS\_ExampleGuide.tex$. 
     200\item {\itshape Examples Guide} : \\ 
     201source file $OpenTURNS\_ExamplesGuide.tex$. 
    205202\end{itemize} 
    206203  \item[$\bullet$] {\bf TextualUserInterface} :  
  • branches/lebrun/devel/doc/src/Makefile.am

    r867 r994  
    2525include $(top_srcdir)/config/common.am 
    2626 
    27 SUBDIRS      =  ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual WrapperGuide GNU_free_documentation_licence ContributionGuide #CodingRulesGuide 
    28 DIST_SUBDIRS =  ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual WrapperGuide GNU_free_documentation_licence ContributionGuide #CodingRulesGuide 
     27SUBDIRS      =  ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual ExamplesGuide WrapperGuide GNU_free_documentation_licence ContributionGuide ExamplesGuide #CodingRulesGuide 
     28DIST_SUBDIRS =  ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual ExamplesGuide WrapperGuide GNU_free_documentation_licence ContributionGuide ExamplesGuide #CodingRulesGuide 
    2929 
    3030EXTRA_DIST   = logoOpenTURNS.jpg 
  • branches/lebrun/devel/doc/src/ReferenceGuide/OpenTURNS_ReferenceGuide.tex

    r867 r994  
    1 %Copyright (c)  2007  EDF-EADS-PHIMECA. 
     1%Copyright (c)  2005  EDF-EADS-PHIMECA. 
    22%  Permission is granted to copy, distribute and/or modify this document 
    33%  under the terms of the GNU Free Documentation License, Version 1.2 
  • branches/lebrun/devel/doc/src/ReferenceGuide/global_methodology_content.tex

    r867 r994  
    1 %Copyright (c)  2007  EDF-EADS-PHIMECA. 
     1%Copyright (c)  2005  EDF-EADS-PHIMECA. 
    22%  Permission is granted to copy, distribute and/or modify this document 
    33%  under the terms of the GNU Free Documentation License, Version 1.2 
  • branches/lebrun/devel/doc/src/ReferenceGuide/reference_guide_content.tex

    r867 r994  
    1 %Copyright (c)  2007  EDF-EADS-PHIMECA. 
     1%Copyright (c)  2005  EDF-EADS-PHIMECA. 
    22%  Permission is granted to copy, distribute and/or modify this document 
    33%  under the terms of the GNU Free Documentation License, Version 1.2 
  • branches/lebrun/devel/doc/src/ReferenceGuide/reference_guide_title.tex

    r867 r994  
    1 %Copyright (c)  2007  EDF-EADS-PHIMECA. 
     1%Copyright (c)  2005  EDF-EADS-PHIMECA. 
    22%  Permission is granted to copy, distribute and/or modify this document 
    33%  under the terms of the GNU Free Documentation License, Version 1.2 
  • branches/lebrun/devel/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex

    r976 r994  
    107107It is important to note that the python test files given in open source with the code source of Open TURNS  are very useful : they provide to the User an example of the utilisation of each object of Open TURNS. The User is invited to refer to them : they will surely help him to write his study through the TUI with the right syntax.\\ 
    108108 
     109 
     110 
     111 
     112\subsection*{Loading the openturns python library} 
     113\addcontentsline{toc}{subsection}{Loading the openturns python library} 
     114 
    109115In order to write a python file using fonctionalities proposed by the \emph{openturns} python module, it is necessary to load the module in the python shell. If there is no danger to overload functionalities coming from other python modules, the loading command is :  
    110116 
     
    138144\end{center} 
    139145gives a general overview of the whole objects proposed by the \emph{openturns} python library.\\ 
     146 
     147 
     148 
     149\subsection*{Verbosity level of the Open TURNS platform} 
     150\addcontentsline{toc}{subsection}{Verbosity level of the Open TURNS platform} 
     151 
     152It is possible to specify the verbosity level of the Open TURNS platform, through the object {\itshape Log} which contains the internal following variables :  
     153\begin{itemize} 
     154 \item {\itshape Log.DBG} to catch the messages related the level debug, 
     155 \item {\itshape Log.WRAPPER} to catch the messages related to the wrapper, 
     156 \item {\itshape Log.INFO} to catch the messages related to the platform information, 
     157 \item {\itshape Log.USER} to catch the messages defined by the User, 
     158 \item {\itshape Log.WARN} to catch the messages related to warnings, 
     159 \item {\itshape Log.ERROR} to catch the messages related to errors. 
     160\end{itemize} 
     161By default, the Open TURNS platform shows all the messages related to the levels DBG, WARN and ERROR.\\ 
     162It is possible to change it by the command {\itshape Log.Show()}. For example to catch the messages related to the level debug, the warnings and information, the command is :   
     163\begin{center} 
     164\begin{lstlisting} 
     165Log.Show(Log.DBG + Log.WARN + Log.INFO) 
     166\end{lstlisting} 
     167\end{center} 
     168In order to catch all the possible messages (highest verbosity level), the command is :  
     169\begin{center} 
     170\begin{lstlisting} 
     171Log.Show(Log.ALL) 
     172\end{lstlisting} 
     173\end{center} 
     174In order to catch no message (lowest verbosity level), the command is :  
     175\begin{center} 
     176\begin{lstlisting} 
     177Log.Show(Log.NONE) 
     178\end{lstlisting} 
     179\end{center} 
     180 
     181 
     182 
     183 
     184\subsection*{Some usefull general commands} 
     185\addcontentsline{toc}{subsection}{Some usefull general commands} 
     186 
    140187 
    141188The command {\itshape help} gives detailed information on each  object of the {\itshape openturns} python library. For example, to get information on the object {\itshape NumericalPoint}, the command is :  
     
    188235where $[TAB]$ is the Tabulation touch. 
    189236 
     237 
     238 
     239 
     240 
     241\subsection*{Link with other python standards} 
     242\addcontentsline{toc}{subsection}{Link with other python standards} 
     243 
     244It is possible to define a NumericalPoint from a list python, as follows :  
     245\begin{center} 
     246\begin{lstlisting} 
     247point = NumericalPoint( [1.1, 2.2, 3.3, 4.4] ) 
     248\end{lstlisting} 
     249\end{center} 
     250 
     251 
     252It is possible to define a NumericalPoint from a tuple python, as follows :  
     253\begin{center} 
     254\begin{lstlisting} 
     255point2 = NumericalPoint( (1.1, 2.2, 3.3, 4.4) ) 
     256\end{lstlisting} 
     257\end{center} 
    190258 
    191259 
     
    347415We explicitate here the probability density function of the Non Central Student :  
    348416$$ 
    349 p_T(x) = \frac{\exp(-\delta^2 / 2)}{\sqrt{\nu\pi} \Gamma(\nu / 2)}\left(\frac{\nu}{\nu + (x+\gamma)^2}\right) ^ {(\nu + 1) / 2} \sum_{j=0}^{\infty} \frac{\Gamma\left(\frac{\nu + j + 1}{2}\right)}{\Gamma(j + 1)}\left((x+\gamma)\delta\sqrt{\frac{2}{\nu + x^2}}\right) ^ j 
     417p_T(x) = \frac{\exp(-\delta^2 / 2)}{\sqrt{\nu\pi} \Gamma(\nu / 2)}\left(\frac{\nu}{\nu + (x-\gamma)^2}\right) ^ {(\nu + 1) / 2} \sum_{j=0}^{\infty} \frac{\Gamma\left(\frac{\nu + j + 1}{2}\right)}{\Gamma(j + 1)}\left(\delta(x-\gamma)\sqrt{\frac{2}{\nu + (x-\gamma)^2}}\right) ^ j 
    350418$$ 
    351419 
     
    34163484 
    34173485\index{Sample Statistics!Min - Max} 
     3486\index{Sample Statistics!Moments evaluation} 
    34183487\index{Sample Statistics!Covariance} 
    34193488\index{Sample Statistics!Skewness} 
     
    36543723\vspace*{0.5cm} 
    36553724 
    3656 It is necessary to refer to the documentation {\itshape Open TURNS - Wrappers Guide} to have explanations on what constitues an Open TURNS wrapper.\\ 
     3725It is necessary to refer to the documentation {\itshape Open TURNS - Wrappers Guide} to have explanations on what constitues an Open TURNS wrapper. \\ 
     3726It is possible to separate the loading of the wrapper file and the creation of the NumericalMathFunction, as indicated in CASE 2 of the script given belows. 
    36573727 
    36583728\requirements{ 
     
    36813751 
    36823752\begin{lstlisting} 
     3753# CASE 1 : we load the wrapper file and create the NumericalMathFunction at the same time 
    36833754# Create the limit state function 'poutre' from the wrapper 'poutre' 
    36843755    poutre = NumericalMathFunction("poutre") 
     3756 
     3757# CASE 2 : we load separately the wrapper file and create the NumericalMathFunction 
     3758# Load the wrapper file 
     3759    wrap = WrapperFile.FindWrapperByName("poutre") 
     3760# Create the limit state function 'poutre' from the wrapper wrap 
     3761    poutre = NumericalMathFunction(wrap) 
    36853762\end{lstlisting} 
    36863763 
     
    37003777 \item[$\bullet$]the hessian evaluation method is the centered finite difference method, with the differential increment $h=1e-4$ for each direction. 
    37013778\end{itemize} 
    3702 it is possible to change the evaluation method for the gradient or the hessian. The following Use Case shows how to proceed.\\ 
     3779It is possible to change the evaluation method for the gradient or the hessian. The following Use Case shows how to proceed.\\ 
    37033780 
    37043781The example here is the AnalyticalFunction {\itshape myAnalyticalFunction} defined by the formula :  
     
    37653842\end{lstlisting} 
    37663843 
     3844 
     3845 
     3846     \subsubsection{UC : From a fonction defined in the script python} 
     3847 
     3848\index{Limit State Function!Function declarde in the script python} 
     3849 
     3850 
     3851The objective of this UC is to create the limit state function, from a function defined in the script python. Open TURNS automatically gives to the analytical formula an implementation for the gradient and the hessian : by default,  
     3852\begin{itemize} 
     3853 \item[$\bullet$]the gradient evaluation method is the  centered finite difference method, with the differential increment $h=1e-5$ for each direction, 
     3854 \item[$\bullet$] the hessian evaluation method is the  centered finite difference method, with the differential increment $h=1e-4$ for each direction. 
     3855\end{itemize} 
     3856It is possible to change the evaluation method for the gradient or the hessian. The following Use Case shows how to proceed.\\ 
     3857 
     3858In order to be able to use the function with the {\itshape openturns} library, it is necessary to define a class which derives from {\itshape OpenTURNSPythonFunction} as indicated belows. The example here is the functions {\itshape modelePYTHON} and {\itshape modelePYTHON2}:  
     3859\begin{equation} 
     3860\begin{array}{l|lcl} 
     3861modelePYTHON : & \mathbb{R}^4 & \rightarrow & \mathbb{R} \\ 
     3862         & (E,F,L,I)    & \mapsto     & \displaystyle \frac{FL^3}{3EI} 
     3863\end{array} 
     3864\end{equation} 
     3865 
     3866\begin{equation} 
     3867\begin{array}{l|lcl} 
     3868modelePYTHON2 : & \mathbb{R}^4 & \rightarrow & \mathbb{R}^2 \\ 
     3869         & (a,b,c)    & \mapsto     & \displaystyle (a^2, abc) 
     3870\end{array} 
     3871\end{equation} 
     3872 
     3873 
     3874\requirements{ 
     3875  none 
     3876} 
     3877{ 
     3878  \begin{description} 
     3879    \item[$\bullet$] the limit state function : {\itshape modeleOpenTURNS} 
     3880    \item[type] : NumericalMathFunction 
     3881  \end{description} 
     3882} 
     3883 
     3884\espace 
     3885Python script for this UseCase : 
     3886    
     3887\begin{lstlisting} 
     3888# CASE 1 : function : R^4 --> R 
     3889 
     3890# Create here the python lines to define the implementation of the function 
     3891 
     3892# In order to be able to use that function with the openturns library,  
     3893# it is necessary to define a class which derives from OpenTURNSPythonFunction 
     3894 
     3895class modelePYTHON(OpenTURNSPythonFunction) :  
     3896  # that following method defines the input size (4) and the output size (1) 
     3897  def __init__(self) :  
     3898     OpenTURNSPythonFunction.__init__(self,4,1) 
     3899 
     3900  # that following method gives the implementation of modelePYTHON 
     3901  def f(self,x) :  
     3902     E=x[0] 
     3903     F=x[1] 
     3904     L=x[2] 
     3905     I=x[3] 
     3906     return [-(F*L*L*L)/(3.*E*I)] 
     3907 
     3908# Use that function defined in the script python  
     3909# with the openturns library 
     3910# Create a NumericalMathFunction from modelePYTHON 
     3911modeleOpenTURNS = NumericalMathFunction(modelePYTHON()) 
     3912 
     3913 
     3914# CASE 2 : function : R^3 --> R^2 
     3915 
     3916# Create here the python lines to define the implementation of the function 
     3917 
     3918# In order to be able to use that function with the openturns library,  
     3919# it is necessary to define a class which derives from OpenTURNSPythonFunction 
     3920 
     3921class modelePYTHON2(OpenTURNSPythonFunction) :  
     3922  # that following method defines the input size (3) and the output size (2) 
     3923  def __init__(self) :  
     3924     OpenTURNSPythonFunction.__init__(self,3,2) 
     3925 
     3926  # that following method gives the implementation of modelePYTHON 
     3927  def f(self,x) :  
     3928     a=x[0] 
     3929     b=x[1] 
     3930     c=x[2] 
     3931     return [-a*a,a*b*c] 
     3932 
     3933# Use that function defined in the script python  
     3934# with the openturns library 
     3935# Create a NumericalMathFunction from modelePYTHON2 
     3936modeleOpenTURNS2 = NumericalMathFunction(modelePYTHON2()) 
     3937\end{lstlisting} 
    37673938 
    37683939 
     
    40044175# Give directly to the 'poutreReduced' function a gradient evaluation method  
    40054176# thanks to the finite difference technique 
    4006     # For example, radient technique : non centered finite difference method 
     4177    # For example, gradient technique : non centered finite difference method 
    40074178    myGradient = NonCenteredFiniteDifferenceGradient(NumericalPoint(2, 1.0e-7), poutreReduced.getEvaluationImplementation()) 
    40084179    print "myGradient = ", myGradient 
     
    47154886In order to evaluate the central tendance of the output variable of interest described by a numerical sample, it is possible to use all the functionalities described in the  Use Case \ref{statistical}.\\ 
    47164887 
    4717 The Use Case  \ref{correlationAnalysis} describes the correlation analysis we can perform between the random input vector, described by a numerical sample, and the output variable of interest described by a numerical sample too. 
    4718  
    4719 \subsubsection{UC : Correlation analysis on samples : Pearson and Spearman coefficients, PCC, PRCC, SRC, SRRC coefficients}\label{correlationAnalysis} 
    4720  
    4721 \index{Correlation!Pearson correlation coefficient} 
    4722 \index{Correlation!Partial Pearson correlation coefficient (PCC)} 
    4723 \index{Correlation!Spearman correlation coefficient} 
    4724 \index{Correlation!Partial rank correlation coefficient (PRCC)} 
    4725 \index{Correlation!Standard regression coefficient (SRC)} 
    4726 \index{Correlation!Standard rank regression coefficient (SRRC)} 
    4727  
    4728  
    4729 \requirements{ 
    4730   \begin{description} 
    4731     \item[$\bullet$] a first numerical sample : {\itshape inputSample}, may be of dimension >1 
    4732     \item[type] : NumericalSample 
    4733     \item[$\bullet$] a second numerical sample : {\itshape outputSample}, must be of dimension =1 
    4734     \item[type] : NumericalSample 
    4735   \end{description} 
    4736 
    4737 
    4738   \begin{description} 
    4739     \item[$\bullet$] the different correlation coefficients : {\itshape PCCcoefficient, PRCCcoefficient, SRCcoefficient, SRRCcoefficient, pearsonCorrelation, spearmanCorrelation} 
    4740     \item[type] : NumericalPoint 
    4741   \end{description} 
    4742 
    4743  
    4744 \espace 
    4745 Python script for this UseCase : 
    4746  
    4747 \begin{lstlisting} 
    4748 # PCC coefficients evaluated between the outputSample and each coordinate of inputSample  
    4749    PCCcoefficient = CorrelationAnalysis.PCC(inputSample, outputSample) 
    4750  
    4751 # PRCC evaluated between the outputSample and each coordinate of inputSample (based on the rank values)  
    4752    PRCCcoefficient = CorrelationAnalysis.PRCC(inputSample, outputSample) 
    4753  
    4754 # SRC evaluated between the outputSample and each coordinate of inputSample  
    4755    SRCcoefficient = CorrelationAnalysis.SRC(inputSample, outputSample) 
    4756  
    4757 # SRRC evaluated between the outputSample and each coordinate of inputSample (based on the rank values)  
    4758    SRRCcoefficient = CorrelationAnalysis.SRRC(inputSample, outputSample) 
    4759  
    4760 # Pearson Correlation Coefficient 
    4761 # CARE :  inputSample must be of dimension 1 
    4762    pearsonCorrelation = CorrelationAnalysis.PearsonCorrelation(inputSample, outputSample) 
    4763  
    4764 # Spearman Correlation Coefficient 
    4765 # CARE :  inputSample must be of dimension 1 
    4766     spearmanCorrelation = CorrelationAnalysis.SpearmanCorrelation(inputSample, outputSample) 
    4767 \end{lstlisting} 
    4768  
    4769  
    4770  
    4771  
    4772 \subsubsection{UC : Moments evaluation from the Taylor variance decomposition method and evaluation of the importance factors associated} 
    4773  
    4774 \index{Quadratic Cumul} 
    4775 \index{Graph!Quadratic Cumul importance factors} 
     4888The Use Case  \ref{correlationAnalysis} describes the correlation analysis we can perform between the input random  vector, described by a numerical sample, and the output variable of interest described by a numerical sample too. 
     4889 
     4890 
     4891 
     4892\subsubsection{UC : Moments evaluation from the Taylor variance decomposition method (or Quadratic Cumul method) and evaluation of the importance factors associated} 
     4893 
     4894\index{Taylor variance decomposition (Quadratic Cumul)} 
     4895\index{Quadratic Cumul (Taylor variance decomposition)} 
     4896\index{Graph!Taylor variance decomposition (Quadratic Cumul) importance factors} 
    47764897\index{Graph Manipulation!ViewImage} 
    47774898\index{Graph Manipulation!Show} 
     
    47814902\requirements{ 
    47824903  \begin{description} 
    4783     \item[$\bullet$] the random input vector : {\itshape input} 
    4784     \item[type] : RandomVector which implementation is a UsualRandomVector 
    4785     \item[$\bullet$] the output variable of interest : {\itshape output} 
     4904    \item[$\bullet$] the output variable of interest : {\itshape output}, which may be of dimension $\geq 1$ 
    47864905    \item[type] : RandomVector which implementation is a CompositeRandomVector 
    47874906  \end{description} 
     
    47894908{ 
    47904909  \begin{description} 
    4791     \item[$\bullet$] Moments (order 1, 2, 3) of the variable of interest and its components 
     4910    \item[$\bullet$] Mean and covariance of the variable of interest 
    47924911    \item[type] : NumericalPoint, Matrix 
    47934912    \item[$\bullet$] Importance factors from quadratical cumul method only for {\itshape output} of dimension 1 
     
    48614980 
    48624981 
     4982 
     4983 
     4984\subsubsection{UC : Moments evaluation a random sample of the output variable of interest} 
     4985 
     4986\index{Sample Statistics!Moments evaluation} 
     4987\index{Graph!Taylor variance decomposition (Quadratic Cumul) importance factors} 
     4988\index{Graph Manipulation!ViewImage} 
     4989\index{Graph Manipulation!Show} 
     4990 
     4991The objective of this UC  is to evaluate the mean and standard deviation of the output variable of interest by generating a random sample of the output variable of interest and evaluate the empirical indicators from that sample.\\ 
     4992 
     4993\requirements{ 
     4994  \begin{description} 
     4995    \item[$\bullet$] the output variable of interest : {\itshape output}, which may be of dimension $\geq 1$ 
     4996    \item[type] : RandomVector which implementation is a CompositeRandomVector 
     4997  \end{description} 
     4998} 
     4999{ 
     5000  \begin{description} 
     5001    \item[$\bullet$] Mean and covariance of the variable of interest 
     5002    \item[type] : NumericalPoint, CovarianceMatrix 
     5003  \end{description} 
     5004} 
     5005 
     5006\espace 
     5007Python script for this UseCase : 
     5008 
     5009\begin{lstlisting} 
     5010# Create a random sample of the output variabe of interest of size 1000 
     5011    size = 1000 
     5012    outputSample = output.getNumericalSample(size) 
     5013 
     5014# Get the empirical mean  
     5015    empiricalMean = outputSample.computeMean() 
     5016    print "Empirical Mean = ", empiricalMean 
     5017 
     5018# Get the empirical covariance matrix 
     5019    empiricalCovarianceMatrix = outputSample.computeCovariance() 
     5020    print "Empirical Covariance Matrix = ", empiricalCovarianceMatrix 
     5021 
     5022# Get the standard deviation of the i-th component of the output variabe of interest 
     5023    # Import the sqrt functionality from the math python library 
     5024    from math import sqrt 
     5025    for i in range(output.getDimension()) :  
     5026       print "Standard deviation of component", i+1,  " = ", sqrt(empiricalCovarianceMatrix[i,i]) 
     5027\end{lstlisting} 
     5028\espace 
     5029 
     5030 
     5031 
     5032 
     5033 
     5034\subsubsection{UC : Correlation analysis on samples : Pearson and Spearman coefficients, PCC, PRCC, SRC, SRRC coefficients}\label{correlationAnalysis} 
     5035 
     5036\index{Correlation!Pearson correlation coefficient} 
     5037\index{Correlation!Partial Pearson correlation coefficient (PCC)} 
     5038\index{Correlation!Spearman correlation coefficient} 
     5039\index{Correlation!Partial rank correlation coefficient (PRCC)} 
     5040\index{Correlation!Standard regression coefficient (SRC)} 
     5041\index{Correlation!Standard rank regression coefficient (SRRC)} 
     5042 
     5043 
     5044This Use Case  describes the correlation analysis we can perform between the input random  vector, described by a numerical sample, and the output variable of interest described by a numerical sample too.\\ 
     5045 
     5046\requirements{ 
     5047  \begin{description} 
     5048    \item[$\bullet$] a first numerical sample : {\itshape inputSample}, may be of dimension >1 
     5049    \item[type] : NumericalSample 
     5050    \item[$\bullet$] a second numerical sample : {\itshape outputSample}, must be of dimension =1 
     5051    \item[type] : NumericalSample 
     5052  \end{description} 
     5053} 
     5054{ 
     5055  \begin{description} 
     5056    \item[$\bullet$] the different correlation coefficients : {\itshape PCCcoefficient, PRCCcoefficient, SRCcoefficient, SRRCcoefficient, pearsonCorrelation, spearmanCorrelation} 
     5057    \item[type] : NumericalPoint 
     5058  \end{description} 
     5059} 
     5060 
     5061\espace 
     5062Python script for this UseCase : 
     5063 
     5064\begin{lstlisting} 
     5065# PCC coefficients evaluated between the outputSample and each coordinate of inputSample  
     5066   PCCcoefficient = CorrelationAnalysis.PCC(inputSample, outputSample) 
     5067 
     5068# PRCC evaluated between the outputSample and each coordinate of inputSample (based on the rank values)  
     5069   PRCCcoefficient = CorrelationAnalysis.PRCC(inputSample, outputSample) 
     5070 
     5071# SRC evaluated between the outputSample and each coordinate of inputSample  
     5072   SRCcoefficient = CorrelationAnalysis.SRC(inputSample, outputSample) 
     5073 
     5074# SRRC evaluated between the outputSample and each coordinate of inputSample (based on the rank values)  
     5075   SRRCcoefficient = CorrelationAnalysis.SRRC(inputSample, outputSample) 
     5076 
     5077# Pearson Correlation Coefficient 
     5078# CARE :  inputSample must be of dimension 1 
     5079   pearsonCorrelation = CorrelationAnalysis.PearsonCorrelation(inputSample, outputSample) 
     5080 
     5081# Spearman Correlation Coefficient 
     5082# CARE :  inputSample must be of dimension 1 
     5083    spearmanCorrelation = CorrelationAnalysis.SpearmanCorrelation(inputSample, outputSample) 
     5084\end{lstlisting} 
     5085 
     5086 
     5087 
     5088 
     5089 
     5090 
     5091 
    48635092\subsubsection{UC : Quantile estimations : Wilks and empirical estimators} 
    48645093 
    48655094 
    4866 \index{Quantile!Empirical estimation
     5095\index{Quantile!Empirical estimation
    48675096\index{Quantile!Wilks estimation} 
    48685097\index{Wilks} 
     
    50075236This section gives elements to create events in the physical space {\itshape Event} and in the standard space {\itshape StandardEvent}.\\ 
    50085237 
    5009 The example here is the output variable {\itshape output} defined from the limit state function {\itshape poutre} defined in  Eq.(\ref{equatPoutre}) and the random input vector $(E,F,L,I)$. The event considered is :  
     5238The example here is the output variable {\itshape output} defined from the limit state function {\itshape poutre} defined in  Eq.(\ref{equatPoutre}) and the input random vector $(E,F,L,I)$. The event considered is :  
    50105239$$ 
    50115240myEvent = \{ (E,F,L,I) \in \mathbb{R}^4 / poutre(E,F,L,I) \leq -1.5\}. 
     
    50525281This section gives elements to manipulate an {\itshape StandardEvent} in Open TURNS .\\ 
    50535282  
    5054 The example here is an output variable {\itshape output} defined from the limit state function {\itshape f} and the random input vector {\itshape input}. The event considered is :  
     5283The example here is an output variable {\itshape output} defined from the limit state function {\itshape f} and the input random vector {\itshape input}. The event considered is :  
    50555284$$ 
    50565285myEvent = \{ output=f(input) \leq -1.5 \}. 
     
    51165345\requirements{ 
    51175346  \begin{description} 
    5118     \item[$\bullet$] the random input vector : {\itshape input} 
     5347    \item[$\bullet$] the input random vector : {\itshape input} 
    51195348    \item[type] : RandomVector which implementation is a UsualRandomVector 
    51205349    \item[$\bullet$] the output variable of interest : {\itshape output} of dimension 1 
     
    53775606\requirements{ 
    53785607  \begin{description} 
    5379     \item[$\bullet$] the random input vector : {\itshape input} 
     5608    \item[$\bullet$] the input random vector : {\itshape input} 
    53805609    \item[type] : RandomVector which implementation is a UsualRandomVector 
    53815610    \item[$\bullet$] the output variable of interest of dimension 1 : {\itshape output}  
     
    57125941# Draw the convergence graph and the confidence intervalle of level alpha 
    57135942    # By default, alpha = 0.95 
    5714     alpha = 0.95 
    5715     convergenceGraph = myAlgo.drawProbabilityConvergence(0.90
     5943    alpha = 0.90 
     5944    convergenceGraph = myAlgo.drawProbabilityConvergence(alpha
    57165945 
    57175946    # Impose a bounding box : x-range and y-range 
     
    59286157# Draw the convergence graph and the confidence intervalle of level alpha 
    59296158   # By default, alpha = 0.95 
    5930    alpha = 0.95 
    5931    convergenceGraph = myAlgo.drawProbabilityConvergence(0.90
     6159   alpha = 0.90 
     6160   convergenceGraph = myAlgo.drawProbabilityConvergence(alpha
    59326161 
    59336162  # Impose a bounding box : x-range and y-range 
     
    60146243# Draw the convergence graph and the confidence intervalle of level alpha 
    60156244   # By default, alpha = 0.95 
    6016    alpha = 0.95 
    6017    convergenceGraph2 = myAlgo2.drawProbabilityConvergence(0.90
     6245   alpha = 0.90 
     6246   convergenceGraph2 = myAlgo2.drawProbabilityConvergence(alpha
    60186247 
    60196248   # Impose a bounding box : x-range and y-range 
     
    61576386# Draw the convergence graph and the confidence intervalle of level alpha 
    61586387   # By default, alpha = 0.95 
    6159    alpha = 0.95 
    6160    convergenceGraph = myAlgo1.drawProbabilityConvergence(0.90
     6388   alpha = 0.90 
     6389   convergenceGraph = myAlgo1.drawProbabilityConvergence(alpha
    61616390 
    61626391   # Impose a bounding box : x-range and y-range 
     
    62326461# Draw the convergence graph and the confidence intervalle of level alpha 
    62336462   # By default, alpha = 0.95 
    6234    alpha = 0.95 
    6235    convergenceGraph = myAlgo2.drawProbabilityConvergence(0.90
     6463   alpha = 0.90 
     6464   convergenceGraph = myAlgo2.drawProbabilityConvergence(alpha
    62366465 
    62376466   # Impose a bounding box : x-range and y-range 
     
    62746503\subsection{UC : Linear and Quadratic Taylor approximations} 
    62756504 
    6276 \index{ResponseSurface!Linear Taylor approximation} 
    6277 \index{ResponseSurface!Quadratic Taylor approximation} 
    6278 \index{ResponseSurface!Linear least squares approximation} 
     6505\index{Response Surface!Linear Taylor approximation} 
     6506\index{Response Surface!Quadratic Taylor approximation} 
     6507\index{Response Surface!Linear least squares approximation} 
    62796508 
    62806509This section details the first method to construct a response surface : from the linear or quadratic Taylor approximations of the function at a particular point.\\ 
     
    63446573 
    63456574 
    6346 \index{ResponseSurface!Linear least squares approximation} 
     6575\index{Response Surface!Linear least squares approximation} 
    63476576\index{Random Generator} 
    63486577 
     
    64056634 
    64066635 
    6407 \index{ResponseSurface!Linear least squares approximation} 
     6636\index{Response Surface!Linear least squares approximation} 
    64086637\index{Random Generator} 
    64096638 
     
    66296858 
    66306859 
    6631  
    6632  
    6633  
    6634 \newpage 
    6635 \section{Annexe 1 :  One example of a complete study} 
    6636  
    6637 \subsection{Presentation of the study case} 
    6638  
    6639 This Annexe presents several Use Cases described previoulsy in order to show one example of a complete study. \\ 
    6640 This example has been presented in the ESREL 2007 conference in the paper : {\itshape Open TURNS, an Open source initiative to Treat Uncertainties, Risks'N Statistics in a structured industrial approach}, from A. Dutfoy(EDF R\&D), I. Dutka-Malen(EDF R\&D), R. Lebrun (EADS innovation Works) \& all.\\ 
    6641  
    6642 Let's consider the following analytical example of a cantilever beam, of Young's modulus $E$, length $L$, section modulus $I$. One end is built in a wall and we apply a concentrated bending load at the other end of the beam. The deviation (vertical displacement) y of the free end is equal to :  
    6643 $$ 
    6644 y(E, F, L, I) = \frac{FL^3}{3EI} 
    6645 $$ 
    6646  
    6647 \begin{figure}[Hhbtp] 
    6648 \begin{center} 
    6649   \psfrag{F}{F} 
    6650   \psfrag{E}{E} 
    6651   \psfrag{L}{L} 
    6652   \psfrag{I}{I} 
    6653   \psfrag{a}{a} 
    6654   \psfrag{e}{e} 
    6655   \includegraphics[width=10cm]{poutre.pdf} 
    6656 \end{center} 
    6657 \caption{cantilever beam under a ponctual bending load.} 
    6658 \end{figure} 
    6659  
    6660  
    6661 The objective of this UC is to evaluate the influence of uncertainties on the input data $(E, F, L, I)$ on the deviation $y$.\\ 
    6662 We consider a steel beam with a hollow square section of length $a = 2. e-2 m$ and of thickness $t=1.e-3 m$. Thus, the flexion section inertie of the beam is equal to $I = 2.47e-9 m^4$. The beam length is $L = 1 m$. The Young's modulus $E$ is $E = 2.1e11 kg.m^{-1}.s^{-2}$. The charge applied is $F = 10 kg.m.s^{-2}$.\\ 
    6663 The random modelisation of the input data is the following one : we consider for each input data a gaussian distribution, which mean $\mu$ is the deterministic value given above and which standard deviation is a percentile of the mean :  
    6664 \begin{itemize} 
    6665   \item[$\bullet$] E  = Gaussian($\mu_E$, 5\% * $\mu_E$)  
    6666   \item[$\bullet$] F  = Gaussian($\mu_F$, 10\% * $\mu_F$) 
    6667   \item[$\bullet$] L  = Gaussian($\mu_L$, 1\% * $\mu_L$) 
    6668   \item[$\bullet$] I  = Gaussian($\mu_I$, 1\% * $\mu_I$) 
    6669 \end{itemize} 
    6670 \vspace*{0.5cm} 
    6671 This example treats the following points of the methodology :  
    6672 \begin{itemize} 
    6673   \item[$\bullet$] Deterministic Study : Min/Max study 
    6674 \begin{itemize} 
    6675   \item with a deterministic experiment plane, 
    6676   \item with a random experiment plane, 
    6677 \end{itemize} 
    6678   \item[$\bullet$] Random Study : central tendance of the output variable of interest 
    6679 \begin{itemize} 
    6680   \item Taylor variance decomposition, 
    6681   \item Random sampling, 
    6682 \end{itemize} 
    6683   \item[$\bullet$] Random Study : threshold exceedance: deviation <-1cm 
    6684 \begin{itemize} 
    6685   \item FORM, 
    6686   \item SORM,, 
    6687   \item Monte Carlo simulation method, 
    6688   \item Directional Sampling method, 
    6689   \item Latin HyperCube Sampling method, 
    6690   \item Importance Sampling method 
    6691   \item Kernel Smoothing Fitting. 
    6692 \end{itemize} 
    6693 \end{itemize} 
    6694  
    6695  
    6696  
    6697 \subsection{The TUI File} 
    6698  
    6699  
    6700 \begin{lstlisting} 
    6701 #! /usr/bin/env python 
    6702  
    6703 from openturns import * 
    6704  
    6705 from math import * 
    6706  
    6707 from openturns_viewer import ViewImage 
    6708  
    6709 # This function enables a pretty print of a NumericalPoint 
    6710 def printNumericalPoint(point, digits) : 
    6711   oss = "[" 
    6712   eps = pow(0.1, digits) 
    6713   for i in range(point.getDimension()) : 
    6714     if i == 0 : 
    6715       sep = "" 
    6716     else : 
    6717       sep = "," 
    6718     if fabs(point[i]) < eps : 
    6719       oss += sep + str(fabs(point[i])) 
    6720     else : 
    6721       oss += sep + str(point[i]) 
    6722     sep = "," 
    6723   oss += "]"  
    6724   return oss 
    6725  
    6726  
    6727 ########################################### 
    6728 ### Fonction 'poutre' 
    6729 ########################################### 
    6730  
    6731 # We create a numerical math function  
    6732 myFunction = NumericalMathFunction("poutre") 
    6733  
    6734  
    6735 ########################################### 
    6736 ### Random input vector 
    6737 ########################################### 
    6738  
    6739  
    6740  
    6741 dim = myFunction.getInputNumericalPointDimension() 
    6742  
    6743 # We create a normal distribution point of dimension 4 
    6744 mean = NumericalPoint(dim, 0.0) 
    6745 # E : steel : 210000 MPa 
    6746 mean[0] = 2.1e11 
    6747 # F : 1kg : 10N