-
Notifications
You must be signed in to change notification settings - Fork 274
Enable different boundary conditions for different fields on different boundaries #6970
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
base: main
Are you sure you want to change the base?
Changes from all commits
c35cfed
a83baa6
d79e391
663c749
c702796
0d54ced
260bee1
7bb6abf
5e578f6
96cf059
6124bc2
8257c44
2b780fc
d4660ba
e077394
4a2e3e8
eca3d02
a5d45ba
db132e3
47b5f8a
968c13f
b352969
99f745f
79e0341
aabf5e4
6e994ac
22f70d3
9b48c2b
65af789
ab57126
2e09539
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Test data for ascii data boundary composition. | ||
| # Only next line is parsed in format: [nx] [ny] because of keyword "POINTS:" | ||
| # POINTS: 3 3 | ||
| # Columns: x y composition_1 composition_2. | ||
| 0. 0. 0. 0. | ||
| 330000. 0. 0. 0. | ||
| 660000. 0. 0. 0. | ||
| 0. 330000. 1. 1. | ||
| 330000. 330000. 1. 1. | ||
| 660000. 330000. 1. 1. | ||
| 0. 660000. 0. 0. | ||
| 330000. 660000. 0. 0. | ||
| 660000. 660000. 0. 0. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Test data for ascii data boundary composition. | ||
| # Only next line is parsed in format: [nx] [ny] because of keyword "POINTS:" | ||
| # POINTS: 3 3 | ||
| # Columns: x z composition_1 composition_2. | ||
| 0. 0. 0. 0. | ||
| 330000. 0. 0. 0. | ||
| 660000. 0. 0. 0. | ||
| 0. 330000. 1. 1. | ||
| 330000. 330000. 1. 1. | ||
| 660000. 330000. 1. 1. | ||
| 0. 660000. 0. 0. | ||
| 330000. 660000. 0. 0. | ||
| 660000. 660000. 0. 0. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Test data for ascii data boundary composition. | ||
| # Only next line is parsed in format: [nx] [ny] because of keyword "POINTS:" | ||
| # POINTS: 3 3 | ||
| # Columns: x y composition_1 composition_2. | ||
| 0. 0. 0. 0. | ||
| 330000. 0. 0. 0. | ||
| 660000. 0. 0. 0. | ||
| 0. 330000. 1. 1. | ||
| 330000. 330000. 1. 1. | ||
| 660000. 330000. 1. 1. | ||
| 0. 660000. 0. 0. | ||
| 330000. 660000. 0. 0. | ||
| 660000. 660000. 0. 0. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Test data for ascii data boundary composition. | ||
| # Only next line is parsed in format: [nx] [ny] because of keyword "POINTS:" | ||
| # POINTS: 3 3 | ||
| # Columns: x z composition_1 composition_2. | ||
| 0. 0. 0. 0. | ||
| 330000. 0. 1. 1. | ||
| 660000. 0. 0. 0. | ||
| 0. 330000. 1. 1. | ||
| 330000. 330000. 1. 1. | ||
| 660000. 330000. 1. 1. | ||
| 0. 660000. 0. 0. | ||
| 330000. 660000. 1. 1. | ||
| 660000. 660000. 0. 0. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Test data for ascii data boundary composition. | ||
| # Only next line is parsed in format: [nx] [ny] because of keyword "POINTS:" | ||
| # POINTS: 3 3 | ||
| # Columns: x z composition_1 composition_2. | ||
| 0. 0. 0. 0. | ||
| 330000. 0. 0. 0. | ||
| 660000. 0. 0. 0. | ||
| 0. 330000. 1. 1. | ||
| 330000. 330000. 1. 1. | ||
| 660000. 330000. 1. 1. | ||
| 0. 660000. 0. 0. | ||
| 330000. 660000. 0. 0. | ||
| 660000. 660000. 0. 0. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| New: It is now possible to specify different boundary | ||
| composition plugins for different fields on different | ||
| boundaries. This means that not all fields need to be | ||
| prescribed and two prescribed fields can use different | ||
| plugins to compute the boundary composition. | ||
| <br> | ||
| (Anne Glerum 2026/05/11) |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -212,6 +212,57 @@ namespace aspect | |
| bool | ||
| allows_fixed_composition_on_outflow_boundaries() const; | ||
|
|
||
| /* | ||
| * Return whether on the given boundary the given field | ||
| * is fixed. | ||
| */ | ||
| bool | ||
| field_is_fixed_on_boundary(const types::boundary_id boundary_id, | ||
| const unsigned int compositional_field) const; | ||
|
|
||
| /* | ||
| * Return whether there are boundaries where only a subset | ||
| * of the compositional fields is prescribed. If false, | ||
| * either there are no fixed boundary compositions, or all fields | ||
| * are fixed on the fixed composition boundaries. | ||
| */ | ||
| bool | ||
| boundaries_with_fixed_subset_of_fields_exist() const; | ||
|
|
||
| /* | ||
| * Return a list of fields that are fixed on the given boundary. | ||
| */ | ||
| std::vector<unsigned int> | ||
| get_fixed_fields_on_boundary (const types::boundary_id boundary_id) const; | ||
|
anne-glerum marked this conversation as resolved.
|
||
|
|
||
| /* | ||
| * Return a set of boundary indicators on which the given field | ||
| * is fixed. | ||
| */ | ||
| std::set<types::boundary_id> | ||
| get_fixed_boundaries_for_field (const unsigned int compositional_field) const; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, |
||
|
|
||
| /* | ||
| * Return the set of compositional fields that are fixed | ||
| * for the given plugin name. | ||
| */ | ||
| std::set<unsigned int> | ||
| get_fixed_compositional_fields_for_plugin (const std::string plugin_name) const; | ||
|
|
||
| /* | ||
| * Return the set of compositional fields that are fixed | ||
| * for the given plugin name. | ||
| */ | ||
| std::set<unsigned int> | ||
| get_fixed_compositional_fields_for_plugin_on_boundary (const std::string plugin_name, const types::boundary_id boundary_id) const; | ||
|
|
||
| /* | ||
| * Return the set of boundary indicators for which fields are fixed | ||
| * for the given plugin name. | ||
| */ | ||
| std::set<types::boundary_id> | ||
| get_fixed_composition_boundaries_for_plugin (const std::string plugin_name) const; | ||
|
|
||
| /** | ||
| * For the current plugin subsystem, write a connection graph of all of the | ||
| * plugins we know about, in the format that the | ||
|
|
@@ -235,25 +286,60 @@ namespace aspect | |
| << arg1 | ||
| << "> among the names of registered boundary composition objects."); | ||
| private: | ||
|
|
||
| /** | ||
| * A list of boundary indicators that indicate for | ||
| * each plugin in the list of plugin_objects which boundary ids | ||
| * it is responsible for. By default each plugin | ||
| * is active for all boundaries, but this list | ||
| * can be modified from the input file and by | ||
| * derived classes to limit the application | ||
| * of plugins to specific boundaries. | ||
| */ | ||
| std::vector <std::vector<types::boundary_id>> boundary_indicators; | ||
|
|
||
| /** | ||
| * A list of enums of boundary composition operators that have been | ||
| * A list of masks that specify for each plugin object | ||
| * for each boundary it applies to which compositional fields | ||
| * are prescribed (true) and which are not (false). | ||
| */ | ||
| std::vector <std::vector<ComponentMask>> masks_fields; | ||
|
|
||
| /** | ||
| * A list of enums of boundary composition operators for each | ||
| * boundary indicator associated with a boundary composition plugin that has been | ||
| * requested in the parameter file. Each name is associated | ||
| * with a model_name, and is used to modify the composition | ||
| * boundary with the values from the current plugin. | ||
| */ | ||
| std::vector<aspect::Utilities::Operator> model_operators; | ||
| std::vector <std::vector<aspect::Utilities::Operator>> model_operators; | ||
|
|
||
| /** | ||
| * A set of boundary ids on which the boundary_composition_objects | ||
| * will be applied. | ||
| * will be applied. This set does not distinguish between boundaries | ||
| * on which only a subset of the fields are fixed and boundaries on | ||
| * which all fields are fixed. Any boundary with at least one fixed | ||
| * field is included. | ||
| */ | ||
| std::set<types::boundary_id> fixed_composition_boundary_indicators; | ||
|
|
||
| /** | ||
| * A set of compositional field numbers that are fixed on any of the | ||
| * boundaries, i.e. potentially a subset of n_compositional_fields. | ||
| */ | ||
| std::set<unsigned int> fixed_compositional_fields; | ||
|
|
||
| /** | ||
| * Whether we allow the composition to be fixed on parts of the boundary | ||
| * where material flows out of the domain. | ||
| */ | ||
| bool allow_fixed_composition_on_outflow_boundaries; | ||
|
|
||
| /** | ||
| * Whether one or more boundaries only have fixed boundary conditions | ||
| * for a subset of fields, instead of all fields. | ||
| */ | ||
| bool do_boundaries_with_fixed_subset_of_fields_exist = false; | ||
| }; | ||
|
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.