-
Notifications
You must be signed in to change notification settings - Fork 239
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
[Core] Add Process for MPC Visualization #12254
base: master
Are you sure you want to change the base?
Conversation
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.
somehow this seems more complicated than I thought it would be
I would like to review in more detail, but wont have time until next weekend
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 would not add this, afaik this should not be necessary when using the Registry right @rubenzorrilla ?
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'd love to use Registry
, but I have absolutely no idea how it works and I haven't seen any documentation or examples yet.
same here; there are 2 things that make this more difficult than I initially thought:
P.S.: good luck with your defense! |
second_type second; | ||
}; | ||
|
||
std::optional<ModelPart*> mpInputModelPart; |
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.
optional of a raw pointer does not make much sense does it?
This is kinda optional of an optional no?
You are not using any optional
features
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'm wrapping optional
s around pointers to make sure I don't cause segfaults if I forget to check the pointer.
I never assign default-constructed pointers or nullptr
to the optional, which means that if the optional
has a value, it is a valid pointer. On the other hand, if the pointer was never assigned, then nor was the optional
, in which case an exception is thrown instead of a segfault.
// Max reduce across MPI ranks | ||
const DataCommunicator& r_mpi = rModelPart.GetCommunicator().GetDataCommunicator(); | ||
return static_cast<Element::IndexType>(r_mpi.MaxAll(static_cast<long unsigned int>(output))); // <== explicit casts for MSVC |
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'll need to think this through because each rank will start issuing element IDs at the same index.
public: | ||
KRATOS_CLASS_POINTER_DEFINITION(MultipointConstraintToElementProcess); | ||
|
||
MultipointConstraintToElementProcess() noexcept; |
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.
Add some doxygen here and the separators. like Operations, Life Cycle, etc...
Add a process that generates
Element2D2N
s fromMasterSlaveConstraint
s. These elements can then be written to files with any other output process.The input and output model parts are controlled by the user and can belong to completely separate trees, so the interference of the generated elements with the solver can be prevented.
FYI @sunethwarna