Forked from
agnumpde / dune-tectonic
89 commits ahead of the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
slip_endings.py~ 272 B
import numpy as np
def slip_endings(x) :
# returns indicies i for which x[i-1]>0 and x[i]=0
starts = np.array([])
prev = False
for i in range(len(x)) :
if (prev and not x[i]) :
starts.append(i)
prev = x[i]
return starts