OpenTURNSPythonPointToFieldFunction

class OpenTURNSPythonPointToFieldFunction(n=0, p=0, s=0)

Override PointToFieldFunction from Python.

Parameters:

inputDim : positive int

Dimension of the input field values d

outputDim : positive int

Dimension of the output vector d’

spatialDim : positive integer

Dimension of the input domain n

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):
...         super(FUNC, self).__init__(2, 2)
...         self.setInputDescription(['R', 'S'])
...         self.setOutputDescription(['T', 'U'])
...         self.mesh_ = ot.RegularGrid(0.0, 0.1, 11) 
...     def _exec(self, X):
...         size = self.mesh_.getVerticesNumber()
...         values = [ot.Point(X)*i for i in range(size)]
...         Y = ot.Field(self.mesh_, values)
...         return Y
>>> F = FUNC()

Methods

__call__(…) <==> x(…)
getInputDescription()
getInputDimension()
getOutputDescription()
getOutputDimension()
getSpatialDimension()
setInputDescription(descIn)
setOutputDescription(descOut)
__init__(n=0, p=0, s=0)

x.__init__(…) initializes x; see help(type(x)) for signature