-
Notifications
You must be signed in to change notification settings - Fork 369
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
Changing computation at inflow/outflow for tensor solve #1235
Changing computation at inflow/outflow for tensor solve #1235
Conversation
…to inflow_tensor
…to inflow_tensor
…to inflow_tensor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just two minor comments.
Array2D<BoundCond,0,2*AMREX_SPACEDIM-1,0,AMREX_SPACEDIM-1> bct; | ||
for (OrientationIter face; face; ++face) { | ||
Orientation ori = face(); | ||
for (int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be slightly more efficient to do
for (int icomp ...)
for (OrientationIter ...)
Could you switch the looping order here at similar other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review!! I did the changes as suggested.
## Summary Correcting tensor cross terms computation for periodic bcs ## Additional background Fixing a bug introduced in PR #1235. Now it computes in the correct way the cross terms in the tensor solve for problems with periodic bcs. ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [x] changes answers in the test suite to more than roundoff level - [x] are likely to significantly affect the results of downstream AMReX users - [ ] are described in the proposed changes to the AMReX documentation, if appropriate
ParmParse parameter eb2.extend_domain_face is now true by default. The reason for the change is that for most applications it's hard to imagine one would want it to be false. It will also solve the EB tensor solver issue when there is a cut cell just outside the domain abutting a covered valid cell. Recent changes to the tensor solvers are incorrect and are reverted here. They are incorrect because the ghost cells in the modified functions actually have values at the cell centered. Although the users put domain face values in the ghost cells, that is not what the solver does. The solver stores the boundary values in boundary registers. Before the stencil is being applied, bc function is called to fill the ghost cells with properly interpolated or extrapolated values so that the stencil operations are just like working on normal interior cells. Revert "Correcting tensor cross terms computation for periodic bcs (AMReX-Codes#1254)" This reverts commit 1197adc. Revert "Changing computation at inflow/outflow for tensor solve (AMReX-Codes#1235)" This reverts commit b391885. Revert "Changing computation at outflow for the EBTensor (AMReX-Codes#1187)" This reverts commit 9cd5388.
## Summary ParmParse parameter eb2.extend_domain_face is now true by default. The reason for the change is that for most applications it's hard to imagine one would want it to be false. It will also solve the EB tensor solver issue when there is a cut cell just outside the domain abutting a covered valid cell. Recent changes to the tensor solvers are incorrect and are reverted here. They are incorrect because the ghost cells in the modified functions actually have values at the cell centered. Although the users put domain face values in the ghost cells, that is not what the solver does. The solver stores the boundary values in boundary registers. Before the stencil is being applied, bc function is called to fill the ghost cells with properly interpolated or extrapolated values so that the stencil operations are just like working on normal interior cells. Revert "Correcting tensor cross terms computation for periodic bcs (#1254)" This reverts commit 1197adc. Revert "Changing computation at inflow/outflow for tensor solve (#1235)" This reverts commit b391885. Revert "Changing computation at outflow for the EBTensor (#1187)" This reverts commit 9cd5388. ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [x] changes answers in the test suite to more than roundoff level - [x] are likely to significantly affect the results of downstream AMReX users - [ ] are described in the proposed changes to the AMReX documentation, if appropriate
…1235) ## Summary Computation at inflow boundaries for the MLEBTensor and inflow/outflow for MLTensor has been changed. ## Additional background At outflow the tensor solve uses extrapolated values from the interior cell to the outflow face. At inflow, the tensor solve uses boundary data, evaluated at the face, that has been stored in the ghost cell next to the inflow face. ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [x] changes answers in the test suite to more than roundoff level - [x] are likely to significantly affect the results of downstream AMReX users - [ ] are described in the proposed changes to the AMReX documentation, if appropriate
…es#1254) ## Summary Correcting tensor cross terms computation for periodic bcs ## Additional background Fixing a bug introduced in PR AMReX-Codes#1235. Now it computes in the correct way the cross terms in the tensor solve for problems with periodic bcs. ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [x] changes answers in the test suite to more than roundoff level - [x] are likely to significantly affect the results of downstream AMReX users - [ ] are described in the proposed changes to the AMReX documentation, if appropriate
## Summary ParmParse parameter eb2.extend_domain_face is now true by default. The reason for the change is that for most applications it's hard to imagine one would want it to be false. It will also solve the EB tensor solver issue when there is a cut cell just outside the domain abutting a covered valid cell. Recent changes to the tensor solvers are incorrect and are reverted here. They are incorrect because the ghost cells in the modified functions actually have values at the cell centered. Although the users put domain face values in the ghost cells, that is not what the solver does. The solver stores the boundary values in boundary registers. Before the stencil is being applied, bc function is called to fill the ghost cells with properly interpolated or extrapolated values so that the stencil operations are just like working on normal interior cells. Revert "Correcting tensor cross terms computation for periodic bcs (AMReX-Codes#1254)" This reverts commit 1197adc. Revert "Changing computation at inflow/outflow for tensor solve (AMReX-Codes#1235)" This reverts commit b391885. Revert "Changing computation at outflow for the EBTensor (AMReX-Codes#1187)" This reverts commit 9cd5388. ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [x] changes answers in the test suite to more than roundoff level - [x] are likely to significantly affect the results of downstream AMReX users - [ ] are described in the proposed changes to the AMReX documentation, if appropriate
Summary
Computation at inflow boundaries for the MLEBTensor and inflow/outflow for MLTensor has been changed.
Additional background
At outflow the tensor solve uses extrapolated values from the interior cell to the outflow face. At inflow, the tensor solve uses boundary data, evaluated at the face, that has been stored in the ghost cell next to the inflow face.
Checklist
The proposed changes: