-
Notifications
You must be signed in to change notification settings - Fork 248
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
[GeoMechanicsApplication] Moved logic of ApplyScalarConstraintsTableProcess
to C++
#11669
Conversation
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.
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.
Thank you, this is more reusable than the python interface.
...ications/GeoMechanicsApplication/custom_processes/apply_scalar_constraints_table_process.cpp
Show resolved
Hide resolved
...ications/GeoMechanicsApplication/custom_processes/apply_scalar_constraints_table_process.cpp
Outdated
Show resolved
Hide resolved
...ications/GeoMechanicsApplication/custom_processes/apply_scalar_constraints_table_process.cpp
Outdated
Show resolved
Hide resolved
...ications/GeoMechanicsApplication/custom_processes/apply_scalar_constraints_table_process.cpp
Outdated
Show resolved
Hide resolved
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.
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
...ications/GeoMechanicsApplication/custom_processes/apply_scalar_constraints_table_process.cpp
Outdated
Show resolved
Hide resolved
...ications/GeoMechanicsApplication/custom_processes/apply_scalar_constraints_table_process.cpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_processes/apply_scalar_constraints_table_process.h
Show resolved
Hide resolved
- 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.
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.
Looks good, thanks for incorporating the review comments!
📝 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.