Skip to content

More intuitive way to prescribe Flat topology on grids #4099

@navidcy

Description

@navidcy

At the moment when we build a grid, the topology kwarg requires all 3 dimensions! For example, to build a 2D grid we do something like:

grid = RectilinearGrid(size=(16, 16),
                       x=(0, 2π),
                       y=(0, 2π),
                       topology = (Periodic, Periodic, Flat))

But requiring that third 3rd topology with Flat might seem a bit counterintuitive?

I'd think that by doing this:

grid = RectilinearGrid(size=(16, 16),
                       x=(0, 2π),
                       y=(0, 2π),
                       topology = (Periodic, Periodic))

then given that I prescribed x and y but not z the constructor should be able to figure out which are the non-Flat dimensions?

Would that be more intuitive you reckon?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions