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

The average_down_faces calls between AMR levels in the linear solvers need to see periodicity #1221

Merged

Conversation

asalmgren
Copy link
Member

The average_down_faces calls between AMR levels need to use the interfaces that sees the periodicity. This requires adding that functionality to EB_average_down_faces (it has already been added to non-EB average_down_faces.)

Summary

Recently we added the functionality for an average_down_faces call to average fine data from one side to average not only onto the face under it but also onto the face on the other side of the domain if periodic in that direction. This PR 1) extends that functionality to the EB_average_down_faces call and 2) uses this new functionality when averaging down face-based coefficients between AMR levels in the cell-centered linear solvers.

NOTE: I have left a "TODO" in amrex/Src/EB/AMReX_EBMultiFabUtil.cpp -- I wasn't sure how to best implement the functionality in that case

Additional background

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • are described in the proposed changes to the AMReX documentation, if appropriate

that sees the periodicity.  This requires adding that functionality to
EB_average_down_faces (it has already been added to non-EB average_down_faces.)
int ncomp = crse[0]->nComp();
if (!(*fine[0]).hasEBFabFactory())
{
amrex::average_down_faces(fine, crse, ratio, ngcrse);
Copy link
Member

Choose a reason for hiding this comment

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

It seems that we should call the version with Geometry.

}
}
}
// TODO: NEED TO ENFORCE PERIODICITY IN THIS CASE
Copy link
Member

Choose a reason for hiding this comment

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

I think we could remove this entire block of if (isMFIterSafe(*fine[0], *crse[0])). If we need to enforce periodicity, we have to do the thing in the else block below.

@WeiqunZhang WeiqunZhang merged commit 273cf0c into AMReX-Codes:development Aug 2, 2020
@asalmgren asalmgren deleted the more_average_down_faces branch August 13, 2020 01:07
dwillcox pushed a commit to dwillcox/amrex that referenced this pull request Oct 3, 2020
… need to see periodicity (AMReX-Codes#1221)

The average_down_faces calls between AMR levels need to use the interfaces that sees the periodicity.  This requires adding that functionality to EB_average_down_faces (it has already been added to non-EB average_down_faces.)

## Summary
Recently we added the functionality for an average_down_faces call to average fine data from one side to average not only onto the face under it but also onto the face on the other side of the domain if periodic in that direction.  This PR 1) extends that functionality to the EB_average_down_faces call and 2) uses this new functionality when averaging down face-based coefficients between AMR levels in the cell-centered linear solvers.

## Checklist
 
The proposed changes:
- [X] fix a bug or incorrect behavior in AMReX
- [X] 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
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