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
Add between multiapp (sibling) copy transfer #19676
Conversation
5117850
to
fea6cac
Compare
Job Documentation on d8ba4c0 wanted to post the following: View the site here This comment will be updated on new commits. |
Job Coverage on d8ba4c0 wanted to post the following: Framework coverage
Modules coverageFunctional expansion tools
Level set
Stochastic tools
Full coverage reportsReports
Warnings
This comment will be updated on new commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting to enable notifications; I've got a few ideas for this but haven't had the chance to get them down.
I think we need to talk about two cases here:
|
I think we should keep using the same TO_MULTIAPP and FROM_MULTIAPP. We think the target is the master in the current code base when we say "FROM_MULTIAPP." We think the source is the master when we say "TO_MULTIAPP." We should not make that assumption anymore for this "between-MULTIAPP." The between case set both FROM_MULTIAPP and TO_MULTIAPP to be true |
We might introduce extra "execute_on" flags |
I think we want context 2. here, and assume that there is only one of each (or one per rank at least). Otherwise, and in context 1 as well, we'd need to start numbering subapps of a given multiapp, and be very precise what is moved where |
fea6cac
to
cc9747b
Compare
@fdkong I did the parameter renaming for Transfer and MultiAppTransfer (but not all the subclasses yet) |
cc9747b
to
c5b37d8
Compare
1797f10
to
1f42b40
Compare
Should pass test now. I think I ll try to grab a few of the other easy transfers then this will be good to go |
1f42b40
to
3ed5525
Compare
…ectional transfer, refs idaholab#19451
…19451 also for an input in level set module
…rectional parameters, refs idaholab#19451
Fixup new tests added during PR
…velopers to use them Refs idaholab#19451 TODO: - adapt modules - app patches
Job Precheck on dd1dc50 wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
if (parameters.isParamValid("multi_app")) | ||
multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app")); | ||
else if (parameters.isParamValid("from_multi_app")) | ||
multiapp = getMultiApp(parameters.get<MultiAppName>("from_multi_app")); | ||
else if (parameters.isParamValid("to_multi_app")) | ||
multiapp = getMultiApp(parameters.get<MultiAppName>("to_multi_app")); | ||
else | ||
mooseError("Should not reach here"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to have a better error message here. A user specified to_multiapp
as their parameter name and got the "Should not reach here" error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait ... it's just that these parameter names here are actually wrong. The user had specified the right parameter name in to_multiapp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be helpful to output users' input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad.
How are they hitting this? All the apps were moved to the new system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well actually, how are they hitting this just now?
is EXEC_SAME_AS_MULTIAPP just not tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misread the situation. See #20803
Also fix typos: 'directions' to 'direction' towards bottom of `MultiAppTransfer` constructor Refs idaholab#19676
Also fix typos: 'directions' to 'direction' towards bottom of `MultiAppTransfer` constructor Refs idaholab#19676
Also fix typos: 'directions' to 'direction' towards bottom of `MultiAppTransfer` constructor Refs idaholab#19676
Also fix typos: 'directions' to 'direction' towards bottom of `MultiAppTransfer` constructor Refs idaholab#19676
Yes. This should be a MooseEnum for input file reasons (case, pick lists).
As far as the backend, an enumeration makes a lot of sense just so you can
see the actual names as written constants. I prefer the newer strong type
C++ enumerations though over the older C types.
…On Mon, Mar 21, 2022 at 2:53 PM Fande Kong ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In framework/src/problems/FEProblemBase.C
<#19676 (comment)>:
> @@ -4214,9 +4224,18 @@ void
FEProblemBase::execMultiAppTransfers(ExecFlagType type, Transfer::DIRECTION direction)
{
bool to_multiapp = direction == MultiAppTransfer::TO_MULTIAPP;
- std::string string_direction = to_multiapp ? " To " : " From ";
- const MooseObjectWarehouse<Transfer> & wh =
- to_multiapp ? _to_multi_app_transfers[type] : _from_multi_app_transfers[type];
+ bool from_multiapp = direction == MultiAppTransfer::FROM_MULTIAPP;
+ std::string string_direction;
+ if (to_multiapp)
+ string_direction = " To ";
+ else if (from_multiapp)
+ string_direction = " From ";
+ else
+ string_direction = " between ";
Should we use enum for the direction instead of string?
We could move the following enum to the MooseTypes.h
enum DIRECTION
{
TO_MULTIAPP,
FROM_MULTIAPP
FROM_MULTIAPP,
BETWEEN_MULTIAPP
};
—
Reply to this email directly, view it on GitHub
<#19676 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXFOIHEARHST5OLR2WNVL3VBDOWNANCNFSM5KROOMJA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Early PR to get feedback from @fdkong
And to see if the test suite sees issues with it.
The main limitation of this (beyond all the limitations of copy transfer compared to projection & conservative transfers), I think, is that it cant do anything if different ranks own each sibling.
Maybe there is a way around it though, since copy transfers can assume a lot of things are true, because the same mesh is involved
Also let's say I have two different kinds of multiapps, with three instances for each, and I m running this on 2 processes for the main app. Is the allocation going to be:
OR
The to_multi_app parameter that is only used for between_multiapp transfers is not a good name. Maybe I should call it "other_multiapp". It's hard to find a name that doesnt convey "to" or "from" in the TO_MULTIAPP and FROM_MULTIAPP contexts, yet do convey it's a target in between_multiapp.
Another difficulty is when do we do these "between" transfers. Before the apps are ran? After they are ran? In between (what I d want actually) ???
App patches: