Skip to content

Commit

Permalink
Patch integrate and average to properly expand cartesian coordsystems
Browse files Browse the repository at this point in the history
  • Loading branch information
kburns committed Feb 16, 2022
1 parent 18c0cdf commit 336b993
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dedalus/core/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,9 @@ def _preprocess_args(cls, operand, coord=None):
# Integrate over all operand bases by default
if coord is None:
coord = [basis.coordsystem for basis in operand.domain.bases]
# Split Cartesian coordinates
if isinstance(coord, coords.CartesianCoordinates):
coord = coord.coords
# Recurse over multiple coordinates
if isinstance(coord, (tuple, list)):
if len(coord) > 1:
Expand Down Expand Up @@ -1162,6 +1165,9 @@ def _preprocess_args(cls, operand, coord=None):
# Average over all operand bases by default
if coord is None:
coord = [basis.coordsystem for basis in operand.domain.bases]
# Split Cartesian coordinates
if isinstance(coord, coords.CartesianCoordinates):
coord = coord.coords
# Recurse over multiple coordinates
if isinstance(coord, (tuple, list)):
if len(coord) > 1:
Expand Down

0 comments on commit 336b993

Please sign in to comment.