Skip to content

Commit

Permalink
merge main after rev-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
d2f4d131d9eac6cc27e3d6245ab1476b committed Mar 22, 2024
2 parents 5eb55b4 + 13fc785 commit f894446
Show file tree
Hide file tree
Showing 714 changed files with 30,374 additions and 15,703 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/learn-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: learn-github-actions
run-name: ${{ github.actor }} is learning GitHub Actions
on: [push]
jobs:
check-bats-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install -g bats
- run: bats -v
25 changes: 25 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pylint
run-name: ${{ github.actor }} is linting the code

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
# pylint $(git ls-files '*.py')
git ls-files '*.py'
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
**/*.mat*
**/.DS_Store

build/

# sphinx
docs/build/

Expand All @@ -51,4 +53,7 @@ docs/build/
# branch-specific tests
build/*

**.egg-info
**.egg-info
test_*/
src/irrevolutions/test/output/*
**/output/**
11 changes: 11 additions & 0 deletions .pre-commit-autoflake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- id: autoflake
name: autoflake
entry: autoflake
language: python
"types": [python]
require_serial: true
args:
- "--in-place"
- "--expand-star-imports"
- "--remove-duplicate-keys"
- "--remove-unused-variables"
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort

# - repo: https://github.com/PyCQA/pylint
# rev: 2.11.1
# hooks:
# - id: pylint
# args: [src/irrevolutions/*.py]

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.2
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format

- repo: https://github.com/myint/autoflake
rev: v2.3.1
hooks:
- id: autoflake
additional_dependencies: [autoflake==1.8.0]
args: [--remove-all-unused-imports, --remove-unused-variables, --in-place, src/irrevolutions/*.py]

- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
language_version: python3
37 changes: 37 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Variational Solvers for Irreversible Evolutionary Systems
message: >-
Three solvers for irreversible evolutionary processes with
a general energetic notion of stability.
type: software
authors:
- given-names: Andrés A
family-names: León Baldelli
email: [email protected]
affiliation: '∂’Alembert Institute, CNRS, Sorbonne Universités'
orcid: 'https://orcid.org/0000-0002-3019-602X'
repository-code: 'https://github.com/kumiori/mec647/'
url: 'https://irreversible-variational-solvers.readthedocs.io/'
abstract: >-
To study irreversible evolutionary processes with a
general energetic notion of stability, three nonlinear
variational solvers are modular components that address
mathematical problems that are general enough to apply, in
principle, to systems with instabilities, jumps, and
emergence of patterns which is commonplace in diverse
arenas spanning from quantum to continuum mechanics,
economy, social sciences, and ecology. Our motivation
proceeds from fracture mechanics, with the ultimate goal
of deploying a transparent numerical platform for
scientific validation and prediction of large scale
natural fracture phenomena.
keywords:
- stability
- bifurcation
- irreversibility
- singular perturbations
- fracture
license: GPL-3.0
42 changes: 1 addition & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,6 @@ This code was initially conceived as a support for the teaching course MEC647,
master programme, joint between École Polytechnique and ENSTA-Paristech throughout 2020-2022.
Hence the cryptic repository name.

### Course Schedule


- 0 Introduction, motivation, and a simple experiment, in theory.
- 1 Numerics, from the basics to the solution of a linear variational problem
- 2 The notion of stability, stability of a brittle bar. The elasticity problem
- 3 Energetics link fracture to damage. Project walkthrough
- 4 The damage problem: analytics and numerics
- 5 Calibration (material, numerical) and tests
- 6 Data analysis and presentation
- Rest
- 7 Defence


### Authors
- Cf. commit messages

### Course Instructors/Authors

- V Lazarus, Sorbonne Université.
- A Leon Baldelli, CR CNRS.


### Acknowledgements

Expand All @@ -113,22 +91,4 @@ Corrado Maurini, Sorbonne Université.

### License

MIT License, see `LICENSE` file.

### Tests

test_1d.py
test_2d.py

test_cone_convergence.py
test_cone_project.py
test_elasticity.py
test_extend.py
test_rayleigh.py
test_vector_info.py
test_vi.py
test_traction.py
test_bifurcation.py
test_logging_mpi.py
test_scatter.py

See `LICENSE` file.
41 changes: 0 additions & 41 deletions __init__.py

This file was deleted.

18 changes: 0 additions & 18 deletions algorithms/__init__.py

This file was deleted.

63 changes: 48 additions & 15 deletions contributed/DIC_CT_35/direction_plot.ipynb

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions contributed/DIC_CT_35/export_msh.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@


os.system("gmsh -2 " + filename + ".geo -format msh2")
os.system("dolfin-convert " + filename + ".msh " + filename +".xml")
os.system("dolfin-convert " + filename + ".msh " + filename + ".xml")
os.remove(filename + ".msh")
#xml to h5 (1-3)
# xml to h5 (1-3)
mesh = Mesh(filename + ".xml")
#boundaries = MeshFunction("size_t", mesh, "mesh4_facet_region.xml")
subdomains = MeshFunction("size_t", mesh, filename + "_physical_region.xml")
boundaries = MeshFunction("size_t", mesh, filename + "_facet_region.xml")



hdf = HDF5File(mesh.mpi_comm(), filename + ".h5", "w")
hdf.write(mesh, "/mesh")
hdf.write(boundaries, "/boundaries")
Expand All @@ -41,5 +40,3 @@

#subdomains = MeshFunction("size_t", mesh,2)
#hdf.read(subdomains, "/subdomains")


Loading

0 comments on commit f894446

Please sign in to comment.