OpenTURNSPythonFieldFunction¶
-
class
OpenTURNSPythonFieldFunction
(inputMesh, inputDim, outputMesh, outputDim)¶ Override FieldFunction from Python.
- Parameters
Notes
Examples
>>> import openturns as ot >>> mesh = ot.Mesh(1) >>> class FUNC(ot.OpenTURNSPythonFieldFunction): ... def __init__(self): ... # first argument: ... super(FUNC, self).__init__(mesh, 2, mesh, 2) ... self.setInputDescription(['R', 'S']) ... self.setOutputDescription(['T', 'U']) ... def _exec(self, X): ... Y = ot.Field(self.getOutputMesh(), X.getValues() * ([2.0]*X.getValues().getDimension())) ... return Y >>> F = FUNC()
Create the associated FieldFunction:
>>> myFunc = ot.FieldFunction(F)
Methods
__call__
(X)Call self as a function.
getInputDescription
getInputDimension
getInputMesh
getOutputDescription
getOutputDimension
getOutputMesh
setInputDescription
setOutputDescription
-
__init__
(inputMesh, inputDim, outputMesh, outputDim)¶ Initialize self. See help(type(self)) for accurate signature.