Skip to content

Various updates to cope with changes in interpolation points behavior #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: dokken92/dolfinx_custom:15072022
container: dokken92/dolfinx_custom:10082022

env:
HDF5_MPI: "ON"
Expand All @@ -34,6 +34,16 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Reinstall hdf5 with zlib enabled
run: |
export HDF5_SERIES=1.12
export HDF5_PATCH=2
wget -nc --quiet https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_SERIES}/hdf5-${HDF5_SERIES}.${HDF5_PATCH}/src/hdf5-${HDF5_SERIES}.${HDF5_PATCH}.tar.gz
tar xfz hdf5-${HDF5_SERIES}.${HDF5_PATCH}.tar.gz
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DHDF5_ENABLE_PARALLEL=on -DHDF5_ENABLE_Z_LIB_SUPPORT=on -B build-dir -S hdf5-${HDF5_SERIES}.${HDF5_PATCH}
cmake --build build-dir
cmake --install build-dir

- name: Test complex notebooks in parallel
run: |
export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a basic workflow to help you get started with Actions
name: Test against DOLFINx main
name: Test against DOLFINx nightly build

# Controls when the action will run.
on:
Expand All @@ -23,7 +23,7 @@ jobs:
test-against-master:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: dolfinx/lab
container: dolfinx/lab:nightly

