Skip to content

Commit

Permalink
Merge pull request #41 from kumiori/andres-rev-patch
Browse files Browse the repository at this point in the history
Andres rev patch
  • Loading branch information
kumiori authored Mar 20, 2024
2 parents eb8916d + a3dbb6b commit 6b502ac
Show file tree
Hide file tree
Showing 708 changed files with 30,050 additions and 15,437 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'
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@
**/*.mat*
**/.DS_Store

build/

# sphinx
docs/build/

# branch-specific tests
test_*/
test_*/
src/irrevolutions/test/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: leon.baldelli@cnrs.fr
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
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.

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 6b502ac

Please sign in to comment.