fix: remove cutoff_fraction from Hou-Li filter, use correct h/h_max f…#258
Open
fix: remove cutoff_fraction from Hou-Li filter, use correct h/h_max f…#258
Conversation
…ormula The previous implementation applied σ = exp(-strength*(h/h_cutoff)^order) only above a cutoff threshold, where h_cutoff = cutoff_fraction * h_max. This had two bugs: 1. With cutoff_fraction=1.0 (a natural "no cutoff" choice), h never exceeded h_cutoff so the filter was silently disabled entirely. 2. The formula should use h/h_max, not h/h_cutoff, to match the standard Hou-Li (2007) filter: σ(h) = exp(-strength * (h/h_max)^order). Fix: remove cutoff_fraction entirely, always apply the filter to all modes using h/h_max. The filter naturally acts on all modes with σ→0 at h=h_max and σ=1 at h=0, requiring no explicit cutoff threshold. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The filter was previously applied only to dCk/dt from the nonlinear term, leaving the linear free-streaming cascade (Lawson-RK4 exponential operators) completely unfiltered. High Hermite modes filled up unchecked. Now the filter is passed to SplitStepDampingSolver and applied as a multiplicative split step to the full state after each timestep, in the same pattern as sponge boundary damping. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
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.
…ormula
The previous implementation applied σ = exp(-strength*(h/h_cutoff)^order) only above a cutoff threshold, where h_cutoff = cutoff_fraction * h_max. This had two bugs:
Fix: remove cutoff_fraction entirely, always apply the filter to all modes using h/h_max. The filter naturally acts on all modes with σ→0 at h=h_max and σ=1 at h=0, requiring no explicit cutoff threshold.