env:
HDF5_MPI: "ON"
Expand All @@ -37,14 +37,10 @@ jobs:
- name: Install dependencies
run: |
pip3 install --upgrade pip setuptools
CC=mpicc HDF_MPI="ON" HDF5_DIR="/usr/lib/x86_64-linux-gnu/hdf5/mpich/" pip3 install --no-cache-dir -r docker/requirements.txt
CC=mpicc HDF_MPI="ON" HDF5_DIR="/usr/local/" pip3 install --no-cache-dir -r docker/requirements.txt
apt-get -qq update
apt-get install -y libgl1-mesa-dev xvfb nodejs
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
jupyter nbextension enable --py --sys-prefix ipygany
rm -rf /usr/local/share/.cache/*
jupyter-book -h

- name: Test complex notebooks in parallel
run: |
export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH
Expand Down
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"cppStandard": "c++20",
"intelliSenseMode": "clang-x64",
"configurationProvider": "vector-of-bool.cmake-tools"
}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dokken92/dolfinx_custom:15072022
FROM dokken92/dolfinx_custom:10082022

# create user with a home directory
ARG NB_USER
Expand Down
4 changes: 2 additions & 2 deletions chapter1/complex_mode.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d78185ab2481475d8596d2e5cfa2f975",
"model_id": "66c7da35aae94a36ba1d467abc3c2813",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -455,7 +455,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8594601f751740259e13087567cb8d79",
"model_id": "5a0ab66cd1534a01b7c9accbb5195d17",
"version_major": 2,
"version_minor": 0
},
Expand Down
2 changes: 1 addition & 1 deletion chapter1/complex_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.8
# jupytext_version: 1.14.1
# kernelspec:
# display_name: Python 3 (DOLFINx complex)
# language: python
Expand Down
14 changes: 7 additions & 7 deletions chapter1/fundamentals_code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[0m\u001b[2m2022-07-15 17:29:58.326 ( 0.450s) [ A689B000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-07-15 17:29:58.327 ( 0.451s) [ A689B000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 144 edges\u001b[0m\n"
"\u001b[0m\u001b[2m2022-08-02 20:46:58.678 ( 0.504s) [ E9A08000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-08-02 20:46:58.680 ( 0.505s) [ E9A08000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 144 edges\u001b[0m\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "aa1c4a39e706471fbbbc7660e9e614cc",
"model_id": "8833305ed85e4409a9fe2fdec6f65e1c",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -576,14 +576,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[0m\u001b[2m2022-07-15 17:29:58.535 ( 0.659s) [ A689B000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-07-15 17:29:58.536 ( 0.660s) [ A689B000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 144 edges\u001b[0m\n"
"\u001b[0m\u001b[2m2022-08-02 20:46:58.857 ( 0.682s) [ E9A08000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-08-02 20:46:58.857 ( 0.683s) [ E9A08000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 144 edges\u001b[0m\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fe89f520dad64572a085fb57e0320767",
"model_id": "279adf14586f46d3a74ff0b59508320e",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -628,7 +628,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "239cddce9b5c4e09b0c82c36b5f3cac6",
"model_id": "52757f88d1f94148abb73097db74fbfd",
"version_major": 2,
"version_minor": 0
},
Expand Down
2 changes: 1 addition & 1 deletion chapter1/fundamentals_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.8
# jupytext_version: 1.14.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand Down
14 changes: 7 additions & 7 deletions chapter1/membrane_code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@
"text": [
"Info : Meshing 1D...\n",
"Info : Meshing curve 1 (Ellipse)\n",
"Info : Done meshing 1D (Wall 0.000842374s, CPU 0.000939s)\n",
"Info : Done meshing 1D (Wall 0.000226477s, CPU 0.000384s)\n",
"Info : Meshing 2D...\n",
"Info : Meshing surface 1 (Plane, Frontal-Delaunay)\n",
"Info : Done meshing 2D (Wall 0.0902373s, CPU 0.088198s)\n",
"Info : Done meshing 2D (Wall 0.0965884s, CPU 0.086913s)\n",
"Info : 1550 nodes 3099 elements\n"
]
}
Expand Down Expand Up @@ -244,7 +244,7 @@
"outputs": [],
"source": [
"Q = fem.FunctionSpace(domain, (\"CG\", 5))\n",
"expr = fem.Expression(p, Q.element.interpolation_points)\n",
"expr = fem.Expression(p, Q.element.interpolation_points())\n",
"pressure = fem.Function(Q)\n",
"pressure.interpolate(expr)"
]
Expand All @@ -268,14 +268,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[0m\u001b[2m2022-07-15 17:30:39.952 ( 0.525s) [ 76AC1000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-07-15 17:30:39.958 ( 0.531s) [ 76AC1000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 4521 edges\u001b[0m\n"
"\u001b[0m\u001b[2m2022-08-02 20:47:36.095 ( 0.515s) [ AAFB6000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-08-02 20:47:36.097 ( 0.517s) [ AAFB6000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 4521 edges\u001b[0m\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "32d8b1feff23457cb167bf0dc36d7ab8",
"model_id": "24700d1f20794182a8ddebf1c27e1932",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -324,7 +324,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1f73d1fd610047b7b68f4ebd6375eec0",
"model_id": "f8634199f8414d71ae613c7e9874dcbd",
"version_major": 2,
"version_minor": 0
},
Expand Down
4 changes: 2 additions & 2 deletions chapter1/membrane_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.8
# jupytext_version: 1.14.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand Down Expand Up @@ -103,7 +103,7 @@ def on_boundary(x):
# We choose a high order function space to represent the function `p`, as it is rapidly varying in space.

Q = fem.FunctionSpace(domain, ("CG", 5))
expr = fem.Expression(p, Q.element.interpolation_points)
expr = fem.Expression(p, Q.element.interpolation_points())
pressure = fem.Function(Q)
pressure.interpolate(expr)

Expand Down
8 changes: 4 additions & 4 deletions chapter1/nitsche.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"uD = fem.Function(V)\n",
"x = SpatialCoordinate(domain)\n",
"u_ex = 1 + x[0]**2 + 2 * x[1]**2\n",
"uD.interpolate(fem.Expression(u_ex, V.element.interpolation_points))\n",
"uD.interpolate(fem.Expression(u_ex, V.element.interpolation_points()))\n",
"f = -div(grad(u_ex))"
]
},
Expand Down Expand Up @@ -193,14 +193,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[0m\u001b[2m2022-07-15 17:31:16.036 ( 0.500s) [ 16C12000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-07-15 17:31:16.037 ( 0.501s) [ 16C12000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 208 edges\u001b[0m\n"
"\u001b[0m\u001b[2m2022-08-02 20:48:31.960 ( 0.530s) [ 598FA000] vtkExtractEdges.cxx:435 INFO| \u001b[0mExecuting edge extractor: points are renumbered\u001b[0m\n",
"\u001b[0m\u001b[2m2022-08-02 20:48:31.960 ( 0.530s) [ 598FA000] vtkExtractEdges.cxx:551 INFO| \u001b[0mCreated 208 edges\u001b[0m\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c1151bce0df445a5b20608eccb0dc6ee",
"model_id": "1f2111a6e38446b2be61c5525121ee05",
"version_major": 2,
"version_minor": 0
},
Expand Down
4 changes: 2 additions & 2 deletions chapter1/nitsche.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.8
# jupytext_version: 1.14.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand Down Expand Up @@ -39,7 +39,7 @@
uD = fem.Function(V)
x = SpatialCoordinate(domain)
u_ex = 1 + x[0]**2 + 2 * x[1]**2
uD.interpolate(fem.Expression(u_ex, V.element.interpolation_points))
uD.interpolate(fem.Expression(u_ex, V.element.interpolation_points()))
f = -div(grad(u_ex))

# As opposed to the first tutorial, we now have to have another look at the variational form.
Expand Down
12 changes: 6 additions & 6 deletions chapter2/diffusion_code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8184884ce87c47cda0ca7923ae6474f1",
"model_id": "048931ab619b41a8ac3f2375b33e332f",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -253,7 +253,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c69b7172698c4489aaa5ad8975c47054",
"model_id": "c8102987cc1e47c5a7d15580bbf6b5e3",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -267,7 +267,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cba04856488a408a84dbee58c05162f1",
"model_id": "64a729318221480fa6c767317c5ad623",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -281,7 +281,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6aa11e8fe8174a43be5a24a8ae0dc99f",
"model_id": "66329a55399e4652b1aa04b27b3e544b",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -295,7 +295,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b3cb8e9dd647481c98fa550cc779698d",
"model_id": "7ced58816f57424790b6e618f09dccad",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -309,7 +309,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8e3212f0f35b4953a4d4d91b8a4a7cf5",
"model_id": "15e98a9021ed49e28f7eef30fc5f945d",
"version_major": 2,
"version_minor": 0
},
Expand Down
2 changes: 1 addition & 1 deletion chapter2/diffusion_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.8
# jupytext_version: 1.14.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand Down
2 changes: 1 addition & 1 deletion chapter2/heat_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.8
# jupytext_version: 1.14.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand Down
Loading