-
Notifications
You must be signed in to change notification settings - Fork 246
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] Create 3d line piping element 3d2n #12857
[GeoMechanicsApplication] Create 3d line piping element 3d2n #12857
Conversation
…-line-piping-element-3d2n
…e use non-static member function in it
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.
The thing that is not here yet is an integration test, which should end up in the validation suite that seldomly runs because they take a lot of time.
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Show resolved
Hide resolved
...ation/custom_strategies/strategies/geo_mechanics_newton_raphson_erosion_process_strategy.hpp
Outdated
Show resolved
Hide resolved
...echanicsApplication/tests/cpp_tests/custom_elements/test_geo_steady_state_piping_element.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.
Hi Richard, thank you for a nice piece of work. I was wondering shall PIPE_WIDTH_FACTOR have its own unit test? Formally, it is checked already with left/right hand sides.
@@ -67,6 +67,24 @@ class GeoMechanicsNewtonRaphsonErosionProcessStrategy | |||
mPipingIterations = rParameters["max_piping_iterations"].GetInt(); | |||
} | |||
|
|||
template <typename PipingElementType> | |||
std::optional<std::vector<PipingElementType*>> TryDownCastToPipingElement(const std::vector<Element*>& rPipeElements) |
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.
Nice to have one function for all three cases. I think it useful to pass the pipe element name for the error message.
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.
Nice suggestion, I added the name of the element to the error message, by using the element->Info(), and implemented them in the relevant elements.
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.
Some more remarks now the integration test is added.
applications/GeoMechanicsApplication/tests/three_dimensional_piping/MaterialParameters.json
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
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.
Thank you for the reviews, I think I processed all comments, let me know if it's done satisfactory!
...ation/custom_strategies/strategies/geo_mechanics_newton_raphson_erosion_process_strategy.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/MaterialParameters.json
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
Outdated
Show resolved
Hide resolved
...echanicsApplication/tests/cpp_tests/custom_elements/test_geo_steady_state_piping_element.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Show resolved
Hide resolved
@@ -67,6 +67,24 @@ class GeoMechanicsNewtonRaphsonErosionProcessStrategy | |||
mPipingIterations = rParameters["max_piping_iterations"].GetInt(); | |||
} | |||
|
|||
template <typename PipingElementType> | |||
std::optional<std::vector<PipingElementType*>> TryDownCastToPipingElement(const std::vector<Element*>& rPipeElements) |
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.
Nice suggestion, I added the name of the element to the error message, by using the element->Info(), and implemented them in the relevant elements.
applications/GeoMechanicsApplication/tests/three_dimensional_piping/ProjectParameters.json
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.
Thank for taking up the suggestions and extending piping to 3D for line elements.
Looks good to go for me.
📝 Description
Adds a 3d version of the piping line element with unit tests and an integration test