-
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] ApplyConstantPhreaticMultiLinePressureProcess checks size of coordinates #12578
Conversation
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 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?
if (!std::is_sorted(HorizontalDirectionCoordinates().begin(), HorizontalDirectionCoordinates().end())) { | ||
KRATOS_ERROR << "The Horizontal Elements Coordinates are not ordered." << rParameters << std::endl; | ||
} |
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.
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.
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.
@avdg81
It looks OK to me
📝 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.