Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PyMPDATA/impl/formulae_antidiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

result += tmp

if n_dims > 1:
if n_dims > 1 and not dimensionally_split:

Check warning on line 131 in PyMPDATA/impl/formulae_antidiff.py

View check run for this annotation

Codecov / codecov/patch

PyMPDATA/impl/formulae_antidiff.py#L131

Added line #L131 was not covered by tests
tmp = (
atv(*g_c, 1, 0.5)
+ atv(*g_c, 0, 0.5)
Expand Down
19 changes: 12 additions & 7 deletions PyMPDATA/impl/formulae_nonoscillatory.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def apply(_traversal_data, _psi_extrema, _psi):

at_idx = INNER if traversals.n_dims == 1 else OUTER
formulae = (
__make_psi_extrema(options.jit_flags, traversals.n_dims, idx.ats[at_idx]),
__make_psi_extrema(
options.jit_flags, traversals.n_dims, idx.ats[at_idx], options
),
None,
None,
)
Expand Down Expand Up @@ -55,8 +57,8 @@ def apply(traversals_data, psi_extrema, psi):
return apply


def __make_psi_extrema(jit_flags, n_dims, ats):
if n_dims == 1:
def __make_psi_extrema(jit_flags, n_dims, ats, options):
if n_dims == 1 or options.dimensionally_split:

@numba.njit(**jit_flags)
def _impl(psi, extremum):
Expand Down Expand Up @@ -118,7 +120,7 @@ def apply(_traversal_data, _beta, _flux, _psi, _psi_extrema, _g_factor):
ats=idx.ats[at_idx],
atv=idx.atv[at_idx],
non_unit_g_factor=non_unit_g_factor,
epsilon=options.epsilon,
options=options,
),
None,
None,
Expand Down Expand Up @@ -147,8 +149,11 @@ def apply(traversals_data, beta, flux, psi, psi_extrema, g_factor):
return apply


def __make_beta(*, jit_flags, n_dims, ats, atv, non_unit_g_factor, epsilon):
if n_dims == 1:
def __make_beta(*, jit_flags, n_dims, ats, atv, non_unit_g_factor, options):
epsilon = options.epsilon
dimensionally_split = options.dimensionally_split

if n_dims == 1 or dimensionally_split:

@numba.njit(**jit_flags)
def denominator(flux, sign):
Expand Down Expand Up @@ -199,7 +204,7 @@ def g_fun(arg):
def g_fun(_):
return 1

if n_dims == 1:
if n_dims == 1 or dimensionally_split:

@numba.njit(**jit_flags)
# pylint: disable=too-many-arguments
Expand Down
Loading