{"id":17737751,"url":"https://github.com/tdegeus/frictionqpotfem","last_synced_at":"2026-02-18T02:01:06.956Z","repository":{"id":40394299,"uuid":"303341230","full_name":"tdegeus/FrictionQPotFEM","owner":"tdegeus","description":"Friction simulations based on \"GMatElastoPlasticQPot\" and \"GooseFEM\"","archived":false,"fork":false,"pushed_at":"2023-07-14T13:14:41.000Z","size":13698,"stargazers_count":0,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-10T04:28:17.943Z","etag":null,"topics":["friction-simulations","python","qpot","xtensor"],"latest_commit_sha":null,"homepage":"https://tdegeus.github.io/FrictionQPotFEM","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tdegeus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-12T09:24:19.000Z","updated_at":"2021-11-16T19:51:40.000Z","dependencies_parsed_at":"2024-10-26T05:53:30.194Z","dependency_job_id":"6c286399-be1e-4b3c-b4f3-c296fdc9aaec","html_url":"https://github.com/tdegeus/FrictionQPotFEM","commit_stats":null,"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"purl":"pkg:github/tdegeus/FrictionQPotFEM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdegeus%2FFrictionQPotFEM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdegeus%2FFrictionQPotFEM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdegeus%2FFrictionQPotFEM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdegeus%2FFrictionQPotFEM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdegeus","download_url":"https://codeload.github.com/tdegeus/FrictionQPotFEM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdegeus%2FFrictionQPotFEM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29566366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"online","status_checked_at":"2026-02-18T02:00:09.468Z","response_time":162,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["friction-simulations","python","qpot","xtensor"],"created_at":"2024-10-26T01:42:35.961Z","updated_at":"2026-02-18T02:01:06.939Z","avatar_url":"https://github.com/tdegeus.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FrictionQPotFEM\n\n[![CI • Python](https://github.com/tdegeus/FrictionQPotFEM/actions/workflows/ci-python.yml/badge.svg)](https://github.com/tdegeus/FrictionQPotFEM/actions/workflows/ci-python.yml)\n[![CI • C++](https://github.com/tdegeus/FrictionQPotFEM/actions/workflows/ci-cpp.yml/badge.svg)](https://github.com/tdegeus/FrictionQPotFEM/actions/workflows/ci-cpp.yml)\n[![Doxygen -\u003e gh-pages](https://github.com/tdegeus/FrictionQPotFEM/workflows/gh-pages/badge.svg)](https://tdegeus.github.io/FrictionQPotFEM)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/frictionqpotfem.svg)](https://anaconda.org/conda-forge/frictionqpotfem)\n\nFriction simulations based on \"GMatElastoPlasticQPot\" and \"GooseFEM\"\n\n# Testing\n\n# Additional checks and balances\n\nAdditionally, consistency against earlier runs can be checked as follows.\n\n## UniformSingleLayer2d - PNAS\n\n```none\ncd build\ncmake .. -DBUILD_TESTS=1 -DBUILD_EXAMPLES=1\nmake\n./examples/PNAS-2019 ../examples/PNAS-2019_N=3\\^2_id=000.h5\n```\n\n## UniformSingleLayer2d::System\n\n```none\ncd build\ncmake .. -DBUILD_TESTS=1 -DBUILD_EXAMPLES=1\nmake\n./examples/UniformSingleLayer2d_System\ncp ../examples/UniformSingleLayer2d_System.py .\npython UniformSingleLayer2d_System.py ../examples/UniformSingleLayer2d_System.txt\n```\n\n## UniformSingleLayer2d::HybridSystem\n\n```none\ncd build\ncmake .. -DBUILD_TESTS=1 -DBUILD_EXAMPLES=1\nmake\n./examples/UniformSingleLayer2d_HybridSystem\ncp ../examples/UniformSingleLayer2d_HybridSystem.py .\npython UniformSingleLayer2d_HybridSystem.py ../examples/UniformSingleLayer2d_HybridSystem.txt\n```\n\n## UniformSingleLayer2d - Load cycle\n\n```none\ncd build\ncmake .. -DBUILD_TESTS=1 -DBUILD_EXAMPLES=1\nmake\n./examples/LoadCycle\ncp ../examples/LoadCycle.py .\npython LoadCycle.py ../examples/LoadCycle.txt\n```\n\n# Generating the docs\n\n## Basic\n\n```\ncd docs\ndoxygen\n```\n\n## With dependencies\n\nFor example using conda\n\n```\ncd docs\n( cat Doxyfile ; echo \"INPUT += ${CONDA_PREFIX}/include/GooseFEM\" ; echo \"INPUT += ${CONDA_PREFIX}/include/GMatElastoPlasticQPot\" ) | doxygen -\n```\n\n# Installation\n\n# C++ headers\n\n## Using conda\n\n```bash\nconda install -c conda-forge frictionpotfem\n```\n\n## From source\n\n```bash\n# Download FrictionQPotFEM\ngit checkout https://github.com/tdegeus/FrictionPotFEM.git\ncd FrictionQPotFEM\n\n# Install headers and CMake support\ncmake -Bbuild .\ncd build\nmake install\n```\n\n# Python module\n\n## Using conda\n\n```bash\nconda install -c conda-forge python-frictionpotfem\n```\n\nNote that *xsimd* and hardware optimisations are **not enabled**.\nTo enable them you have to compile on your system, as is discussed next.\n\n## From source\n\n\u003e   You need *xtensor*, *xtensor-python* and optionally *xsimd* as prerequisites.\n\u003e   Additionally, Python needs to know how to find them.\n\u003e   The easiest is to use *conda* to get the prerequisites:\n\u003e\n\u003e   ```bash\n\u003e   conda install -c conda-forge xtensor-python\n\u003e   conda install -c conda-forge xsimd\n\u003e   ```\n\u003e\n\u003e   If you then compile and install with the same environment\n\u003e   you should be good to go.\n\u003e   Otherwise, a bit of manual labour might be needed to\n\u003e   treat the dependencies.\n\n```bash\n# Download FrictionQPotFEM\ngit checkout https://github.com/tdegeus/FrictionPotFEM.git\ncd FrictionQPotFEM\n\n# Only if you want to use hardware optization:\nexport CMAKE_ARGS=\"-DUSE_SIMD=1\"\n\n# Compile and install the Python module\n# (-vv can be omitted as is controls just the verbosity)\npython -m pip install . -vv\n```\n\n# Change-log\n\n## v0.20.0 (2022-08-18) - Breaking changes\n\n### Changes\n\n*   Deprecating `boundcheck_right`.\n*   Flipping default: `nmargin = 0` (having a non-zero `nmargin` gives a false sense of security: nothing is thrown in reality).\n*   Deprecating `timeSteps_residualcheck(n)`. Replace by `minimise(max_iter=n, max_iter_is_error=False)`. `minimise` now returns `0` if convergence is successfully found.\n*   Adding `nmargin`, `time_activity`, and `max_iter_is_error` to `minimise`. Deprecating `minimise_boundcheck`.\n*   Adding `nmargin` to `flowSteps`. Deprecating `flowSteps_boundcheck`.\n*   Adding `nmargin` option to `timeStepsUntilEvent`.\n*   Adding `nmargin` option to `timeSteps`. Deprecating `timeSteps_boundcheck`.\n*   Converting `plastic_Epsdot` to pointer\n*   In case one really needs: adding `refresh`; making `update_u`, `update_v` public\n*   Adding `inc` and `setInc` (internally using `m_inc` instead of `m_t`)\n*   Adding free-function `epsy_initelastic_toquad`, `moduli_toquad`, `getuniform` to simplify transition to new API.\n*   Removing copies of `m_conn`, `m_dofs`, `m_iip`.\n*   Removing unused defaults.\n*   Forcing constructors to take all parameters, removing obsolete `all_set`. Note that the 'old' 'constructor' functions like `setMassMatrix` can still be called after the constructor if customisation is needed.\n*   Adding `alpha` to set background damping density homogeneous.\n*   Adding homogeneous `rho` (non-zero if system is homogeneous).\n*   `setEta` now disables the strain-gradient terms at the interface if argument is zero.\n*   Using GMatTensor to get version strings.\n*   Loading xtensor-python version (#153).\n*   [Python] Converting `setU`, `setV`, `setA`, `setFext` to properties.\n*   [Python] Using properties. Updating to python-goosefem \u003e=1.3.0\n*   [dependencies] gmatelastoplasticqpot \u003e=0.17.0\n*   [dependencies] goosefem \u003e=1.3.0\n*   [dependencies] catch2 \u003e=3.0.0\n*   [Python] Using NumPy-arrays everywhere.\n*   Merging implementation in headers for maintainability.\n\n### Things to change in your code\n\n*   `flowSteps`: assure that return is non-negative if `nmargin \u003e 0`.\n*   `minimise`: assure that return is zero for normal operation.\n*   `system.plastic_CurrentIndex()` -\u003e `system.plastic.i` in Python (or `system.plastic().i()` in C++).\n*   `system.boundcheck_right(n)` -\u003e `np.all(system.plastic.i \u003c system.plastic.epsy.shape[-1] - n)`.\n\n## v0.17.1\n\n*   Adding function to truncate minimization at a certain A (#130)\n\n## v0.17.0\n\n*   [BREAKING CHANGE] eventDriven: adding iterative search (replaces \"fallback\" that is immediately deprecated) (#129)\n*   Fixing GH pages (#129)\n\n## v0.16.6\n\n*   initEventDriven: Removing assertion that makes no sense (c depends on the realization)\n\n## v0.16.5\n\n*   Bugfix initEventDriven: adding missing references (#127)\n*   eventDriven: add \"yield_element\" option\n\n## v0.16.4\n\n*   eventDriven: override with additional update to UniformMultiLayerLeverDrive2d (#126)\n*   eventDriven: choosing lowest scale factor (rather than shortest distance in eq. strain space) (#125)\n*   Adding assertions (#124)\n\n## v0.16.3\n\n*   eventDriven: fixing incorrect check (#123)\n\n## v0.16.2\n\n*   UniformMultiLayerIndividualDrive2d: adding convenience function (deprecated integrated functions)\n\n## v0.16.1\n\n*   [docs] Fixing typo\n*   Removing deprecated eventDriven code. The API is kept in deprecated mode, but \"dry_run == true\" it removed immediately.\n*   Identifying error in deprecated eventDriven protocol\n*   UniformSingleLayer2d: adding \"typical_plastic_h\", \"typical_plastic_dV\", \"affineSimpleShear\", \"affineSimpleShearCentered\"\n*   Adding \"timeSteps_boundcheck\" and \"flowSteps_boundcheck\"\n\n## v0.16.0\n\n*   Add \"timeSteps\" and \"flowSteps\" (#119)\n*   Adding event driven protocol to all systems (#118)\n\n## v0.15.1\n\n*   Improving version_dependencies(). Various minor clean-ups (#115)\n\n## v0.15.0\n\n*   Adding \"reset_epsy\"\n*   Adding \"minimise_boundcheck\".\n*   Bugfix \"minimise\" return the number of iterations (not the iteration index)\n*   [Python] Removing unnecessary imports\n*   Formatting updates (#113)\n\n## v0.14.2\n\n*   [clang-format] Adding formatting suggestion\n*   [pre-commit] Applying pre-commit (#112)\n*   Version list: sorting alphabetically\n*   [Python] Minor bugfix: wrong import\n\n## v0.14.1\n\n*   Fixing missing version string.\n\n## v0.14.0\n\n*   [Python] Switching to scikit-build\n*   Renaming \"test\" -\u003e \"tests\"\n*   Updating GooseFEM::Iterate -\u003e minor stopping criterion change (#109)\n*   Fixing 'bug': computing forces only when possible (#108)\n*   HybridSystem: dealing with empty elastic or plastic definitions (#106)\n*   Improving assertion messages (#106)\n*   Minor bugfixes in UniformSingleLayer2d::LocalTrigger (#100)\n*   [CI] Using assertions\n*   [tests] Minor bugfixes (#106)\n*   [setup.py] Improve verbosity\n*   [CMake] Add CMake options USE_ASSERT, USE_DEBUG, USE_SIMD (#102)\n*   [CMake] Enable Python (deprecation) warnings\n\n## v0.13.0\n\nMulti-layer: overhaul, adding drive with a lever (#95, #96)\n\n*   Simplifying tests\n*   Adding \"UniformMultiLayerLeverDrive2d\"\n\n*   Changing protected functions \"UniformMultiLayerIndividualDrive2d\":\n    *   Splitting \"computeForceDrive\" -\u003e \"computeLayerUbarActive\"/\"computeForceFromTargetUbar\"\n    *   Adding \"updated_target_ubar\"\n\n*   Changing API \"UniformMultiLayerIndividualDrive2d\":\n\n    *   Renaming \"layerSetTargetUbarAndDistribute\" -\u003e \"layerSetUbar\"\n    *   Renaming \"setDriveStiffness\" -\u003e \"layerSetDriveStiffness\"\n    *   Adding \"layerSetTargetActive\" to activate driving springs\n    *   Adding \"layerTargetActive\"\n    *   Adding \"layerTagetUbar_addAffineSimpleShear\" that only affects the driving frame\n    *   \"addAffineSimpleShear\" (only affects body)\n    *   \"layerSetTargetUbar\" (activation of springs now in \"layerSetTargetActive\")\n\n*   Internal renaming\n*   Code-style update\n\n## v0.12.3\n\n*   Avoiding setuptools_scm dependency if SETUPTOOLS_SCM_PRETEND_VERSION is defined\n*   Multi-layer: add shear without distributing it\n\n## v0.12.2\n\n*   setup.py: use CMAKE_ARGS environment variable; removing pyxtensor dependency\n\n## v0.12.1\n\n*   timeStepsUntilEvent: allow using a maximum number of iterations\n\n## v0.12.0\n\n*   Bugfix \u0026 API extension: initializing target ubar and returning its value\n*   API change: renaming \"fdrivespring\" -\u003e \"layerFdrive\"\n*   API change: renaming \"layerSetUbar\" -\u003e \"layerSetTargetUbar\" and \"layerSetDistributeUbar\" -\u003e \"layerSetTargetUbarAndDistribute\"\n*   API change: renaming \"nlayers\" -\u003e \"nlayer\"\n*   API change: returning isplastic for all layers\n*   Minor efficiency update: avoiding temporary (#89)\n\n## v0.11.5\n\n*   `addSimpleShearToFixedStress`: making assertion on elastic step optional in\n    `addElasticSimpleShearToFixedStress` (#88)\n*   Using GMatElastoPlasticQPot::version() (#87)\n\n## v0.11.4\n\n*   Removing myargsort workaround (#86)\n*   Bugfix: bug manifesting itself only in the Python API (#85)\n*   Adding function to set time\n*   Adding code to get the number of layers\n*   Doxystyle update\n\n## v0.11.3\n\n*   Function to run time-steps until the next plastic event (#82)\n*   Wider application of xt::pytensor (#81)\n*   Removing deprecated GooseFEM functions from tests (#80)\n\n## v0.11.2\n\n*   Using xtensor-python (#79)\n*   Multi-layers: skipping of computations where possible\n*   Multi-layers: return ubar\n*   Multi-layers: Allow asymmetric drive spring\n*   Multi-layers: Get driving force per layer\n\n## v0.11.1\n\n*   Multi-layers: apply simple shear drive\n*   Multi-layers: distribute drive displacement\n\n## v0.11.0\n\n*   Integrating Python API in CMake (#73)\n*   Minor update multi-layer example. Temporarily switch off trigger test on GCC (#72)\n*   Adding multi-layered simulations (#69)\n*   Updating doxygen-awesome\n*   Minor CMake updates\n\n## v0.10.0\n\n*   Branching common methods from UniformSingleLayer2d to Generic2d\n    (UniformSingleLayer2d now only has one class based on the HybridSystem).\n*   Making returned references explicit.\n*   Adding deprecation warnings Energy() to Python API.\n\n## v0.9.4\n\n*   Class members: pass by reference (instead of copy); works also in Python API\n\n## v0.9.1\n\n*   Python API: forcing copy of certain objects (#62)\n*   Using CMake for Doxygen (#61, #62)\n*   Adding dependencies to docs\n\n## v0.9.0\n\n*   Adding convenience method \"Energy\"\n*   Removing namespace aliases\n*   Getting mass and damping matrix\n\n## v0.8.0\n\n*   Updating versioning. Python API: auto-overloading (#57)\n*   Using setuptools_scm to manage version (#56)\n*   Documenting version information. Adding eigen to version string.\n*   Renaming \"versionInfo\" -\u003e \"version_dependencies\"\n*   Adding fdamp and setV/setA\n*   [CI] Switching to GCC 8 for the moment (#51)\n*   Examples: modifying to API change, removing namespace abbreviation.\n*   Removing GoosFEM alias\n\n## v0.7.0\n\n*   Adding addAffineSimpleShearCentered (#41)\n\n## v0.6.0\n\n*   [CI] Removing travis and appveyor\n*   Adding possibility to restart (#40)\n*   Clang/Windows switching-off xtensor::optimize (#39)\n*   Getting plastic strain (#38)\n*   Reformatting CI: using clang on Windows\n*   Compute sign of displacement perturbation\n*   Add affine shear step\n*   Adding \"currentYield*\" offset overload\n*   LocalTrigger: adding option to evaluate only small slice; making energy relative to the\n    volume of a plastic element (not to that of the system); adding simple-shear search\n*   Splitting tests in several sources, enable Windows CI\n*   Trigger: most output\n*   Triggering: optimisations \u0026 minimal search (#34)\n    -   Trigger: Optimizations\n    -   Adding minimal search\n    -   Changing call of parent constructor\n*   Deprecated local energy barriers (#33)\n*   Implementation triggering of smallest energy barrier (#31)\n    -   API Change: Removing \"init\" functions, using constructors directly.\n        Adding stiffness matrix.\n    -   Adding triggering protocol\n*    Exploring energy barrier upon trigger (#30)\n*    Adding plastic_ElementYieldBarrierForSimpleShear (#28)\n*    Exploring energy landscape to local simple shear perturbation (#24)\n*    Temporarily excluding Windows from GitHub CI\n*    Adding GitHub CI\n*    Adding Python API\n*    Amplifying trigger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdegeus%2Ffrictionqpotfem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdegeus%2Ffrictionqpotfem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdegeus%2Ffrictionqpotfem/lists"}