-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow for data-dependent filters #76
Open
angus-g
wants to merge
9
commits into
master
Choose a base branch
from
vorticity-filtering
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With the impending addition of yet another filter, it will get a bit too confusing to have them all in a single file. This change shouldn't affect functionality, even if the filters were being accessed directly.
angus-g
force-pushed
the
vorticity-filtering
branch
4 times, most recently
from
November 16, 2021 07:35
fea0208
to
074cc81
Compare
Instead of sampling these variables every timestep during the advection phase, these variables (e.g. for data-dependent filtering) only need to be sampled once, at the "middle" timestep. We mkae sure they're present in our particle class and the initial sampling kernel, but they're not stored as part of our advection. Currently, this implementation does nothing more than populate this variable on the particles.
This uses a bit of a complicated system, with a Placeholder class that denotes a variable is slated to be written, but hasn't yet been written. When it has been written, we distinguish between what will be continuously written by noticing it has two dimensions.
These variables could be used to construct on-the-fly filters.
We also export all the filters in __all__, so they can be picked up by `from filter import *`, and perhaps more importantly, by sphinx.
Currently fails because the initially sampled data is all zero!
This isn't a particularly functional test: we just ensure that if we specify a data-dependent filter, it is able to actually filter some input data according to a statically-sampled variable, and create the filters on-the-fly.
angus-g
force-pushed
the
vorticity-filtering
branch
from
November 17, 2021 02:43
074cc81
to
904cf19
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
sample_kernel
to optionally support sampling more variables in the initial condition stage than the advection stageinitial_kernel
by teaching the particle cache about "once variables"apply_filter
apply_filter
, based on the extra data, and apply them as usualTests
apply_filter
in a usable mannerDocumentation
.inertial_filter
member)