Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes to FTLE method #1295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mateuszmatu
Copy link
Contributor

Added some small changes to the FTLE code, as described in email to Knut-Frode. The fields look similar, but values now tend to be more positive. This is more apparent for model data than for the double gyre example.
Not sure if values are 100% correct now (or if they even matter).
I expect that majority of values in a domain of real flow should be positive, as negative FTLE values describe non-chaotic flow.

for j in range(1,ny-1):
#Centering grid on particle and calculating Jacobian of flow map
J = np.zeros([2,2])
J[0,0] = (X[i+1, j]-X[i-1, j])/(2*delta)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks generally good. But is there a particular reason why you have moved calculation of Jacobian from outside of the loop and into the loop? I fear that this will give much longer computation time, as the overhead of each calculation is now repeated typically up to order of a million times (~if 1000 x 1000).
Did you notice such a slowdown?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point and yes, I noticed that it became somewhat slower. There should be a way to take it out of the loop, but I don't see how right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants