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

3d anisotropic eb #3907

Merged
merged 21 commits into from Apr 30, 2024
Merged

Conversation

jmsexton03
Copy link
Contributor

Summary

Additional background

Creating draft PR to run tests

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
  • include documentation in the code and/or rst files, if appropriate

Src/EB/AMReX_EB2_3D_C.cpp Fixed Show fixed Hide fixed
Src/EB/AMReX_EB2_3D_C.cpp Fixed Show fixed Hide fixed
Src/EB/AMReX_EB2_3D_C.cpp Fixed Show fixed Hide fixed
Src/EB/AMReX_EB2_3D_C.cpp Fixed Show fixed Hide fixed
Src/EB/AMReX_EB2_3D_C.cpp Fixed Show fixed Hide fixed
Src/EB/AMReX_EB2_3D_C.cpp Fixed Show fixed Hide fixed
Src/EB/AMReX_EB2_3D_C.cpp Fixed Show fixed Hide fixed
@jmsexton03 jmsexton03 marked this pull request as ready for review April 29, 2024 21:39
@asalmgren
Copy link
Member

I'm thinking it might be less confusing to just set axm (not axmt) to apx(i,j,k) so we don't have to redefine all of those at line 113 ... then just swap axm and axmt in lines 54-112.

@asalmgren asalmgren merged commit ddf15b9 into AMReX-Codes:development Apr 30, 2024
69 checks passed
Real dapx = (axm - axp)*(dx[1]*dx[2]);
Real dapy = (aym - ayp)*(dx[0]*dx[2]);
Real dapz = (azm - azp)*(dx[0]*dx[1]);
const Real apnorm = std::sqrt(dapx*dapx+dapy*dapy+dapz*dapz) + 1.e-30_rt*std::sqrt(dx[0]*dx[1]*dx[2]);
Copy link
Member

Choose a reason for hiding this comment

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

The second term has a different units than the first. The first term is L^2, whereas the second is L^(3/2).

@@ -121,7 +124,7 @@ void set_eb_data (const int i, const int j, const int k,
return;
}

Real bainv = 1.0_rt/barea(i,j,k);
Real bainv = bareascaling*bareascaling/apnorm;
Copy link
Member

Choose a reason for hiding this comment

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

This is the only place bareascaling is used. barescaling is computed with std::sqrt(..). So maybe sqrt is unnecessary.

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