Changeset 994
- Timestamp:
- 10/31/08 11:06:47 (2 months ago)
- Files:
-
- branches/lebrun/devel/doc/configure.ac (modified) (2 diffs)
- branches/lebrun/devel/doc/src/DocumentationGuide/OpenTURNS_DocumentationGuide.tex (modified) (4 diffs)
- branches/lebrun/devel/doc/src/ExamplesGuide (copied) (copied from trunk/doc/src/ExamplesGuide)
- branches/lebrun/devel/doc/src/ExamplesGuide/ImportanceFactorsDrawingFORM.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/ImportanceFactorsDrawingFORM.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/Makefile.am (copied) (copied from trunk/doc/src/ExamplesGuide/Makefile.am)
- branches/lebrun/devel/doc/src/ExamplesGuide/Math_Notations.sty (copied) (copied from trunk/doc/src/ExamplesGuide/Math_Notations.sty)
- branches/lebrun/devel/doc/src/ExamplesGuide/OpenTURNS_ExamplesGuide.tex (copied) (copied from trunk/doc/src/ExamplesGuide/OpenTURNS_ExamplesGuide.tex)
- branches/lebrun/devel/doc/src/ExamplesGuide/convergenceGrapheDS.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/convergenceGrapheDS.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/convergenceGrapheIS.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/convergenceGrapheIS.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/convergenceGrapheLHS.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/convergenceGrapheLHS.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/convergenceGrapheMonteCarlo.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/convergenceGrapheMonteCarlo.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/distributionE_pdf.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/distributionE_pdf.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/distributionF_pdf.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/distributionF_pdf.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/distributionI_pdf.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/distributionI_pdf.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/distributionL_pdf.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/distributionL_pdf.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/poutre.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/poutre.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/resultatExampleBeam.tex (copied) (copied from trunk/doc/src/ExamplesGuide/resultatExampleBeam.tex)
- branches/lebrun/devel/doc/src/ExamplesGuide/scriptExample_beam.py (copied) (copied from trunk/doc/src/ExamplesGuide/scriptExample_beam.py)
- branches/lebrun/devel/doc/src/ExamplesGuide/smoothedCDF.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/smoothedCDF.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/smoothedPDF.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/smoothedPDF.pdf)
- branches/lebrun/devel/doc/src/ExamplesGuide/smoothedPDF_and_GaussianPDF.pdf (copied) (copied from trunk/doc/src/ExamplesGuide/smoothedPDF_and_GaussianPDF.pdf)
- branches/lebrun/devel/doc/src/Makefile.am (modified) (1 diff)
- branches/lebrun/devel/doc/src/ReferenceGuide/OpenTURNS_ReferenceGuide.tex (modified) (1 diff)
- branches/lebrun/devel/doc/src/ReferenceGuide/global_methodology_content.tex (modified) (1 diff)
- branches/lebrun/devel/doc/src/ReferenceGuide/reference_guide_content.tex (modified) (1 diff)
- branches/lebrun/devel/doc/src/ReferenceGuide/reference_guide_title.tex (modified) (1 diff)
- branches/lebrun/devel/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex (modified) (27 diffs)
- branches/lebrun/devel/doc/src/UserManual/BaseObjects_UserManual.tex (modified) (8 diffs)
- branches/lebrun/devel/doc/src/UserManual/Distribution_UserManual.tex (modified) (11 diffs)
- branches/lebrun/devel/doc/src/UserManual/Graphs_UserManual.tex (modified) (3 diffs)
- branches/lebrun/devel/gui/config/common.am (modified) (1 diff)
- branches/lebrun/devel/gui/configure.ac (modified) (3 diffs)
- branches/lebrun/devel/lib/config/common.am (modified) (1 diff)
- branches/lebrun/devel/lib/configure.ac (modified) (6 diffs)
- branches/lebrun/devel/lib/include/Makefile.am (modified) (1 diff)
- branches/lebrun/devel/lib/src/Base/Common/AtomicFunctions.hxx (copied) (copied from trunk/lib/src/Base/Common/AtomicFunctions.hxx)
- branches/lebrun/devel/lib/src/Base/Common/Makefile.am (modified) (1 diff)
- branches/lebrun/devel/lib/src/Base/Common/Pointer.hxx (modified) (7 diffs)
- branches/lebrun/devel/lib/src/Base/Common/SharedPointer.hxx (copied) (copied from trunk/lib/src/Base/Common/SharedPointer.hxx)
- branches/lebrun/devel/lib/src/Base/Func/StringXMLConverter.hxx (copied) (copied from trunk/lib/src/Base/Func/StringXMLConverter.hxx)
- branches/lebrun/devel/lib/src/Base/Func/XMLStringConverter.hxx (copied) (copied from trunk/lib/src/Base/Func/XMLStringConverter.hxx)
- branches/lebrun/devel/lib/src/Base/Func/XMLWrapperErrorHandler.cxx (copied) (copied from trunk/lib/src/Base/Func/XMLWrapperErrorHandler.cxx)
- branches/lebrun/devel/lib/src/Base/Func/XMLWrapperErrorHandler.hxx (copied) (copied from trunk/lib/src/Base/Func/XMLWrapperErrorHandler.hxx)
- branches/lebrun/devel/lib/src/Uncertainty/Distribution/ComposedCopula.cxx (modified) (3 diffs)
- branches/lebrun/devel/lib/src/Uncertainty/Distribution/ComposedCopula.hxx (modified) (1 diff)
- branches/lebrun/devel/lib/src/Uncertainty/Distribution/ExtraFunc/DistFunc.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/src/Uncertainty/Model/CopulaImplementation.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_ClaytonCopulaFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_FrankCopulaFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_GumbelCopulaFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_IdFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_LinearModelFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_NormalCopulaFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/python/config/common.am (modified) (1 diff)
- branches/lebrun/devel/python/configure.ac (modified) (3 diffs)
- branches/lebrun/devel/python/src/Makefile.am (modified) (1 diff)
- branches/lebrun/devel/python/src/SharedPointer.i (copied) (copied from trunk/python/src/SharedPointer.i)
- branches/lebrun/devel/python/src/ot.i (modified) (2 diffs)
- branches/lebrun/devel/python/test/t_ClaytonCopulaFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/python/test/t_FrankCopulaFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/python/test/t_GumbelCopulaFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/python/test/t_LinearModelFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/python/test/t_NormalCopulaFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/utils/Makefile.am (modified) (1 diff)
- branches/lebrun/devel/validation/configure.ac (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/lebrun/devel/doc/configure.ac
r971 r994 113 113 src/ReferenceGuide/Makefile 114 114 src/ContributionGuide/Makefile 115 src/ExamplesGuide/Makefile 115 116 ]) 116 117 # src/CodingRulesGuide/Makefile … … 118 119 119 120 cat <<EOT > summary 121 (doc) 120 122 EOT 121 123 cat summary branches/lebrun/devel/doc/src/DocumentationGuide/OpenTURNS_DocumentationGuide.tex
r867 r994 75 75 \begin{itemize} 76 76 \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}. 78 78 \end{itemize} 79 79 … … 89 89 \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. 90 90 \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 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 Examples Guide - Open TURNS} which applies the Global Methodology on a particular example.\\ 95 95 96 96 Some hyperlinks are present to facilitate the navigation between the documentation {\itshape Uncertainty Reference Guide - Open TURNS} and the others ones. 97 97 98 98 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 101 This 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 103 The User may find in this documentation a complete probabilistic uncertainty treatment study.\\ 105 104 106 105 The 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.\\ 107 106 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.107 Some links are present to facilitate the navigation between the documentation {\itshape Examples Guide - Open TURNS} and the {\itshape Reference Guide - Open TURNS} one. 109 108 110 109 … … 141 140 The presentation follows the steps preconised in the Global Methodology.\\ 142 141 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. 142 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. 146 143 147 144 \section{Software Source.} … … 201 198 \item {\itshape Reference Guide} : \\ 202 199 source file $OpenTURNS\_ReferenceGuide.tex$, 203 \item {\itshape Example Guide} : \\204 source file $OpenTURNS\_Example Guide.tex$.200 \item {\itshape Examples Guide} : \\ 201 source file $OpenTURNS\_ExamplesGuide.tex$. 205 202 \end{itemize} 206 203 \item[$\bullet$] {\bf TextualUserInterface} : branches/lebrun/devel/doc/src/Makefile.am
r867 r994 25 25 include $(top_srcdir)/config/common.am 26 26 27 SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual WrapperGuide GNU_free_documentation_licence ContributionGuide #CodingRulesGuide28 DIST_SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual WrapperGuide GNU_free_documentation_licence ContributionGuide #CodingRulesGuide27 SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual ExamplesGuide WrapperGuide GNU_free_documentation_licence ContributionGuide ExamplesGuide #CodingRulesGuide 28 DIST_SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual ExamplesGuide WrapperGuide GNU_free_documentation_licence ContributionGuide ExamplesGuide #CodingRulesGuide 29 29 30 30 EXTRA_DIST = logoOpenTURNS.jpg branches/lebrun/devel/doc/src/ReferenceGuide/OpenTURNS_ReferenceGuide.tex
r867 r994 1 %Copyright (c) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % 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) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % 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) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % 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) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % under the terms of the GNU Free Documentation License, Version 1.2 branches/lebrun/devel/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex
r976 r994 107 107 It 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.\\ 108 108 109 110 111 112 \subsection*{Loading the openturns python library} 113 \addcontentsline{toc}{subsection}{Loading the openturns python library} 114 109 115 In 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 : 110 116 … … 138 144 \end{center} 139 145 gives 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 152 It 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} 161 By default, the Open TURNS platform shows all the messages related to the levels DBG, WARN and ERROR.\\ 162 It 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} 165 Log.Show(Log.DBG + Log.WARN + Log.INFO) 166 \end{lstlisting} 167 \end{center} 168 In order to catch all the possible messages (highest verbosity level), the command is : 169 \begin{center} 170 \begin{lstlisting} 171 Log.Show(Log.ALL) 172 \end{lstlisting} 173 \end{center} 174 In order to catch no message (lowest verbosity level), the command is : 175 \begin{center} 176 \begin{lstlisting} 177 Log.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 140 187 141 188 The 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 : … … 188 235 where $[TAB]$ is the Tabulation touch. 189 236 237 238 239 240 241 \subsection*{Link with other python standards} 242 \addcontentsline{toc}{subsection}{Link with other python standards} 243 244 It is possible to define a NumericalPoint from a list python, as follows : 245 \begin{center} 246 \begin{lstlisting} 247 point = NumericalPoint( [1.1, 2.2, 3.3, 4.4] ) 248 \end{lstlisting} 249 \end{center} 250 251 252 It is possible to define a NumericalPoint from a tuple python, as follows : 253 \begin{center} 254 \begin{lstlisting} 255 point2 = NumericalPoint( (1.1, 2.2, 3.3, 4.4) ) 256 \end{lstlisting} 257 \end{center} 190 258 191 259 … … 347 415 We explicitate here the probability density function of the Non Central Student : 348 416 $$ 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) ^ j417 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(\delta(x-\gamma)\sqrt{\frac{2}{\nu + (x-\gamma)^2}}\right) ^ j 350 418 $$ 351 419 … … 3416 3484 3417 3485 \index{Sample Statistics!Min - Max} 3486 \index{Sample Statistics!Moments evaluation} 3418 3487 \index{Sample Statistics!Covariance} 3419 3488 \index{Sample Statistics!Skewness} … … 3654 3723 \vspace*{0.5cm} 3655 3724 3656 It is necessary to refer to the documentation {\itshape Open TURNS - Wrappers Guide} to have explanations on what constitues an Open TURNS wrapper.\\ 3725 It is necessary to refer to the documentation {\itshape Open TURNS - Wrappers Guide} to have explanations on what constitues an Open TURNS wrapper. \\ 3726 It 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. 3657 3727 3658 3728 \requirements{ … … 3681 3751 3682 3752 \begin{lstlisting} 3753 # CASE 1 : we load the wrapper file and create the NumericalMathFunction at the same time 3683 3754 # Create the limit state function 'poutre' from the wrapper 'poutre' 3684 3755 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) 3685 3762 \end{lstlisting} 3686 3763 … … 3700 3777 \item[$\bullet$]the hessian evaluation method is the centered finite difference method, with the differential increment $h=1e-4$ for each direction. 3701 3778 \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.\\3779 It is possible to change the evaluation method for the gradient or the hessian. The following Use Case shows how to proceed.\\ 3703 3780 3704 3781 The example here is the AnalyticalFunction {\itshape myAnalyticalFunction} defined by the formula : … … 3765 3842 \end{lstlisting} 3766 3843 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 3851 The 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} 3856 It is possible to change the evaluation method for the gradient or the hessian. The following Use Case shows how to proceed.\\ 3857 3858 In 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} 3861 modelePYTHON : & \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} 3868 modelePYTHON2 : & \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 3885 Python 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 3895 class 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 3911 modeleOpenTURNS = 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 3921 class 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 3936 modeleOpenTURNS2 = NumericalMathFunction(modelePYTHON2()) 3937 \end{lstlisting} 3767 3938 3768 3939 … … 4004 4175 # Give directly to the 'poutreReduced' function a gradient evaluation method 4005 4176 # thanks to the finite difference technique 4006 # For example, radient technique : non centered finite difference method4177 # For example, gradient technique : non centered finite difference method 4007 4178 myGradient = NonCenteredFiniteDifferenceGradient(NumericalPoint(2, 1.0e-7), poutreReduced.getEvaluationImplementation()) 4008 4179 print "myGradient = ", myGradient … … 4715 4886 In 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}.\\ 4716 4887 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} 4888 The 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} 4776 4897 \index{Graph Manipulation!ViewImage} 4777 4898 \index{Graph Manipulation!Show} … … 4781 4902 \requirements{ 4782 4903 \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$ 4786 4905 \item[type] : RandomVector which implementation is a CompositeRandomVector 4787 4906 \end{description} … … 4789 4908 { 4790 4909 \begin{description} 4791 \item[$\bullet$] M oments (order 1, 2, 3) of the variable of interest and its components4910 \item[$\bullet$] Mean and covariance of the variable of interest 4792 4911 \item[type] : NumericalPoint, Matrix 4793 4912 \item[$\bullet$] Importance factors from quadratical cumul method only for {\itshape output} of dimension 1 … … 4861 4980 4862 4981 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 4991 The 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 5007 Python 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 5044 This 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 5062 Python 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 4863 5092 \subsubsection{UC : Quantile estimations : Wilks and empirical estimators} 4864 5093 4865 5094 4866 \index{Quantile!Empirical estimation }5095 \index{Quantile!Empirical estimation} 4867 5096 \index{Quantile!Wilks estimation} 4868 5097 \index{Wilks} … … 5007 5236 This section gives elements to create events in the physical space {\itshape Event} and in the standard space {\itshape StandardEvent}.\\ 5008 5237 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 inputvector $(E,F,L,I)$. The event considered is :5238 The 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 : 5010 5239 $$ 5011 5240 myEvent = \{ (E,F,L,I) \in \mathbb{R}^4 / poutre(E,F,L,I) \leq -1.5\}. … … 5052 5281 This section gives elements to manipulate an {\itshape StandardEvent} in Open TURNS .\\ 5053 5282 5054 The example here is an output variable {\itshape output} defined from the limit state function {\itshape f} and the random inputvector {\itshape input}. The event considered is :5283 The 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 : 5055 5284 $$ 5056 5285 myEvent = \{ output=f(input) \leq -1.5 \}. … … 5116 5345 \requirements{ 5117 5346 \begin{description} 5118 \item[$\bullet$] the random inputvector : {\itshape input}5347 \item[$\bullet$] the input random vector : {\itshape input} 5119 5348 \item[type] : RandomVector which implementation is a UsualRandomVector 5120 5349 \item[$\bullet$] the output variable of interest : {\itshape output} of dimension 1 … … 5377 5606 \requirements{ 5378 5607 \begin{description} 5379 \item[$\bullet$] the random inputvector : {\itshape input}5608 \item[$\bullet$] the input random vector : {\itshape input} 5380 5609 \item[type] : RandomVector which implementation is a UsualRandomVector 5381 5610 \item[$\bullet$] the output variable of interest of dimension 1 : {\itshape output} … … 5712 5941 # Draw the convergence graph and the confidence intervalle of level alpha 5713 5942 # By default, alpha = 0.95 5714 alpha = 0.9 55715 convergenceGraph = myAlgo.drawProbabilityConvergence( 0.90)5943 alpha = 0.90 5944 convergenceGraph = myAlgo.drawProbabilityConvergence(alpha) 5716 5945 5717 5946 # Impose a bounding box : x-range and y-range … … 5928 6157 # Draw the convergence graph and the confidence intervalle of level alpha 5929 6158 # By default, alpha = 0.95 5930 alpha = 0.9 55931 convergenceGraph = myAlgo.drawProbabilityConvergence( 0.90)6159 alpha = 0.90 6160 convergenceGraph = myAlgo.drawProbabilityConvergence(alpha) 5932 6161 5933 6162 # Impose a bounding box : x-range and y-range … … 6014 6243 # Draw the convergence graph and the confidence intervalle of level alpha 6015 6244 # By default, alpha = 0.95 6016 alpha = 0.9 56017 convergenceGraph2 = myAlgo2.drawProbabilityConvergence( 0.90)6245 alpha = 0.90 6246 convergenceGraph2 = myAlgo2.drawProbabilityConvergence(alpha) 6018 6247 6019 6248 # Impose a bounding box : x-range and y-range … … 6157 6386 # Draw the convergence graph and the confidence intervalle of level alpha 6158 6387 # By default, alpha = 0.95 6159 alpha = 0.9 56160 convergenceGraph = myAlgo1.drawProbabilityConvergence( 0.90)6388 alpha = 0.90 6389 convergenceGraph = myAlgo1.drawProbabilityConvergence(alpha) 6161 6390 6162 6391 # Impose a bounding box : x-range and y-range … … 6232 6461 # Draw the convergence graph and the confidence intervalle of level alpha 6233 6462 # By default, alpha = 0.95 6234 alpha = 0.9 56235 convergenceGraph = myAlgo2.drawProbabilityConvergence( 0.90)6463 alpha = 0.90 6464 convergenceGraph = myAlgo2.drawProbabilityConvergence(alpha) 6236 6465 6237 6466 # Impose a bounding box : x-range and y-range … … 6274 6503 \subsection{UC : Linear and Quadratic Taylor approximations} 6275 6504 6276 \index{Response Surface!Linear Taylor approximation}6277 \index{Response Surface!Quadratic Taylor approximation}6278 \index{Response Surface!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} 6279 6508 6280 6509 This section details the first method to construct a response surface : from the linear or quadratic Taylor approximations of the function at a particular point.\\ … … 6344 6573 6345 6574 6346 \index{Response Surface!Linear least squares approximation}6575 \index{Response Surface!Linear least squares approximation} 6347 6576 \index{Random Generator} 6348 6577 … … 6405 6634 6406 6635 6407 \index{Response Surface!Linear least squares approximation}6636 \index{Response Surface!Linear least squares approximation} 6408 6637 \index{Random Generator} 6409 6638 … … 6629 6858 6630 6859 6631 6632 6633 6634 \newpage6635 \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 study6674 \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 interest6679 \begin{itemize}6680 \item Taylor variance decomposition,6681 \item Random sampling,6682 \end{itemize}6683 \item[$\bullet$] Random Study : threshold exceedance: deviation <-1cm6684 \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 method6691 \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 python6702 6703 from openturns import *6704 6705 from math import *6706 6707 from openturns_viewer import ViewImage6708 6709 # This function enables a pretty print of a NumericalPoint6710 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 oss6725 6726 6727 ###########################################6728 ### Fonction 'poutre'6729 ###########################################6730 6731 # We create a numerical math function6732 myFunction = NumericalMathFunction("poutre")6733 6734 6735 ###########################################6736 ### Random input vector6737 ###########################################6738 6739 6740 6741 dim = myFunction.getInputNumericalPointDimension()6742 6743 # We create a normal distribution point of dimension 46744 mean = NumericalPoint(dim, 0.0)6745 # E : steel : 210000 MPa6746 mean[0] = 2.1e116747 # F : 1kg : 10N
