Skip to content

Periodic wraparound #47

@xtalax

Description

@xtalax

Periodic boundaries are currently implemented with a relation u[1] ~ u[end], and u[end] is on the interior. The boundary upwinding leads to instability on the upper index with the brusselator, so we need to move to wrapping around at the boundary so that the centered stencil is always used.

I'm doing this by creating a Val{Bool} ecapsulating whether a dimension is periodic in #45 and indexing through a function that dispatches on Val{true} and Val{false}, hopefully leading to the compiler removing this check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions