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

port the old BoxLib faverage tool to AMReX #3293

Merged
merged 3 commits into from
May 4, 2023

Conversation

zingale
Copy link
Member

@zingale zingale commented May 3, 2023

this can compute the lateral average (optionally density weighted) of a variable from a plotfile. It assumes that the vertical direction is the last dimension.

Summary

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

this can compute the lateral average (optionally density weighted)
of a variable from a plotfile.  It assumes that the vertical
direction is the last dimension.
@simonguichandut
Copy link
Contributor

@zingale
Copy link
Member Author

zingale commented May 3, 2023

added the docs

@@ -0,0 +1,285 @@
//
// Laterally average a variable with optional density weighting (Favre average)
Copy link
Member

Choose a reason for hiding this comment

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

What does Favre average mean?

{

amrex::Initialize(argc, argv, false);

Copy link
Member

Choose a reason for hiding this comment

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

Let's put everything between amrex::Initialize and amrex::Finalize inside {} so that things like PlotFileData are destroyed before amrex::Finalize.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@jbbel
Copy link
Contributor

jbbel commented May 3, 2023 via email

@zingale
Copy link
Member Author

zingale commented May 4, 2023

@BenWibking
Copy link
Contributor

Is there a version of this tool that will make a 2D projection to a plane?

@zingale
Copy link
Member Author

zingale commented May 4, 2023

I think we could easily write one, so long as it projects along a coordinate axis.

@WeiqunZhang WeiqunZhang merged commit c2f49bf into AMReX-Codes:development May 4, 2023
56 checks passed
@zingale zingale deleted the faverage branch May 4, 2023 21:15
guj pushed a commit to guj/amrex that referenced this pull request Jul 13, 2023
this can compute the lateral average (optionally density weighted) of a
variable from a plotfile. It assumes that the vertical direction is the
last dimension.
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

5 participants