Skip to content

Commit

Permalink
reduce tol
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisZYJ committed Oct 3, 2024
1 parent 733d758 commit 6e6fd7f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions toolchain/mfc/test/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,21 +213,27 @@ def __str__(self) -> str:
return f"tests/[bold magenta]{self.get_uuid()}[/bold magenta]: {self.trace}"

def compute_tolerance(self) -> float:

tolerance = 1e-12

if self.params.get("hypoelasticity", 'F') == 'T':
return 1e-7
tolerance = 1e-7

if any(self.params.get(key, 'F') == 'T' for key in ['relax', 'ib', 'qbmm', 'bubbles']):
return 1e-10
tolerance = 1e-10

if self.params.get("low_Mach", 'F') == 1 or self.params.get("low_Mach", 'F') == 2:
return 1e-10
tolerance = 1e-10

if self.params.get("acoustic_source", 'F') == 'T':
if "acoustic(1)%pulse" in self.params and self.params["acoustic(1)%pulse"] == 3: # Square wave
return 1e-5
return 3e-12
tolerance = 1e-5
tolerance = 3e-12

if self.params["weno_order"] == 7:
tolerance = 1e-11

return 1e-12
return tolerance

@dataclasses.dataclass
class TestCaseBuilder:
Expand Down

0 comments on commit 6e6fd7f

Please sign in to comment.