Skip to content

Commit

Permalink
Update tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
kburns committed Jan 8, 2024
1 parent 68dcb74 commit c5ae610
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 95 deletions.
2 changes: 1 addition & 1 deletion dedalus/core/distributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def local_grids(self, *bases, scales=None):

def local_modes(self, basis):
# TODO: remove from bases and do it all here?
return basis.local_modes()
return basis.local_modes(self)

@CachedAttribute
def default_nonconst_groups(self):
Expand Down
5 changes: 3 additions & 2 deletions dedalus/extras/plot_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(self, field, axis):
self.field = field
self.axis = axis
self.basis = field.domain.bases[axis]
self.dist = field.dist

@property
def label(self):
Expand All @@ -45,9 +46,9 @@ def label(self):
def __getitem__(self, item):
if self.field.layout.grid_space[self.axis]:
scale = self.field.scales[self.axis]
return self.basis.global_grid(scale).ravel()
return self.basis.global_grid(self.dist, scale).ravel()
else:
return self.basis.local_modes().ravel()
return self.dist.local_modes(self.basis).ravel()


def plot_bot(dset, image_axes, data_slices, image_scales=(0,0), clim=None, even_scale=False, cmap='RdBu_r', axes=None, figkw={}, title=None, func=None, visible_axes=True):
Expand Down
22 changes: 9 additions & 13 deletions docs/notebooks/dedalus_tutorial_1.ipynb

Large diffs are not rendered by default.

71 changes: 30 additions & 41 deletions docs/notebooks/dedalus_tutorial_2.ipynb

Large diffs are not rendered by default.

41 changes: 29 additions & 12 deletions docs/notebooks/dedalus_tutorial_3.ipynb

Large diffs are not rendered by default.

43 changes: 17 additions & 26 deletions docs/notebooks/dedalus_tutorial_4.ipynb

Large diffs are not rendered by default.

0 comments on commit c5ae610

Please sign in to comment.