Conversation
rfaasse
previously approved these changes
Sep 14, 2023
Contributor
rfaasse
left a comment
There was a problem hiding this comment.
Looks good to me! I have a couple of questions, but they are mainly to verify my understanding of the flow
applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp
Show resolved
Hide resolved
- Use `std::filesystem::path`s rather than strings when handling file paths. This implicitly addresses problems related to path separators on different platforms. Use "generic strings" when the API expects a string rather than a path object. - Only attempt to read from a material file when one is specified in the `ProjectParameters.json` file. - The approach for reading of `.mdpa` files in `KratosGeoSettlement` is now more in line with how this is handled by the Python code. We first check whether the given model part name corresponds to an existing model part. If not, we create a new one and populate it using the data from the `.mdpa` file.
7b92284 to
70f3aac
Compare
rfaasse
approved these changes
Sep 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
So far, when a stage was run using the settlement workflow (in C++), it always attempted to read the given
mdpafile. Although the set of input files worked using the Python workflow, it raised an error when the custom workflow was used (about already existing elements). To prevent that, we now follow the same approach as in our Python workflow. That is, when the model part corresponding to the given model part name already exists, don't attempt to create a new one and also don't attempt to read themdpafile. With these changes, the Python workflow and the custom (C++) workflow are more consistent.🆕 Changelog
std::filesystem::paths rather than strings when handling file paths. This implicitly addresses problems related to path separators on different platforms. Use "generic strings" when the API expects a string rather than a path object.ProjectParameters.jsonfile..mdpafiles inKratosGeoSettlementis now more in line with how this is handled by the Python code. We first check whether the given model part name corresponds to an existing model part. If not, we create a new one and populate it using the data from the.mdpafile.