OpenTURNSPythonFieldToPointFunction

class OpenTURNSPythonFieldToPointFunction(inputMesh, inputDim, outputDim)

Override FieldToPointFunction from Python.

Parameters
inputMeshMesh

The input mesh

inputDimpositive int

Dimension of the input field values d

outputDimpositive int

Dimension of the output vector d’

Notes

You have to overload the function:

_exec(X): single evaluation, X is a Field, returns a Field

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.