DedalusProject / dedalus

A flexible framework for solving PDEs with modern spectral methods.
http://dedalus-project.org/
GNU General Public License v3.0
489 stars 115 forks source link

local_group_arrays #285

Closed csskene closed 3 months ago

csskene commented 6 months ago

Hi I've noticed that local_group_arrays now returns an error. When running m, ell, *_ = d.coeff_layout.local_group_arrays(b.domain,scales=1) I get an error when the function tries to find the chunk_shape

 chunk_shape = domain.chunk_shape(self)

                  ^^^^^^^^^^^^^^^^^^

AttributeError: 'CachedMethod' object has no attribute 'chunk_shape'

Attached is a small example that exhibits this problem Thanks, Calum group_arrays.txt

csskene commented 3 months ago

Just realised that this issue is due to changes in Dedalus. My example can be fixed by changing

m, ell, *_ = d.coeff_layout.local_group_arrays(b.domain,scales=1)

to

m, ell, *_ = d.coeff_layout.local_group_arrays(b.domain(d), scales=1)

This fixes things as now b.domain is a method that takes the distributor as an argument.