OpenTURNSPythonFieldToPointFunction¶
-
class
OpenTURNSPythonFieldToPointFunction
(inputMesh, inputDim, outputDim)¶ Override FieldToPointFunction from Python.
- Parameters
- inputMesh
Mesh
The input mesh
- inputDimpositive int
Dimension of the input field values d
- outputDimpositive int
Dimension of the output vector d’
- inputMesh
Notes
Examples
>>> import openturns as ot >>> mesh = ot.Mesh(1) >>> class FUNC(ot.OpenTURNSPythonFieldToPointFunction): ... def __init__(self): ... # first argument: ... super(FUNC, self).__init__(mesh, 2, 2) ... self.setInputDescription(['R', 'S']) ... self.setOutputDescription(['T', 'U']) ... def _exec(self, X): ... Y = ot.Sample(X).computeMean() ... return Y >>> F = FUNC()
Methods
__call__
(self, X)Call self as a function.
getInputDescription
getInputDimension
getInputMesh
getOutputDescription
getOutputDimension
setInputDescription
setOutputDescription
-
__init__
(self, inputMesh, inputDim, outputDim)¶ Initialize self. See help(type(self)) for accurate signature.