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

Removes manual grid manipulation in VerticallyStretchedRectilinearGrid constructor #1755

Merged
merged 2 commits into from
Jun 22, 2021

Conversation

glwagner
Copy link
Member

These lines should not be there and at the least lower the accuracy of calculations on stretched grids.

We need tests that the metrics and grid geometry are correct for stretched grids (eg all the cell spacings added up gives the total domain size; cell centers are located halfway between cell interfaces, etc).

Not sure why these lines are there but it may have been necessary due to a serious bug with the vertically stretched Poisson solver that was fixed in #1541. I'm not sure.

@francispoulin
Copy link
Collaborator

This all sounds good.

Would it also be worthwhile having a test for the finite difference operator to make sure that the accuracy is correct everywhere?

@glwagner
Copy link
Member Author

glwagner commented Jun 22, 2021

The difference operator doesn't use the grid metrics --- but maybe you mean the derivative / gradient operator?

Such a test would catch this issue, it's true. We could use a simple test with linear gradients. There might already be such a test, but not for all grids... ?

I think the fact that the cell spacings don't add up to the grid size could be an even worse problem because it means that integrals / budgets are not correct. But I'm not sure since the spacings at cell centers might be more important (these lines only manipulate the spacing at cell interfaces).

@glwagner
Copy link
Member Author

Tests pass so I guess we don't need these lines.

Copy link
Collaborator

@navidcy navidcy left a comment

Choose a reason for hiding this comment

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

please bump up minor version

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.

None yet

3 participants