Skip to content

Commit

Permalink
Modify default ncc and entry cutoffs to more performant values
Browse files Browse the repository at this point in the history
hg hash: 1e1bc32f41bc325d47e92f576c18efa1ad2a4057
  • Loading branch information
kburns committed Apr 22, 2020
1 parent ce8c131 commit 7efb884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions dedalus/core/problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ class ProblemBase:
variables : list of str
List of variable names, e.g. ['u', 'v', 'w']
ncc_cutoff : float, optional
Mode amplitude cutoff for LHS NCC expansions (default: 1e-10)
Mode amplitude cutoff for LHS NCC expansions (default: 1e-6)
max_ncc_terms : int, optional
Maximum terms to include in LHS NCC expansions (default: None (no limit))
entry_cutoff : float, optional
Matrix entry cutoff to avoid fill-in from cancellation errors (default: 1e-12)
Attributes
----------
Expand All @@ -100,7 +102,7 @@ class ProblemBase:
"""

def __init__(self, domain, variables, ncc_cutoff=1e-10, max_ncc_terms=None, entry_cutoff=0):
def __init__(self, domain, variables, ncc_cutoff=1e-6, max_ncc_terms=None, entry_cutoff=1e-12):
self.domain = domain
self.variables = variables
self.nvars = len(variables)
Expand Down
6 changes: 3 additions & 3 deletions examples/bvp/1d_lane_emden/lane_emden.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@

# Parameters
Nx = 128
n = 3.25
ncc_cutoff = 1e-4
tolerance = 1e-8
n = 3.0
ncc_cutoff = 1e-6
tolerance = 1e-12

# Build domain
x_basis = de.Chebyshev('x', Nx, interval=(0, 1), dealias=2)
Expand Down

0 comments on commit 7efb884

Please sign in to comment.