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] ApplyConstantPhreaticMultiLinePressureProcess checks size of coordinates #12578

Conversation

avdg81
Copy link
Contributor

@avdg81 avdg81 commented Jul 26, 2024

📝 Description
When an instance of class ApplyConstantPhreaticMultiLinePressureProcess is created, at least two coordinates must be supplied for both the gravity direction and the horizontal direction. Each direction is indicated by a zero-based index: 0 -> x_coordinates, 1 -> y_coordinates, and 2 -> z_coordinates. When there are too few coordinates supplied, an exception is thrown.

@avdg81 avdg81 added the GeoMechanics Issues related to the GeoMechanicsApplication label Jul 26, 2024
@avdg81 avdg81 self-assigned this Jul 26, 2024
Copy link
Contributor

@markelov208 markelov208 left a comment

Choose a reason for hiding this comment

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

Hi Anne, indeed one story point ;) I have a style comment that is not blocking. A question is it looks there is no test non-sorted data. Right?

Comment on lines 81 to 83
if (!std::is_sorted(HorizontalDirectionCoordinates().begin(), HorizontalDirectionCoordinates().end())) {
KRATOS_ERROR << "The Horizontal Elements Coordinates are not ordered." << rParameters << std::endl;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think, perhaps, it is nice to use KRATOS_ERROR_IF here and above? Everything will be in the same style. Please, put is_sorted check below next checks.

Copy link
Contributor

@mnabideltares mnabideltares left a comment

Choose a reason for hiding this comment

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

@avdg81
It looks OK to me

@mnabideltares mnabideltares merged commit 60fea14 into master Aug 5, 2024
9 of 11 checks passed
@mnabideltares mnabideltares deleted the geo/12577-ApplyConstantPhreaticMultiLinePressureProcess-checks-size-of-positions branch August 5, 2024 12:03
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
3 participants