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

Filtering #978

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft

Filtering #978

wants to merge 19 commits into from

Conversation

krenzland
Copy link
Contributor

@krenzland krenzland commented Oct 19, 2023

This PR adds filtering to SeisSol (compare with the filtering section in Hesthaven's Nodal DG book).
The idea is to decrease the coefficients of the high-order terms of the modal basis.

For matrix computation, refer to: SeisSol/Matrices#10

Filtering works (and is tested to some extent):

  • Volume kernel
  • Local flux
  • Neighbor flux
  • Initial condition
  • Point sources
  • Using a filtering matrix instead of the resample matrix for the slip rate
  • Dynamic rupture flux
  • Nodal flux (used for some boundary conditions
  • Source terms
  • Viscoelasticity

Works on the following architectures:

  • CPUs
  • GPUs

You can use it like this in the config file:

&DynamicRupture
filtertype = 'none' ! none or exponential, exponential activates it
filterorder = 32 ! 32 is a good starting value, 16 increases dissipation

&Discretization
filtertype = 'exponential'
filterorder = 32

@vikaskurapati
Copy link
Contributor

Testing the current version of filtering with point source simulations. Slices are taken through the source and there is a lot of noise when u-velocity is shown near the source.
without_filter
After applying an exponential filter with order 32
with_filter
We notice that there is lesser noise around the source now, even though not perfect, the noise decreases

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

Attention: 128 lines in your changes are missing coverage. Please review.

Comparison is base (f695369) 14.33% compared to head (3de10a0) 14.22%.

Files Patch % Lines
src/Kernels/Filter.cpp 0.00% 60 Missing ⚠️
src/Initializer/GlobalData.cpp 0.00% 29 Missing ⚠️
src/DynamicRupture/Parameters.h 0.00% 12 Missing ⚠️
src/Initializer/InputParameters.cpp 0.00% 11 Missing ⚠️
...ynamicRupture/FrictionLaws/LinearSlipWeakening.cpp 0.00% 6 Missing ⚠️
src/SourceTerm/Manager.cpp 0.00% 4 Missing ⚠️
src/DynamicRupture/FrictionLaws/FrictionSolver.h 0.00% 2 Missing ⚠️
.../DynamicRupture/FrictionLaws/LinearSlipWeakening.h 0.00% 2 Missing ⚠️
src/Kernels/Filter.h 0.00% 1 Missing ⚠️
src/SeisSol.cpp 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #978      +/-   ##
==========================================
- Coverage   14.33%   14.22%   -0.12%     
==========================================
  Files         253      255       +2     
  Lines       14303    14423     +120     
==========================================
  Hits         2051     2051              
- Misses      12252    12372     +120     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krenzland
Copy link
Contributor Author

krenzland commented Nov 30, 2023

I've made some changes and now the PR only filters the residuals. This is more correct and also results in 0% overhead compared to no filtering. Hence, disregard the images above this comment.
No support for GPUs and some updates required by some boundary conditons. Only tested for elasticity but should work for other materials (except visoelasticity).

As this is my last day at TUM, @vikaskurapati is going to take this over.

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

Successfully merging this pull request may close these issues.

None yet

3 participants