lagrangian-filtering icon indicating copy to clipboard operation
lagrangian-filtering copied to clipboard

Allow for data-dependent filters

Open angus-g opened this issue 4 years ago • 0 comments

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_kernel to optionally support sampling more variables in the initial condition stage than the advection stage
  • [x] Read the data from the initial_kernel by 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_filter in a usable manner

Documentation

  • [x] Example for vorticity-based cutoff
  • [ ] General API for alternative filters (i.e. attaching them as the .inertial_filter member)

angus-g avatar Nov 12 '21 03:11 angus-g