lagrangian-filtering
lagrangian-filtering copied to clipboard
Allow for data-dependent filters
The previously-added spatially-varying filter (#70) supports variable filter frequencies that are statically initialised. It may also be the case that we want to filter based on some kind of time-varying variable, such as the vorticity. Here, we'll teach the filter library how to handle this case.
General tasks
- [x] Split out the filters to individual files
- [x] Generalise the
sample_kernelto optionally support sampling more variables in the initial condition stage than the advection stage - [x] Read the data from the
initial_kernelby teaching the particle cache about "once variables" - [x] Pass the extra sampled data through
apply_filter - [x] Construct the filters in
apply_filter, based on the extra data, and apply them as usual
Tests
- [ ] Test the initial data kernel works as expected
- [ ] Read data off the particle class directly
- [x] Make sure the data is written to the advection cache (before the first advection step after the sampling pass)
- [x] Test that the initial data is passed through to
apply_filterin a usable manner
Documentation
- [x] Example for vorticity-based cutoff
- [ ] General API for alternative filters (i.e. attaching them as the
.inertial_filtermember)