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

[GeoMechanicsApplication] Moved logic of ApplyScalarConstraintsTableProcess to C++ #11669

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

avdg81
Copy link
Contributor

@avdg81 avdg81 commented Oct 8, 2023

📝 Description
This class used to be defined in a Python module only. Now that we also need it for the custom settlement workflow, we had to port it from Python to C++. Note that the Python interface now uses the new C++ class.

Also added a creator for the ApplyScalarConstraintsTableProcess to the process factory used by the custom workflow. The factory should now be able to create all kinds of processes that are relevant for settlement analysis.

This class used to be defined in a Python module only. Now that we also
need it for the custom settlement workflow, we had to port it from
Python to C++. Note that the Python interface now uses the new C++
class.

Also added a creator for the `ApplyScalarConstraintsTableProcess` to the
process factory used by the custom workflow. The factory should now be
able to create all kinds of processes that are relevant for settlement
analysis.
Copy link
Contributor

@WPK4FEM WPK4FEM left a comment

Choose a reason for hiding this comment

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

Thank you, this is more reusable than the python interface.

rfaasse
rfaasse previously approved these changes Oct 9, 2023
Copy link
Contributor

@rfaasse rfaasse left a comment

Choose a reason for hiding this comment

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

Clear and clean code! I have some minor suggestions, nothing blocking.

On the point of UTs: looking at the class it's not soo trivial to unit-test and since it's already tested by the python tests, I don't think it is worth the effort at this point in time

- Moved a member function to a more logical place.
- Removed a duplicated member function and renamed the remaining one.
- Added a helper function to detect whether a table has been attached to
  a process.
- Since the logic was inverted, some statements had to be rearranged.
Copy link
Contributor

@rfaasse rfaasse left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for incorporating the review comments!

@avdg81 avdg81 merged commit d3d2b97 into master Oct 9, 2023
11 checks passed
@avdg81 avdg81 deleted the geo/migrating-the-applyscalarconstrainttableprocess branch October 9, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GeoMechanics Issues related to the GeoMechanicsApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants