Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid Ops and SW refactor #48

Merged
merged 2 commits into from
Aug 1, 2023
Merged

Grid Ops and SW refactor #48

merged 2 commits into from
Aug 1, 2023

Conversation

jejjohnson
Copy link
Owner

Updated the Linear and NonLinear SW example using the functional API. (Later we can add a higher-level API).

Interp API

u: Array["Nx Ny"]  = ...
u: Array["Nx-1 Ny"]  = grid.interp(u: Array = u, axis: int=0, method: str="linear")

Difference API

This will take the finite difference method given an axis

# init field and domain
u: Array["Nx Ny"] = ...
domain: Domain = ...
# take the difference
u: Array["Nx-1 Ny"]  = grid.difference(u: Array = u, step_size: int=domain.dx[0], axis: int=0, method: str="right")

@jejjohnson jejjohnson merged commit c654c25 into main Aug 1, 2023
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant