diff --git a/dedalus/core/arithmetic.py b/dedalus/core/arithmetic.py index 8a13366a..a3ee79a5 100644 --- a/dedalus/core/arithmetic.py +++ b/dedalus/core/arithmetic.py @@ -691,7 +691,7 @@ def __init__(self, arg0, arg1, out=None, **kw): if arg0.tensorsig[0].dim != 3: raise ValueError("CrossProduct requires 3-component vector fields.") # FutureField requirements - self.domain = Domain(arg0.dist, self._build_bases(arg0, arg1)) + self.domain = Domain(arg0.dist, self._build_bases(arg0, arg1, **kw)) self.tensorsig = arg0.tensorsig self.dtype = np.result_type(arg0.dtype, arg1.dtype) # Setup ghost broadcasting diff --git a/dedalus/core/basis.py b/dedalus/core/basis.py index 0791f470..68ba5a6e 100644 --- a/dedalus/core/basis.py +++ b/dedalus/core/basis.py @@ -533,8 +533,9 @@ def __mul__(self, other): return self if isinstance(other, Jacobi): if self.grid_params == other.grid_params: - # Everything matches except size, a, b + # Take maximum size size = max(self.size, other.size) + # Take grid (a0, b0) for minimal conversions a = self.a0 b = self.b0 return self.clone_with(size=size, a=a, b=b) @@ -548,8 +549,9 @@ def __rmatmul__(self, other): return self if isinstance(other, Jacobi): if self.grid_params == other.grid_params: - # Everything matches except size, a, b + # Take maximum size size = max(self.size, other.size) + # Take operand (a, b) for minimal conversions a = self.a b = self.b return self.clone_with(size=size, a=a, b=b)