ResInsight/GrpcInterface/Python/rips/PythonExamples/cell_result_data.py

16 lines
494 B
Python
Raw Normal View History

2020-02-28 07:38:24 -06:00
######################################################################
# This script retrieves cell result data and alters it
######################################################################
import rips
2021-01-26 13:48:01 -06:00
resinsight = rips.Instance.find()
2020-02-28 07:38:24 -06:00
view = resinsight.project.views()[0]
results = view.cell_result_data()
2021-01-26 13:48:01 -06:00
print("Number of result values: ", len(results))
2020-02-28 07:38:24 -06:00
newresults = []
for i in range(0, len(results)):
newresults.append(results[i] * -1.0)
view.set_cell_result_data(newresults)