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

Multicomponent ICs/BCs #1224

Merged
merged 17 commits into from Jun 15, 2016
Merged

Conversation

endJunction
Copy link
Member

@endJunction endJunction commented May 30, 2016

Introduce variable_id to get multivariable/multicomponent processes set up correctly with their ICs and BCs. Also see the Tests/Data, where <component_value_0> is used for example for the second component instead of <value>. Other ideas to mark the components are welcome.

The uniform initial conditions for multicomponent variable can be given in the form

<values>0.5 0.7 0.9</values>

for a three component variable.

Not implemented and explicitly marked as such is the reading of the multicomponent boundary conditions.

// an negative value of the vector size or the matrix dimension.
// To assign the initial value for the ghost entries, the
// negative indices of the ghost entries are restored to zero.
// checked hereby.
Copy link
Member

Choose a reason for hiding this comment

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

Wrong indent, dont change comment

@endJunction endJunction force-pushed the MulticomponentICsBCs branch 2 times, most recently from 10074d6 to d8214ec Compare May 31, 2016 17:54
@endJunction endJunction force-pushed the MulticomponentICsBCs branch 2 times, most recently from dacf531 to d5ecfae Compare June 4, 2016 23:04
@endJunction
Copy link
Member Author

endJunction commented Jun 4, 2016

Jenkins, test this please!

I forgot to push Tests/Data.

@ogsbot
Copy link
Member

ogsbot commented Jun 5, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1861/

{
config.checkConfParam("type", "Uniform");

auto value = config.getConfParam<double>("value");
Copy link
Collaborator

@chleh chleh Jun 6, 2016

Choose a reason for hiding this comment

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

Why not keep "value" as the option for single-component process variables and only use "values" for multi-component? ✅

@chleh
Copy link
Collaborator

chleh commented Jun 6, 2016

@endJunction: I only found the change value → values in Tests/Data. Does the description text of this PR have to be updated?

{
auto const c = global_component(variable_id, component_id);
Copy link
Collaborator

@chleh chleh Jun 6, 2016

Choose a reason for hiding this comment

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

rename to getGlobalComponent() ? ✅

@chleh
Copy link
Collaborator

chleh commented Jun 6, 2016

👍

std::size_t global_component(int const variable_id,
int const component_id) const
{
return _variable_component_offsets[variable_id] + component_id;
Copy link
Member

Choose a reason for hiding this comment

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

There are two ways add components to global vectors, i.e. BY_COMPONENT, or BY_LOCATION. It sounds that this is only for BY_COMPONENT.

Copy link
Member Author

Choose a reason for hiding this comment

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

I probably do not understand you. The global_component() (or getGlobalComponent() now) is simply calculating the global_component_id which would be used to access the actual DOF table. Here nothing is added or modified.

Copy link
Member

Choose a reason for hiding this comment

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

I see. It gets component id.

@ogsbot
Copy link
Member

ogsbot commented Jun 6, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/240/

@ogsbot
Copy link
Member

ogsbot commented Jun 6, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2016/

@ogsbot
Copy link
Member

ogsbot commented Jun 6, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1864/

@endJunction endJunction force-pushed the MulticomponentICsBCs branch 2 times, most recently from e08a109 to 0804b7b Compare June 8, 2016 21:32
@endJunction
Copy link
Member Author

Had to rebase because of the merges. The only new thing is the small documentation attempt.

@norihiro-w
Copy link
Collaborator

Though it's not a point in this PR, why not add getID() to ProcessVariable? As far as I saw this PR, it can shorten code at many places.

@endJunction
Copy link
Member Author

Regarding the ProcessVariable::getID():
Short answer here, long answer to be discussed, it's a good idea too, but:
Currently that id is stored and managed in the DOF table (see ctor of the LocalToGlobalIndexMap). Storing the ids outside would require additional code outside the DOF table. But also, as you mentioned, can reduce code when accessing that field.

@endJunction
Copy link
Member Author

endJunction commented Jun 14, 2016

Sorry for the fifth rebase or so, but the ufz/master is changing fast in incompatible ways... The last commits address Norihiros comments.

@norihiro-w
Copy link
Collaborator

👍

1 similar comment
@TomFischer
Copy link
Member

👍

@endJunction endJunction merged commit 7d0b660 into ufz:master Jun 15, 2016
@endJunction endJunction deleted the MulticomponentICsBCs branch June 15, 2016 09:18
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants