Skip to content

Conversation

baperry2
Copy link
Contributor

@baperry2 baperry2 commented Jul 14, 2025

These functions are handy to have available for prob source files without needing to reimplement each time:

  • locate: find the largest index that is less than an input value in a sorted array (used for interpolation). We have this implemented a few times across PeleC, PeleLMeX, and PelePhysics. I will collapse this to a single implementation for simplicity.
  • rectangle_circle_intersection_area: useful for problems with round uniform-velocity inlets, by computing the intersection area with a cell we can scale the inlet velocity accordingly rather than a binary based on whether the cell center is within the inlet. This allows a mss flow to be specified and kept constant regardless of the resolution with which the inlet is resolved (even if it is smaller than a single cell!)

@baperry2 baperry2 requested a review from d-montgomery July 15, 2025 22:46
@baperry2 baperry2 requested a review from marchdf July 16, 2025 20:17
@baperry2
Copy link
Contributor Author

For the utility unit tests that I added here, I had tried to set up a simpler GNUmakefile that would only build the relevant parts of the code, but for some reason I couldn't figure out, this was causing issues with CUDA. So I've reverted it to just use the standard GNUmakefile and Make.PelePhysics.

@marchdf and @jrood-nrel - thoughts on the approach here for unit testing utilities? It's definitely not the prettiest but maybe it's good for now?

@marchdf
Copy link
Contributor

marchdf commented Jul 16, 2025

I am fine with the slightly overly complicated gnumakefile for the unit tests. There's probably some needed amrex options that need to be set that aren't allowing you to remove as much as you would like...

@baperry2 baperry2 enabled auto-merge (squash) July 17, 2025 20:23
@baperry2 baperry2 merged commit f0522ae into AMReX-Combustion:development Jul 17, 2025
10 checks passed
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.

3 participants