dougshidong / PHiLiP

Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
Other
45 stars 36 forks source link

Bound preserving limiters #236

Closed ssaishruthi98 closed 6 months ago

ssaishruthi98 commented 1 year ago

This PR is to incorporate bound-preserving limiters. It includes:

  1. Maximum-Principle-Satisfying Limiter
  2. Positivity-Preserving Limiter (2010)
  3. Positivity-Preserving Limiter (2011)
  4. TVD/TVB Limiter

Added test cases to verify implementation. Cases include 1D & 2D Linear Advection, 1D & 2D Burgers', Sod Shock Tube, and the Leblanc Shock Tube case. OOA tests are all commented out. Ran ctest and all cases succeeded (except known issues).

dougshidong commented 1 year ago

Is there any way for you to extract the limiter logic in a separate class? The DG class is already quite bloated and we're adding another 700 lines of code here. Right now we're using the DG class as some sort of object to hold global variables. Ideally, we would want to pass only the required inputs and return the solution with the limiteres applied.

sonarcloud[bot] commented 10 months ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

No Coverage information No Coverage information
6.0% 6.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

jbrillon commented 6 months ago

@ssaishruthi98 if there is nothing else to fix, post a text file with the ctest results and we can approve/merge it if everything is good

sonarcloud[bot] commented 6 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
9.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

ssaishruthi98 commented 6 months ago

Ran ctest and had a few failing tests: LastTestsFailed-20240226.log

Changed the parameter to GLL nodes for the Sod case and changed MPIMAX to 4 and reran failed tests: LastTestsFailed-20240227.log

The remaining failures are all known issues with the exception of the 2D_SUM_FACTORIZATION_HADAMARD_TEST. The 2D_SUM_FACTORIZATION_HADAMARD_TEST test fails sometimes and passes sometimes but I tested this on master and it has similar behaviour.

jbrillon commented 6 months ago

@dougshidong can we resolve your requested changes so that it can get merged?

dougshidong commented 6 months ago

Resolved. Thanks for the PR and the feedback implementations.