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

More memory-efficient temporal interpolation for fluid velocity #58

Open
mountaindust opened this issue Oct 20, 2022 · 2 comments
Open

Comments

@mountaindust
Copy link
Owner

While the memory management updates in v0.5.2 helped, the real problem is that spline objects are huge, and creating a spline across all of the temporal fluid velocity data (potentially many time points) is extremely expensive to store. The result is that 3D temporally varying fluid velocities are currently impractical to work with unless the number of time points is small (or the fluid grid is coarse enough).

The most obvious solution is to calculate a spline consisting of only one polynomial - the currently needed one. Since we are using cublic splines, this will be the spline using the two data sets on either side of the current time (four in total). It then gets recalculated every time the calling function advances past a time point with fluid data associated with it.

@mountaindust
Copy link
Owner Author

Will need to:

  • Keep track of all of the time points represented by the data
  • Keep track of time points currently loaded
  • Implement property getter for fluid that checks availability and loads data on demand
  • Implement lazy disc read instead of reading in all the data and then replacing with spline like we are now

@mountaindust
Copy link
Owner Author

We should address #55 as part of this.

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

No branches or pull requests

1 participant