Skip to content

Enable different boundary conditions for different fields on different boundaries#6970

Open
anne-glerum wants to merge 31 commits into
geodynamics:mainfrom
anne-glerum:enable_diff_BC_fields
Open

Enable different boundary conditions for different fields on different boundaries#6970
anne-glerum wants to merge 31 commits into
geodynamics:mainfrom
anne-glerum:enable_diff_BC_fields

Conversation

@anne-glerum

@anne-glerum anne-glerum commented May 7, 2026

Copy link
Copy Markdown
Contributor

To address #1560. No need to look yet, I just want to see what the testers say.

Notes to self:

  • Plugins still need to supply values for all fields
  • Remove unused functions
  • Model operator option add is only option allowed in new format
  • Only one model operator is allowed per plugin, even though the plugins can be active on multiple boundaries for different fields
  • Input separators could be better

For all pull requests:

For new features/models or changes of existing features:

  • I have tested my new feature locally to ensure it is correct.
  • I have created a testcase for the new feature/benchmark in the tests/ directory.
  • I have added a changelog entry in the doc/modules/changes directory that will inform other users of my change.

Comment thread include/aspect/boundary_composition/interface.h Outdated
Comment thread include/aspect/boundary_composition/interface.h
Comment thread include/aspect/boundary_composition/interface.h
get_fixed_fields_on_boundary (const types::boundary_id boundary_id) const;

std::set<types::boundary_id>
get_fixed_boundaries_for_field (const unsigned int compositional_field) const;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We often use "prescribed" instead of "fixed" I think. Think about which one makes more sense?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I like prescribed more, but in the prm file and in the original plugin interface, fixed is used, e.g. Fixed composition boundary indicators and fixed_composition_boundary_indicators, so I stuck with that.

@anne-glerum anne-glerum force-pushed the enable_diff_BC_fields branch from 9ee13ea to d4660ba Compare May 11, 2026 14:55
@anne-glerum

anne-glerum commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Hi @gassmoeller, before I continue with this PR, I'd like your input. Does the PR go in the right direction? If so, what is specifically bothering me is:

  1. The boundary composition plugins still need to specify boundary conditions for all fields, even if not all fields are prescribed. I can adapt the plugins; adding a function to interface.cc that returns on which boundary for which fields a plugin is active would make it easier.
  2. When the new feature is used, the model operator functionality is lost (i.e. the only option is add). Shall I add in another entry that specifies the model operators? E.g. <boundary_name>; field_name_1|field_name_2|field_name_5 : plugin_name_1|plugin_name_2 & add|max. It won't improve the readability...
  3. The input separators could be changed. Only the , separating entries needs to stay to keep the current format working.

@anne-glerum anne-glerum changed the title [WIP] Enable different boundary conditions for different fields on different boundaries Enable different boundary conditions for different fields on different boundaries Jun 15, 2026
@anne-glerum

anne-glerum commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

After discussing with @gassmoeller, I have updated the input format. In addition, all the boundary composition plugins now take into account how many compositional fields they are supposed to prescribe on each boundary (a test is added for each changed plugin). The only allowed operator for the new format is still add.

I think this is now ready for review. I have one question though: What to do with the old old input parameter Model name? At the moment, I've left it in, but it will not work properly. Is it time to remove it?

EDIT: it seems I broke something today, let me fix that first.

@anne-glerum

Copy link
Copy Markdown
Contributor Author

/rebuild

@anne-glerum anne-glerum force-pushed the enable_diff_BC_fields branch from 20ea6d1 to 6d6e9e2 Compare June 17, 2026 09:52
@anne-glerum anne-glerum force-pushed the enable_diff_BC_fields branch from 6d6e9e2 to 2e09539 Compare June 17, 2026 13:51
@anne-glerum

Copy link
Copy Markdown
Contributor Author

Okay @gassmoeller, this is now ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants