Skip to content

Add InitialBoundaryCondition (IBC) struct.#477

Merged
baperry2 merged 99 commits intoAMReX-Combustion:developmentfrom
esclapez:add_IBC
Apr 30, 2025
Merged

Add InitialBoundaryCondition (IBC) struct.#477
baperry2 merged 99 commits intoAMReX-Combustion:developmentfrom
esclapez:add_IBC

Conversation

@esclapez
Copy link
Copy Markdown
Collaborator

@esclapez esclapez commented Feb 9, 2025

Same principle as in PeleC but for kernels only at this point:
the initial and boundary condition kernels are gathered in a struct inheriting from a default, such that the user only has to override the ones he really need. It offers more flexibility to introduce change without breaking backward compatibility in the future.

Only a few Exec updated for now and starting with a draft PR, let's discuss any (other) breaking changes in those kernels @baperry2 .
Following the discussion in #467, I've removed nAux from initdata and added s_in which can be used to do some same-face inflow/outflow tricks.

We can probably also move some other functions in there (EBGeom, UserDefinedDerived, ExtSourceTerm, ...) although I'm not sure what get copied to the device when a static kernel from the struct is called within an AMReX macro+lambda.

@baperry2
Copy link
Copy Markdown
Collaborator

@esclapez - I created a pull request into this branch with the changes for freeProbParm.

After you approve that, let's create a list of changes that users will need to make as a result of this PR, then merge this!

add freeProbParm function to all case cpp files
@esclapez
Copy link
Copy Markdown
Collaborator Author

esclapez commented Apr 2, 2025

@baperry2 I'm adding a tweak to address Marc's comment. I actually removed the ability to have partial coverage of the EB face with a EBtype different from the default in the EBInflow implementation. With this tweak, setEBType will return an int for the BC type and a real to indicate the fraction of the EB face covered by that type. It will be used to scale the diffusion coeffs.

@baperry2
Copy link
Copy Markdown
Collaborator

baperry2 commented Apr 2, 2025

As we get ready to merge, @marchdf and @dmontgomeryNREL suggest that we create a numbered release before and after to help users manage the breaking changes. Before you had been doing releases numbers as YEAR.MONTH (like AMReX), but we haven't released anything since 23.11. We could also move to the standard MAJOR.MINOR.PATCH numbering scheme (like AMR-Wind).

@esclapez and @drummerdoc: any thoughts on this and how else to help people manage versioning especially with breaking changes as we gain more users?

@drummerdoc
Copy link
Copy Markdown

Good idea with the versioning. I'm ok using the month.year scheme and there just being missing months...maybe add a note to any version that skips months/years just to be clear.

@esclapez
Copy link
Copy Markdown
Collaborator Author

esclapez commented Apr 2, 2025

I was thinking of indeed releasing a new version because it's been a while. The YY.MM format makes sense with frequent releases but there hasn't been a strong motivation to do so with development slowing down after ECP. So maybe switching to MAJOR.MINOR.PATCH would make more sense.

I was trying to find a way to detect at compile time if the user still has a pelelmex_prob_parm.H and point to a page in the doc with the necessary changes.

@baperry2
Copy link
Copy Markdown
Collaborator

baperry2 commented Apr 4, 2025

How about releasing one last release in the MM.YY format before this merge, then releasing this version as 1.0.0. I think I prefer MAJOR.MINOR.PATCH going forward as it's more informative about what has actually changed.

Autodetecting and pointing to documentation when pelelmex_prob_parm.H is present would be awesome!

Copy link
Copy Markdown
Collaborator

@baperry2 baperry2 left a comment

Choose a reason for hiding this comment

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

@esclapez - I implemented your suggestion of raising an error if the pelelmex_prob_parm.H file is present and also added step by step instructions for users to follow to port their cases for these changes.

@baperry2
Copy link
Copy Markdown
Collaborator

@esclapez, @drummerdoc, and @ThomasHowarth: I will merge this later this week and release the versions as described above unless anyone objects.

@baperry2 baperry2 enabled auto-merge (squash) April 30, 2025 19:49
@baperry2 baperry2 merged commit 1e6db1c into AMReX-Combustion:development Apr 30, 2025
24 checks passed
This was referenced May 18, 2025
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.

4 participants