Skip to content
Snippets Groups Projects
Commit 13964135 authored by Lambert Theisen's avatar Lambert Theisen
Browse files

Merge branch 'develop' into 'master'

Update to version 1.1

See merge request !5
parents f8714e44 a351b322
No related branches found
No related tags found
1 merge request!5Update to version 1.1
Pipeline #219163 failed
Showing
with 144 additions and 81 deletions
[run]
include =
*/src/*
\ No newline at end of file
*/fenicsR13/*
\ No newline at end of file
......@@ -40,6 +40,7 @@
"ms-python.python",
"ms-vscode.cpptools",
"lextudio.restructuredtext",
"ms-azuretools.vscode-docker"
"ms-azuretools.vscode-docker",
"ritwickdey.liveserver"
]
}
......@@ -41,4 +41,7 @@ tests/**/*.pdf
examples/**/*.pdf
# Ignore matrices
*.mat
\ No newline at end of file
*.mat
# Ignore pip folder
*egg-info/*
\ No newline at end of file
......@@ -20,13 +20,14 @@ stages:
build:environment:
stage: build
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
# - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA # no need
- docker push $CI_REGISTRY_IMAGE:latest
when: manual # skips 15min, but has to be done manually if Dockerfile changes
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
# - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA # no need
- docker push $CI_REGISTRY_IMAGE:latest
only:
- tags # skips 15min, but has to be done manually if Dockerfile changes
build:doc:
stage: build
......@@ -35,11 +36,11 @@ build:doc:
entrypoint: [""]
script:
- cd ${DOCS_DIRECTORY}
- sphinx-apidoc -o source/src ../src
- sphinx-apidoc -o source/tests/heat ../tests/heat
- sphinx-apidoc -o source/tests/stress ../tests/stress
- sphinx-apidoc -o source/tests/r13 ../tests/r13
- sphinx-apidoc -o source/examples ../examples
- sphinx-apidoc -f -o source/fenicsR13 ../fenicsR13
- sphinx-apidoc -f -o source/tests/heat ../tests/heat
- sphinx-apidoc -f -o source/tests/stress ../tests/stress
- sphinx-apidoc -f -o source/tests/r13 ../tests/r13
- sphinx-apidoc -f -o source/examples ../examples
- make html
- make latex
artifacts:
......@@ -54,6 +55,8 @@ build:doc:
.test: # dot means "hidden", acts as base class
stage: test
before_script:
- pip install .
image:
name: $CI_REGISTRY_IMAGE:latest # use prebuilt image in Gitlab's registry
entrypoint: [""] # == Repo. Has to be done if Dockerfile has own entrypoint
......@@ -61,10 +64,10 @@ build:doc:
test:pytest:
extends: .test
script:
- cd ${APP_DIRECTORY}
- pytest
- mkdir convergence_plots
- cp tests/*/*/convergence_plot* convergence_plots/
- cd ${APP_DIRECTORY}
- pytest
- mkdir convergence_plots
- cp tests/*/*/convergence_plot* convergence_plots/
artifacts:
paths:
- ${APP_DIRECTORY}/convergence_plots
......@@ -90,6 +93,8 @@ deploy:latex:
paths:
- ${DOCS_DIRECTORY}/_build/latex/${DOCS_LATEX_NAME}.pdf
expire_in: 6 month
only:
- master
pages:
stage: deploy
......@@ -99,4 +104,6 @@ pages:
- mv ${DOCS_DIRECTORY}/_build/html/ ${CI_PROJECT_DIR}/public/
artifacts:
paths:
- public
\ No newline at end of file
- public
only:
- master
\ No newline at end of file
Change log
----------
1.1 (2019-12-15)
~~~~~~~~~~~~~~~~
- Symmetrize system
- Scale the equations to match
- Introduce subfunctionals
- Subfunctionals are equal for off-diagonal entries
- Resolve stf-terms using orthogonality
- Make r13 as default in formulation rather than decoupled
- Refactor CIP as separate subfunctionals
- Add antisymm ring, not used for now but can improve convergence
- Create package
- Move files into separate folder and add setup.py
- CI is changed
- Installation through "pip install ." in toplevel
- Clean repository
1.0 (2019-09-23)
~~~~~~~~~~~~~~~~
......
......@@ -37,6 +37,10 @@ RUN \
COPY requirements.txt /tmp/
RUN pip install --requirement /tmp/requirements.txt
# Install the fenicsR13 package (puts it into the PATH)
COPY . /tmp/
RUN pip install --editable /tmp/.
# Replace default FEniCS Docker WELCOME screen with custom WELCOME screen
COPY WELCOME .
RUN echo "Built: $(date)" >> WELCOME
\ No newline at end of file
include README.rst
\ No newline at end of file
......@@ -50,6 +50,8 @@ Make sure you installed Docker and it is running on your system. You can start t
# Run (and possibly pull) fenicsr13_release service
docker-compose run --rm fenicsr13_release
# Only for developers, install the lastest version using pipeline
# pip install -e .
When you run this for the first time, docker will pull (download and extract) the container image from our repository which is roughly 800MB and the download may require some patience. After the initial download the docker image will be stored (2-3 GB) on your system and any new run will start the container immediately.
......@@ -77,7 +79,7 @@ To run a simulation execute the solver main program ``fenicsR13.py`` (which is l
.. code-block:: bash
# Run program with given input file:
python3 ../../src/fenicsR13.py input.yml
fenicsR13 input.yml
Output files will be written to a folder which is named after the ``output_folder`` keyword of the ``input.yml``. For immediate inspection the output folder contains simple visualizations in PDF files for each of the fields (temperature, pressure,...).
......@@ -103,7 +105,7 @@ We provide a simple example of a flow through a finite-length channel in 2D.
# Create mesh:
./create_mesh.sh
# Run program with given input file:
python3 ../../src/fenicsR13.py input.yml
fenicsR13 input.yml
In the output folder the results can be post-processed to demonstrate the `Knudsen paradox`_ in a simple table.
......@@ -130,7 +132,7 @@ We can test the convergence of the R13 discretization on a simple double-cylindr
# Meshes are already in Git:
ls ../mesh
# Run program with given input file:
python3 ../../src/fenicsR13.py inputs/r13_1_coeffs_nosources_norot_inflow_p1p1p1p1p1_stab.yml
fenicsR13 inputs/r13_1_coeffs_nosources_norot_inflow_p1p1p1p1p1_stab.yml
# Go to folder with simulation results (=casename in input.yml)
cd r13_1_coeffs_nosources_norot_inflow_p1p1p1p1p1_stab
# Open errors:
......@@ -150,7 +152,7 @@ FEniCS allows simple parallelization using MPI
# Parallel execution ("-u" to flash stdout)
# Usage: mpirun -n <numberOfProcesses> <serialCommand>
# E.g.: mpirun -n 4 python3 -u ../../src/fenicsR13.py input.yml
# E.g.: mpirun -n 4 fenicsR13 input.yml
Building the Docker Image Locally
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -207,7 +209,7 @@ Developer Tips
.. code-block:: bash
htop -p `{ python3 ../../src/fenicsR13.py inputs/1_coeffs_nosources_norot_inflow_p1p1p1p1p1_stab.yml > /dev/null & } && echo $!`
htop -p `{ fenicsR13 inputs/1_coeffs_nosources_norot_inflow_p1p1p1p1p1_stab.yml > /dev/null & } && echo $!`
- Use doctest with ``python3 -m doctest -v src/meshes.py``
- Run ``pydocstyle`` once in a while
......@@ -256,7 +258,7 @@ Python notes
Create new version tag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Add CHANGELOG entry
2. Adapt version in `conf.py` for docs
2. Adapt version in `conf.py` for docs and `setup.py` for package
3. Change badge in ``README.rst``
4. Change version in program information printing
......@@ -317,7 +319,7 @@ Further Installation Tips
**Interactive Jupyter Notebooks with Microsoft's Visual Studio Code**
This is may be a convenient solution.
Run a file with ``%run ../../src/fenicsr13.py``
Run a file with ``%run ../../fenicsr13/fenicsr13.py``
**X11 Window Forwarding on OSX**
......@@ -379,7 +381,7 @@ Contact
:target: https://git.rwth-aachen.de/lamboo/fenicsR13/pipelines
:alt: Test coverage
.. |version| image:: https://img.shields.io/badge/version-v1.0-blue.svg
.. |version| image:: https://img.shields.io/badge/version-v1.1-blue.svg
:target: https://git.rwth-aachen.de/lamBOO/fenicsR13/-/tags
:alt: Documentation Website
......
......@@ -12,7 +12,7 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../src'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../tests/heat'))
sys.path.insert(0, os.path.abspath('../tests/stress'))
sys.path.insert(0, os.path.abspath('../tests/r13'))
......@@ -25,7 +25,7 @@ copyright = '2019'
author = 'Lambert Theisen'
# The full version, including alpha/beta/rc tags
release = '1.0'
release = '1.1'
# -- General configuration ---------------------------------------------------
......
......@@ -17,8 +17,8 @@ Contents
.. toctree::
:glob:
source/src/modules.rst
source/fenicsR13/modules.rst
source/tests/heat/modules.rst
source/tests/stress/modules.rst
source/tests/r13/modules.rst
source/examples/modules.rst
\ No newline at end of file
source/examples/modules.rst
fenicsR13 package
=================
Submodules
----------
fenicsR13.fenicsR13 module
--------------------------
.. automodule:: fenicsR13.fenicsR13
:members:
:undoc-members:
:show-inheritance:
fenicsR13.geoToH5 module
------------------------
.. automodule:: fenicsR13.geoToH5
:members:
:undoc-members:
:show-inheritance:
fenicsR13.input module
----------------------
.. automodule:: fenicsR13.input
:members:
:undoc-members:
:show-inheritance:
fenicsR13.meshes module
-----------------------
.. automodule:: fenicsR13.meshes
:members:
:undoc-members:
:show-inheritance:
fenicsR13.postprocessor module
------------------------------
.. automodule:: fenicsR13.postprocessor
:members:
:undoc-members:
:show-inheritance:
fenicsR13.solver module
-----------------------
.. automodule:: fenicsR13.solver
:members:
:undoc-members:
:show-inheritance:
fenicsR13.tensoroperations module
---------------------------------
.. automodule:: fenicsR13.tensoroperations
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: fenicsR13
:members:
:undoc-members:
:show-inheritance:
src
===
fenicsR13
=========
.. toctree::
:maxdepth: 4
fenicsR13
input
meshes
postprocessor
solver
tensoroperations
geoToH5
fenicsR13 module
================
.. automodule:: fenicsR13
:members:
:undoc-members:
:show-inheritance:
geoToH5 module
==============
.. automodule:: geoToH5
:members:
:undoc-members:
:show-inheritance:
input module
============
.. automodule:: input
:members:
:undoc-members:
:show-inheritance:
meshes module
=============
.. automodule:: meshes
:members:
:undoc-members:
:show-inheritance:
postprocessor module
====================
.. automodule:: postprocessor
:members:
:undoc-members:
:show-inheritance:
solver module
=============
.. automodule:: solver
:members:
:undoc-members:
:show-inheritance:
tensoroperations module
=======================
.. automodule:: tensoroperations
:members:
:undoc-members:
:show-inheritance:
#!/bin/bash
python3 ../../src/geoToH5.py channel.geo channel5.h5 "-setnumber p 5"
\ No newline at end of file
geoToH5 channel.geo channel5.h5 "-setnumber p 5"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment