#4867 Rename python examples to avoid mixed case

This commit is contained in:
Gaute Lindkvist
2019-10-15 16:04:06 +02:00
parent d21afc5a41
commit bc8134009b
25 changed files with 20 additions and 26 deletions

View File

@@ -0,0 +1,27 @@
###########################################################################################
# This example will synchronously calculate the average value for SOIL for all time steps
###########################################################################################
import rips
import itertools
import time
resinsight = rips.Instance.find()
start = time.time()
# Get the case with case id 0
case = resinsight.project.case(case_id=0)
# Get a list of all time steps
time_steps = case.time_steps()
averages = []
for i in range(0, len(time_steps)):
# Get a list of all the results for time step i
results = case.active_cell_property('DYNAMIC_NATIVE', 'SOIL', i)
mysum = sum(results)
averages.append(mysum/len(results))
end = time.time()
print("Time elapsed: ", end - start)
print(averages)