-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
796 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build wheels | ||
|
||
# By default this action does not push to test or production PyPI. The wheels | ||
# are available as an artifact that can be downloaded and tested locally. | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ufl_ref: | ||
description: "UFL git ref to checkout" | ||
default: "main" | ||
type: string | ||
test_pypi_publish: | ||
description: "Publish to Test PyPi (true | false)" | ||
default: false | ||
type: boolean | ||
pypi_publish: | ||
description: "Publish to PyPi (true | false)" | ||
default: false | ||
type: boolean | ||
|
||
workflow_call: | ||
inputs: | ||
ufl_ref: | ||
description: "UFL git ref to checkout" | ||
default: "main" | ||
type: string | ||
test_pypi_publish: | ||
description: "Publish to Test PyPi (true | false)" | ||
default: false | ||
type: boolean | ||
pypi_publish: | ||
description: "Publish to PyPi (true | false))" | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
name: Build wheels and source distributions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout UFL | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.ufl_ref }} | ||
|
||
- name: Upgrade pip and setuptools | ||
run: python -m pip install setuptools pip build --upgrade | ||
|
||
- name: Build sdist and wheel | ||
run: python -m build . | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/* | ||
|
||
upload_pypi: | ||
name: Upload to PyPI (optional) | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
if: ${{ github.event.inputs.test_pypi_publish }} | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
repository_url: https://pypi.org/legacy/ | ||
|
||
- uses: pypa/[email protected] | ||
if: ${{ github.event.inputs.pypi_publish }} | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TEST_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# This workflow will install Basix, FFCx, DOLFINx and run the DOLFINx and FFCx unit tests. | ||
|
||
name: FEniCSx integration | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ffcx-tests: | ||
name: Run FFCx tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install test dependencies | ||
run: | | ||
sudo apt-get install -y graphviz libgraphviz-dev ninja-build pkg-config | ||
- name: Install UFL | ||
run: | | ||
pip3 install . | ||
- name: Install Basix | ||
run: | | ||
python3 -m pip install git+https://github.com/FEniCS/basix.git | ||
- name: Clone FFCx | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ./ffcx | ||
repository: FEniCS/ffcx | ||
ref: main | ||
- name: Install FFCx | ||
run: | | ||
cd ffcx | ||
pip install .[ci] | ||
- name: Run FFCx unit tests | ||
run: python3 -m pytest -n auto ffcx/test | ||
|
||
dolfinx-tests: | ||
name: Run DOLFINx tests | ||
runs-on: ubuntu-latest | ||
container: fenicsproject/test-env:latest-openmpi | ||
|
||
env: | ||
CC: clang | ||
CXX: clang++ | ||
|
||
PETSC_ARCH: linux-gnu-complex-32 | ||
OMPI_ALLOW_RUN_AS_ROOT: 1 | ||
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 | ||
OMPI_MCA_rmaps_base_oversubscribe: 1 | ||
OMPI_MCA_plm: isolated | ||
OMPI_MCA_btl_vader_single_copy_mechanism: none | ||
OMPI_MCA_mpi_yield_when_idle: 1 | ||
OMPI_MCA_hwloc_base_binding_policy: none | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies (Python) | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
- name: Install UFL | ||
run: | | ||
pip3 install . | ||
- name: Install Basix and FFCx | ||
run: | | ||
python3 -m pip install git+https://github.com/FEniCS/basix.git | ||
python3 -m pip install git+https://github.com/FEniCS/ffcx.git | ||
- name: Clone DOLFINx | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ./dolfinx | ||
repository: FEniCS/dolfinx | ||
ref: main | ||
- name: Install DOLFINx | ||
run: | | ||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx/cpp/ | ||
cmake --build build | ||
cmake --install build | ||
pip3 -v install --global-option build --global-option --debug dolfinx/python/ | ||
- name: Run DOLFINx unit tests | ||
run: python3 -m pytest -n auto dolfinx/python/test/unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# Author: Martin Sandve Alnes | ||
# Date: 2008-10-03 | ||
# | ||
from ufl import (Coefficient, TestFunction, TrialFunction, VectorElement, dx, | ||
i, j, triangle) | ||
|
||
element = VectorElement("Lagrange", triangle, 1) | ||
|
||
u = TrialFunction(element) | ||
v = TestFunction(element) | ||
w = Coefficient(element) | ||
|
||
a = (u[j] * w[i].dx(j) + w[j] * u[i].dx(j)) * v[i] * dx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.