Skip to content

Commit

Permalink
Add FKM nonlinear functionality
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Maier <[email protected]>
Co-authored-by: Johannes Mueller <[email protected]>
  • Loading branch information
maierbn and johannes-mueller committed Nov 28, 2023
1 parent 3cad0a0 commit ae9f443
Show file tree
Hide file tree
Showing 118 changed files with 16,580 additions and 381 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pylife/_version.py export-subst

*.ipynb filter=jupyter_clean
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ __pycache__/*
.idea
.vscode
tags
.spyproject

# Package files
*.egg
Expand Down Expand Up @@ -61,4 +62,4 @@ coverage_report*

.hypothesis
.mutmut-cache
.python-version
.python-version
5 changes: 1 addition & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ In this file noteworthy changes of new releases of pyLife are documented since

### New features

* History output for `odbclient`

* `WoehlerCurve.miner_original()`

* Introduce `WoehlerCurve.miner_original()`

### Breaking changes

Expand Down
3 changes: 3 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@

Robert Bosch GmbH
Vivien Le Baube <[email protected]>
Sebastian Bucher <[email protected]>
Lisa Katharina Hill <[email protected]>
Mustapha Kassem <[email protected]>
Gyöngyvér Kiss <[email protected]>
Daniel Christopher Kreuter <[email protected]>
Kristina Lepper <[email protected]>
Benjamin Maier <[email protected]>
Mate Mark <[email protected]>
Johannes Mueller <[email protected]>
Erik Natkowski <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ There are/will be the following subpackages:
* `strength` everything related to strength calculation
* failure probability estimation
* S-N-calculations
* local strain concept: FKM guideline nonlinear
* ...
* `mesh` FEM mesh related stuff
* stress gradients
Expand Down
9 changes: 9 additions & 0 deletions batch_scripts/build_docs.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
:: go one level up, if started from within the batch_scripts directory
set BATCH_PATH=%cd%

:: test if current path contains "batch_scripts"
if not x%BATCH_PATH%==x%BATCH_PATH:batch_scripts=% (
echo "cd"
cd ..
)

call conda activate ./.venv

for /f "tokens=*" %%a in ('git rev-parse --show-toplevel') do (set repo_path=%%a)
Expand Down
16 changes: 14 additions & 2 deletions batch_scripts/create_pylife_environment.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
:: go one level up, if started from within the batch_scripts directory
set BATCH_PATH=%cd%

:: test if current path contains "batch_scripts"
if not x%BATCH_PATH%==x%BATCH_PATH:batch_scripts=% (
echo "cd"
cd ..
)

call conda deactivate

call conda env remove -p ./.venv

for /f "tokens=*" %%a in ('git rev-parse --show-toplevel') do (set repo_path=%%a)

set jupyter_path=%repo_path%/.venv/Scripts/jupyter

call git config filter.jupyter_clean.clean "%jupyter_path% nbconvert --stdin --stdout --to notebook --ClearOutputPreprocessor.enabled=True"
rem filter disabled because it takes very long on windows and makes sourcetree basically unusable
rem call git config filter.jupyter_clean.clean "%jupyter_path% nbconvert --stdin --stdout --to notebook --ClearOutputPreprocessor.enabled=True"

call conda create -p .venv pip=20.2 pandoc setuptools_scm "python==3.9"
call conda create -p .venv --yes pip=20.2 pandoc setuptools_scm "python==3.9"

call conda activate ./.venv

Expand Down
8 changes: 4 additions & 4 deletions batch_scripts/create_pylife_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@


if [[ `uname` = Linux ]] ; then
JUPYTER=`git rev-parse --show-toplevel`/_venv/bin/jupyter
JUPYTER=`git rev-parse --show-toplevel`/.venv/bin/jupyter
. $ANACONDA_HOME/etc/profile.d/conda.sh
else
JUPYTER=`git rev-parse --show-toplevel`/_venv/Scripts/jupyter
JUPYTER=`git rev-parse --show-toplevel`/.venv/Scripts/jupyter
eval "$('/c/Program Files/Anaconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
fi

Expand All @@ -14,9 +14,9 @@ git config filter.jupyter_clean.clean \
--stdin --stdout --to notebook --ClearOutputPreprocessor.enabled=True"


conda env create -p _venv --file environment.yml
conda env create -p .venv --file environment.yml

conda activate ./_venv
conda activate ./.venv

if [[ `uname` != Linux ]] ; then
conda install pywin32
Expand Down
9 changes: 9 additions & 0 deletions batch_scripts/run_code_analysis.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
:: go one level up, if started from within the batch_scripts directory
set BATCH_PATH=%cd%

:: test if current path contains "batch_scripts"
if not x%BATCH_PATH%==x%BATCH_PATH:batch_scripts=% (
echo "cd"
cd ..
)

call conda activate ./.venv

if exist flake8.log del flake8.log
Expand Down
10 changes: 10 additions & 0 deletions batch_scripts/run_pylife_tests.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
:: go one level up, if started from within the batch_scripts directory
set BATCH_PATH=%cd%

:: test if current path contains "batch_scripts"
if not x%BATCH_PATH%==x%BATCH_PATH:batch_scripts=% (
echo "cd"
cd ..
)


call conda activate ./.venv

call python setup.py build_ext --inplace --force --define CYTHON_TRACE
Expand Down
11 changes: 10 additions & 1 deletion batch_scripts/run_test_cov_analysis.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
call conda activate ./_venv
:: go one level up, if started from within the batch_scripts directory
set BATCH_PATH=%cd%

:: test if current path contains "batch_scripts"
if not x%BATCH_PATH%==x%BATCH_PATH:batch_scripts=% (
echo "cd"
cd ..
)

call conda activate ./.venv

call python batch_scripts\test_cov_analysis.py E:\pyLife_coverage\ || exit /B 1
11 changes: 9 additions & 2 deletions batch_scripts/start_Jupyter_notebook.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
call conda activate ../_venv
call jupyter notebook --notebook-dir ../demos
rem go one level up
cd ..

call conda activate ./.venv

rem make sure that jupyter is installed
call pip install jupyter

call jupyter notebook --notebook-dir ./demos

2 changes: 2 additions & 0 deletions demos/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.png
data/*
Binary file added demos/data/kt1.odb
Binary file not shown.
Binary file added demos/data/kt1.rst
Binary file not shown.
Binary file added demos/data/kt1.vmap
Binary file not shown.
4 changes: 4 additions & 0 deletions demos/fkm_nonlinear/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.ipynb_checkpoints/*
dump/*
*.png
data/*
Loading

0 comments on commit ae9f443

Please sign in to comment.