OpenTURNSPythonPointToFieldFunction

class OpenTURNSPythonPointToFieldFunction(inputDim, outputMesh, outputDim)

Override PointToFieldFunction from Python.

Parameters:
inputDim : positive int

Dimension of the input vector d

outputMesh : Mesh

The output mesh

outputDim : positive int

Dimension of the output field values d’

Notes

You have to overload the function:
_exec(X): single evaluation, X is a Field, returns a Field

Examples

>>> import openturns as ot
>>> class FUNC(ot.OpenTURNSPythonPointToFieldFunction):
...     def __init__(self):
...         mesh = ot.RegularGrid(0.0, 0.1, 11)
...         super(FUNC, self).__init__(2, mesh, 2)
...         self.setInputDescription(['R', 'S'])
...         self.setOutputDescription(['T', 'U'])
...     def _exec(self, X):
...         size = self.getOutputMesh().getVerticesNumber()
...         Y = [ot.Point(X)*i for i in range(size)]
...         return Y
>>> F = FUNC()

Methods

__call__  
getInputDescription  
getInputDimension  
getOutputDescription  
getOutputDimension  
getOutputMesh  
setInputDescription  
setOutputDescription  
__init__(inputDim, outputMesh, outputDim)

Initialize self. See help(type(self)) for accurate signature.