-
Notifications
You must be signed in to change notification settings - Fork 279
[GeoMechanicsApplication] Add coupling calculator components #14162
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
Conversation
…ing with clang-format
…upling matrix calculation in the equation of motion utils
…he coupling calculators)
…ore specific info
| InputProvider(std::function<const Matrix&()> GetNpContainer, | ||
| Geo::BMatricesGetter GetBMatrices, | ||
| std::function<Vector()> GetVoigtVector, | ||
| Geo::IntegrationCoefficientsGetter GetIntegrationCoefficients, | ||
| std::function<std::vector<double>()> GetBiotCoefficients, | ||
| std::function<std::vector<double>()> GetDegreesOfSaturation, | ||
| std::function<Vector()> GetNodalVelocities, | ||
| std::function<double()> GetVelocityCoefficient) |
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 like to add the aliases for this provider later (but let me know if you think differently). I think we should also discuss if we'd like a new alias for every type of getter, or if we'd like more generic aliases (e.g. MatrixGetter instead of having different ones for BMatricesGetter and NpContainerGetter)
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 have been struggling with the same. For std::function<std::vector> we have Geo::IntegrationCoefficientsGetter. Using that for other coefficients ( here Biot, DegreeOfSaturation, Bishop ) looks unnatural. We could change its name to CoefficientsGetter and use it throughout the providers.
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.
Also looking at Annes comment, I think it's a good idea to leave it as is for this PR, and discuss it offline first
WPK4FEM
left a comment
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.
Dear Richard,
Thank you for making these coupling calculators available. A good step towards having a complete set of calculators for elements.
Please have an in depth look at the remarks about the velocity coefficient. It's use does not align with my expectation, I think it does not belong in the calculator and causes an incorrect RHS the way it's used. Try to prove that I'm wrong off course.
Regards, Wijtze Pieter
| InputProvider(std::function<const Matrix&()> GetNpContainer, | ||
| Geo::BMatricesGetter GetBMatrices, | ||
| std::function<Vector()> GetVoigtVector, | ||
| Geo::IntegrationCoefficientsGetter GetIntegrationCoefficients, | ||
| std::function<std::vector<double>()> GetBiotCoefficients, | ||
| std::function<std::vector<double>()> GetDegreesOfSaturation, | ||
| std::function<Vector()> GetNodalVelocities, | ||
| std::function<double()> GetVelocityCoefficient) |
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 have been struggling with the same. For std::function<std::vector> we have Geo::IntegrationCoefficientsGetter. Using that for other coefficients ( here Biot, DegreeOfSaturation, Bishop ) looks unnatural. We could change its name to CoefficientsGetter and use it throughout the providers.
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/up_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
| typename BaseType::LHSMatrixType coupling_contribution; | ||
| GeoTransportEquationUtilities::CalculateCouplingMatrix( |
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.
Is it impossible to use the version where the return value is the coupling matrix contribution?
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.
Not out of the box because the template arguments there are the dimension and number of nodes i.s.o number of UDof and number of PwDof.
avdg81
left a comment
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,
I've mostly focused on the programming aspects of this PR rather than the actual calculation of the matrices and vectors. I feel that Wijtze Pieter has way more knowledge about that than me, and I've seen he has shared some ideas on how to more cleanly separate certain concepts. My suggestions and questions are all very minor, so please focus on the feedback given by Wijtze Pieter. Thanks.
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
rfaasse
left a comment
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.
Processed the first batch of comments!
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
| InputProvider(std::function<const Matrix&()> GetNpContainer, | ||
| Geo::BMatricesGetter GetBMatrices, | ||
| std::function<Vector()> GetVoigtVector, | ||
| Geo::IntegrationCoefficientsGetter GetIntegrationCoefficients, | ||
| std::function<std::vector<double>()> GetBiotCoefficients, | ||
| std::function<std::vector<double>()> GetDegreesOfSaturation, | ||
| std::function<Vector()> GetNodalVelocities, | ||
| std::function<double()> GetVelocityCoefficient) |
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.
Also looking at Annes comment, I think it's a good idea to leave it as is for this PR, and discuss it offline first
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/up_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
| typename BaseType::LHSMatrixType coupling_contribution; | ||
| GeoTransportEquationUtilities::CalculateCouplingMatrix( |
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.
Not out of the box because the template arguments there are the dimension and number of nodes i.s.o number of UDof and number of PwDof.
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
markelov208
left a comment
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 implementing the calculators. I have a number of minor comments. Hope it is easy to comment them.
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/contribution_calculators/README.md
Outdated
Show resolved
Hide resolved
| - The Voigt-vector | ||
| - The nodal water pressures | ||
|
|
||
| This data is provided via the `InputProvider` and enables the calculator to compute left-hand side contribution ($Q$ as defined before) and right-hand side contributions ($Q p$, in which $p$ is the vector of nodal water pressures). |
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.
Should
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.
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 clarification. I think adding something like '(matrix-vector product
applications/GeoMechanicsApplication/custom_elements/contribution_calculators/README.md
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/up_coupling_calculator.hpp
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/up_coupling_calculator.hpp
Show resolved
Hide resolved
WPK4FEM
left a comment
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.
Dear Richard,
Thank you for adding the coupling calculators, lets use them in our elements.
For me it's good to go.
Wijtze Pieter
rfaasse
left a comment
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 all for the reviews, processed the comments 👍
.../GeoMechanicsApplication/custom_elements/contribution_calculators/up_coupling_calculator.hpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/contribution_calculators/README.md
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
...ation/tests/cpp_tests/custom_elements/contribution_calculators/test_coupling_calculators.cpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/pu_coupling_calculator.hpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/custom_elements/contribution_calculators/up_coupling_calculator.hpp
Show resolved
Hide resolved
avdg81
left a comment
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.
Thanks for processing the review suggestions. For me this PR is good to go.
markelov208
left a comment
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.
Richard, thank you for clarifications and changes. There is still comment on Qp but it is not blocking.
📝 Description$\leftrightarrow$ displacement coupling. Due to overlap in the two calculations, the
This PR adds two calculators, the
UPCouplingCalculatorand thePUCouplingCalculatorto calculate left and right hand side contributions regarding waterPUCouplingCalculatorre-uses theUPCouplingCalculator.Note that no connection is made yet to an existing element (e.g. the interface element).
🆕 Changelog
UPCouplingCalculatorandPUCouplingCalculator