DataFieldModel¶
- class persalys.DataFieldModel(*args)¶
Defines field evaluation from external data and mesh.
- Parameters:
- namestr
Name
- meshModel
MeshModel Mesh model indexing data
- processSample
ProcessSample Field data, (optional)
Methods
Accessor to the object's name.
getId()Accessor to the object's id.
Accessor to the underlying implementation.
Mesh model accessor.
getName()Accessor to the object's name.
Process sample accessor.
Process sample accessor.
Python script accessor.
importProcessSample(*args)Data import method.
setMeshModel(meshModel)Mesh model accessor.
setName(name)Accessor to the object's name.
setProcessSample(processSample)Process sample accessor.
setSampleAsProcessSample(sample)Process sample accessor.
isValid
Examples
>>> import persalys >>> import openturns as ot >>> meshModel = persalys.GridMeshModel([persalys.Variable('t', 'date')], ot.Interval([1], [12]), [12]) >>> model = persalys.DataFieldModel('myModel', meshModel) >>> fileName = 'sample.csv' >>> sample = ot.Normal(12).getSample(30) >>> sample.exportToCSVFile(fileName) >>> model.importProcessSample(fileName, persalys.Tools.Columns)
- __init__(*args)¶
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getId()¶
Accessor to the object’s id.
- Returns:
- idint
Internal unique identifier.
- getImplementation()¶
Accessor to the underlying implementation.
- Returns:
- implImplementation
A copy of the underlying implementation object.
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getProcessSample()¶
Process sample accessor.
- Returns:
- processSample
ProcessSample Process sample containing field data.
- processSample
- getProcessSampleAsSample()¶
Process sample accessor.
- Returns:
- sample
Sample Sample (dimension n-vertices, size n-trajectories) containing field data.
- sample
- getPythonScript()¶
Python script accessor.
- Returns:
- scriptstr
Python script to replay the model.
- importProcessSample(*args)¶
Data import method.
- Parameters:
- fileNamestr
Name of the file containing field data.
- orderint
Wether data is mesh-indexed as lines or columns in the file (optional, default : persalys.Tools.Columns)
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setProcessSample(processSample)¶
Process sample accessor.
- Parameters:
- processSample
ProcessSample Process sample containing field data.
- processSample