1%feature("docstring") OT::P1LagrangeEvaluation 2"Data based math evaluation implementation. 3 4Available constructors: 5 6 P1LagrangeEvaluation(*field*) 7 8Parameters 9---------- 10field : :class:`~openturns.Field` 11 Field :math:`\cF` defining the parameters of a P1 Lagrange interpolation function. 12 13See also 14-------- 15Function, AggregatedEvaluation, DualLinearCombinationEvaluation, 16LinearFunction 17 18Notes 19----- 20It returns a :class:`~openturns.Function` that implements the P1 Lagrange interpolation function :math:`f : \cD_N \rightarrow \Rset^p` : 21 22.. math:: 23 \forall \vect{x} \in \Rset^n, f(\vect{x}) = \sum_{\vect{\xi}_i\in\cV(\vect{x})}\alpha_i f(\vect{\xi}_i) 24 25where :math:`\cD_N` is a :class:`~openturns.Mesh`, :math:`\cV(\vect{x})` is the simplex in :math:`\cD_N` that contains :math:`\vect{x}`, :math:`\alpha_i` are the barycentric coordinates of :math:`\vect{x}` wrt the vertices :math:`\vect{\xi}_i` of :math:`\cV(\vect{x})`: 26 27.. math:: 28 \vect{x}=\sum_{\vect{\xi}_i\in\cV(\vect{x})}\alpha_i\vect{\xi}_i 29 30Examples 31-------- 32Create a P1 Lagrange evaluation: 33 34>>> import openturns as ot 35>>> field = ot.Field(ot.RegularGrid(0.0, 1.0, 4), [[0.5], [1.5], [1.0], [-0.5]]) 36>>> evaluation = ot.P1LagrangeEvaluation(field) 37>>> print(evaluation([2.3])) 38[0.55]" 39// --------------------------------------------------------------------- 40 41%feature("docstring") OT::P1LagrangeEvaluation::getField 42"Accessor to the field defining the functions. 43 44Returns 45------- 46field : :class:`~openturns.Field` 47 The field defining the function." 48 49// --------------------------------------------------------------------- 50 51%feature("docstring") OT::P1LagrangeEvaluation::setField 52"Accessor to the field defining the functions. 53 54Parameters 55---------- 56field : :class:`~openturns.Field` 57 The field defining the function." 58