KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.02k stars 244 forks source link

[GeoMechanicsApplication] Truss backbone law #12469

Closed WPK4FEM closed 2 months ago

WPK4FEM commented 3 months ago

📝 Description Addition of a backbone with elastic un- + reloading constitutive model for truss elements.

🆕 Changelog

avdg81 commented 2 months ago

Hi @avdg81 and @WPK4FEM , nice work. I have just a few minor comments in addition to other comments. @avdg81 , I've found std::adjacent_find, is it possible to use it with ublas Vector? If yes, it can be used for ascending check. Thank you.

Hi @markelov208, many thanks for the thorough review. Much appreciated. In most cases, I have adopted your suggestions.

Regarding std::adjacent_find: I think that algorithm serves a different purpose. My understanding is that it finds the first pair of the consecutive elements that compare equal. I don't see how I could use that here. In that sense, std::is_sorted comes closer to what I need. However, in that case, the error message cannot be made as descriptive as it is now (where we mention the values not being ascending, and at which positions in the list they can be found). So I have left it as-is.