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

Refactoring with utility functions #14

Merged
merged 4 commits into from
Feb 29, 2024
Merged

Refactoring with utility functions #14

merged 4 commits into from
Feb 29, 2024

Conversation

havogt
Copy link
Collaborator

@havogt havogt commented Feb 29, 2024

No description provided.

@havogt havogt marked this pull request as draft February 29, 2024 13:18
@@ -190,62 +97,28 @@ def main():
cv[:, 0] = cv[:, N]
h[:, N] = h[:, 0]
cu[1:, N] = cu[1:, 0]
z[1:, N] = z[1:, 0]
z[1:, 0] = z[1:, N]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only functional changes

h: gtscript.Field[dtype]
):
with computation(PARALLEL), interval(...):
h = p + 0.25 * (u[1,0,0] * u[1,0,0] + u * u + v[0,1,0] * v[0,1,0] + v * v)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parens where missing

@@ -362,19 +249,22 @@ def copy_var(
cv[:, 0,0] = cv[:, N,0]
h[:, N,0] = h[:, 0,0]
cu[1:, N,0] = cu[1:, 0,0]
z[1:, N,0] = z[1:, 0,0]
z[1:, 0,0] = z[1:, N,0]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy paste error from swm_numpy

@havogt havogt marked this pull request as ready for review February 29, 2024 14:16
@cenamiller cenamiller merged commit 4231fef into main Feb 29, 2024
1 check 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.

2 participants