Skip to content

Commit 15c02f8

Browse files
jorgensdjuliusghrossbm1MPenaRdependabot[bot]
committed
Fix typo (#300)
* Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Dokken/bump release (#249) * Update elasticity_scaling.md (#242) * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update elasticity_scaling.md --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com> Co-authored-by: Jørgen S. Dokken <dokken@simula.no> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update navierstokes.md (#247) * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update navierstokes.md --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com> Co-authored-by: Jørgen S. Dokken <dokken@simula.no> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Adding Acoustic Helmholtz equation to the tutorial (#232) * Acoustic Helmholtz scripts helmholtz.md contains the mathematical derivation of the variational formulation, while the helmholtz_code scripts contain the implementation. * Fix * equations rendering bug fixed * Update helmholtz.md Equations rendering second fix, missing spaces * Major updates to helmholtz * Add to toc * Updates to helmholtz * Update to work in parallel --------- Co-authored-by: jorgensd <dokken92@gmail.com> * Make helmholtz backwards compatible (#248) * Native arm build (#240) * Try new publish workflow * Fix platform choice * Update workflow to merge artifacts to one place * Set retention days to minimum * Fix name * change name to pattern * Minor improvements * Try new strategy * Remove duplicate tag * Revert platform tags * Use correct dockerfile * remove first login * Add merge skip if not pushing on release or tagging * Set push to false as we don't need the images before merging. * Remove push * Remove conditional to check that simpler code runs * Add back pushtrue * Revert comment --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: mleoni-pf <160495781+mleoni-pf@users.noreply.github.com> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Antonio Baiano Svizzero <107617271+bayswiss@users.noreply.github.com> * Update linearelasticity_code.ipynb (#246) * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update linearelasticity_code.ipynb * Add sync with `python3 -m jupytext --sync */*.ipynb` --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com> Co-authored-by: Jørgen S. Dokken <dokken@simula.no> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update linearelasticity_code.ipynb (#245) * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update linearelasticity_code.ipynb * Add sync with --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com> Co-authored-by: Jørgen S. Dokken <dokken@simula.no> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update linearelasticity_code.ipynb (#244) * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update linearelasticity_code.ipynb * Sync file --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com> Co-authored-by: Jørgen S. Dokken <dokken@simula.no> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update linearelasticity_code.ipynb (#243) * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update linearelasticity_code.ipynb * sync --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com> Co-authored-by: Jørgen S. Dokken <dokken@simula.no> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update ns_code2.ipynb (#241) * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](actions/configure-pages@v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update ns_code2.ipynb * Update ns code --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com> Co-authored-by: Jørgen S. Dokken <dokken@simula.no> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add files via upload (#250) * Remove dead link * Add fix from #253 + some other typs in that text. (#256) * Add propsoed solution to #205 (#257) * Add singular Poisson demo. Resolves: #139 (#263) * Add extra note on conversion from new python files (#265) * Adaptive mesh refinement with NetGen (#266) * Add amr demo * Update CI * Update pyproject.toml * Simplify dockerfile as vtk is now on pypi on linux arch * Fix indent * Make netgen optional as it is not on pypi on linux/arm * Build netgen from source * Add netgen to stable book build (#267) * Update text to reflect that there is a docker image (#268) * Strip output and adapt eta definition, ref comment from Jack Hale (#269) * Finish trailing sentence (#270) * Try removing xvfb for most tutorials (#278) * Try removing xvfb for most tutorials * INstall osmesa * Remove -W * Add offscreen false to jupyter build * Remove some more xvfb and move new variables * Lower bound on vtk * Change tag on release branch * Another rename * Update pctools paper * Update em.ipynb typo * Sync py file * Update action.yml * Turn off compression with meshio --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena <mpena991@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mleoni-pf <160495781+mleoni-pf@users.noreply.github.com> Co-authored-by: Antonio Baiano Svizzero <107617271+bayswiss@users.noreply.github.com>
1 parent e6642b4 commit 15c02f8

5 files changed

Lines changed: 62 additions & 25 deletions

File tree

‎.github/actions/install-dependencies/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ runs:
66
- name: Install apt dependencies and upgrade pip
77
shell: bash -el {0}
88
run: |
9-
apt-get update && apt-get install -y libxrender1 libgl1-mesa-dev mesa-utils
9+
apt-get update && apt-get install -y libxrender1 libgl1-mesa-dev mesa-utils gzip

‎chapter3/em.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"\n",
4545
"which holds for an isotropic linear magnetic medium.\n",
4646
"Here, $\\mu$ is the magnetic permability of the material.\n",
47-
"Now, since $B$ is solenodial (divergence free) accoording to Maxwell's equations, we known that $B$ must be the curl of some vector field $A$. This field is called the magnetic vector potential. Since the problem is static and thus $\\frac{\\partial D}{\\partial t}=0$, it follows that\n",
47+
"Now, since $B$ is solenodial (divergence free) according to Maxwell's equations, we known that $B$ must be the curl of some vector field $A$. This field is called the magnetic vector potential. Since the problem is static and thus $\\frac{\\partial D}{\\partial t}=0$, it follows that\n",
4848
"\n",
4949
"$$\n",
5050
"J = \\nabla \\times H = \\nabla \\times(\\mu^{-1} B)=\\nabla \\times (\\mu^{-1}\\nabla \\times A ) = -\\nabla \\cdot (\\mu^{-1}\\nabla A).\n",

‎chapter3/em.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#
5454
# which holds for an isotropic linear magnetic medium.
5555
# Here, $\mu$ is the magnetic permability of the material.
56-
# Now, since $B$ is solenodial (divergence free) accoording to Maxwell's equations, we known that $B$ must be the curl of some vector field $A$. This field is called the magnetic vector potential. Since the problem is static and thus $\frac{\partial D}{\partial t}=0$, it follows that
56+
# Now, since $B$ is solenodial (divergence free) according to Maxwell's equations, we known that $B$ must be the curl of some vector field $A$. This field is called the magnetic vector potential. Since the problem is static and thus $\frac{\partial D}{\partial t}=0$, it follows that
5757
#
5858
# $$
5959
# J = \nabla \times H = \nabla \times(\mu^{-1} B)=\nabla \times (\mu^{-1}\nabla \times A ) = -\nabla \cdot (\mu^{-1}\nabla A).

‎chapter3/subdomains.ipynb‎

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"metadata": {},
66
"source": [
77
"# Defining subdomains for different materials\n",
8+
"\n",
89
"Author: Jørgen S. Dokken\n",
910
"\n",
1011
"Solving PDEs in domains made up of different materials is a frequently encountered task. In FEniCSx, we handle these problems by defining a Discontinous cell-wise constant function.\n",
1112
"Such a function can be created over any mesh in the following way\n",
12-
"## Subdomains on built-in meshes"
13+
"\n",
14+
"## Subdomains on built-in meshes\n"
1315
]
1416
},
1517
{
@@ -56,7 +58,7 @@
5658
},
5759
"source": [
5860
"We will use a simple example with two materials in two dimensions to demonstrate the idea. The whole domain will be $\\Omega=[0,1]\\times[0,1]$, which consists of two subdomains\n",
59-
"$\\Omega_0=[0,1]\\times [0,1/2]$ and $\\Omega_1=[0,1]\\times[1/2, 1]$. We start by creating two python functions, where each returns `True` if the input coordinate is inside its domain."
61+
"$\\Omega_0=[0,1]\\times [0,1/2]$ and $\\Omega_1=[0,1]\\times[1/2, 1]$. We start by creating two python functions, where each returns `True` if the input coordinate is inside its domain.\n"
6062
]
6163
},
6264
{
@@ -84,14 +86,16 @@
8486
"$$\n",
8587
"-\\nabla \\cdot [\\kappa (x,y)\\nabla u(x, y)]= 1 \\qquad \\text{in } \\Omega,\n",
8688
"$$\n",
89+
"\n",
8790
"$$\n",
8891
"u=u_D=1 \\qquad \\text{on } \\partial\\Omega_D=[0,y], y\\in[0,1]\n",
8992
"$$\n",
93+
"\n",
9094
"$$\n",
9195
"-\\frac{\\partial u}{\\partial n}=0 \\qquad \\text{on } \\partial\\Omega\\setminus \\partial\\Omega_D\n",
9296
"$$\n",
9397
"\n",
94-
"Our next step is to define $\\kappa$"
98+
"Our next step is to define $\\kappa$\n"
9599
]
96100
},
97101
{
@@ -112,7 +116,7 @@
112116
"In the previous code block, we found which cells (triangular elements) satisfy the condition for being in $\\Omega_0, \\Omega_1$. As the $DG-0$ function contains only one degree of freedom per cell, there is a one to one mapping between the cell indicies and the degrees of freedom. We let $\\kappa=\\begin{cases}\n",
113117
"1 &\\text{if } x\\in\\Omega_0\\\\\n",
114118
"0.1& \\text{if } x\\in\\Omega_1\\\\\n",
115-
"\\end{cases}$"
119+
"\\end{cases}$\n"
116120
]
117121
},
118122
{
@@ -129,7 +133,7 @@
129133
"cell_type": "markdown",
130134
"metadata": {},
131135
"source": [
132-
"We are now ready to define our variational formulation and Dirichlet boundary condition after using integration by parts"
136+
"We are now ready to define our variational formulation and Dirichlet boundary condition after using integration by parts\n"
133137
]
134138
},
135139
{
@@ -151,7 +155,7 @@
151155
"cell_type": "markdown",
152156
"metadata": {},
153157
"source": [
154-
"We can now solve and visualize the solution of the problem"
158+
"We can now solve and visualize the solution of the problem\n"
155159
]
156160
},
157161
{
@@ -217,7 +221,7 @@
217221
"cell_type": "markdown",
218222
"metadata": {},
219223
"source": [
220-
"We clearly observe different behavior in the two regions, which both have the same Dirichlet boundary condition on the left side, where $x=0$."
224+
"We clearly observe different behavior in the two regions, which both have the same Dirichlet boundary condition on the left side, where $x=0$.\n"
221225
]
222226
},
223227
{
@@ -227,7 +231,8 @@
227231
},
228232
"source": [
229233
"## Interpolation with Python-function\n",
230-
"As we saw in the first approach, in many cases, we can use the geometrical coordinates to determine which coefficient we should use. Using the unstructured mesh from the previous example, we illustrate an alternative approach using interpolation:"
234+
"\n",
235+
"As we saw in the first approach, in many cases, we can use the geometrical coordinates to determine which coefficient we should use. Using the unstructured mesh from the previous example, we illustrate an alternative approach using interpolation:\n"
231236
]
232237
},
233238
{
@@ -261,7 +266,7 @@
261266
"cell_type": "markdown",
262267
"metadata": {},
263268
"source": [
264-
"We verify this by assembling the error between this new function and the old one"
269+
"We verify this by assembling the error between this new function and the old one\n"
265270
]
266271
},
267272
{
@@ -280,7 +285,8 @@
280285
"metadata": {},
281286
"source": [
282287
"## Subdomains defined from external mesh data\n",
283-
"Let us now consider the same problem, but using GMSH to generate the mesh and subdomains. We will then in turn show how to use this data to generate discontinuous functions in DOLFINx."
288+
"\n",
289+
"Let us now consider the same problem, but using GMSH to generate the mesh and subdomains. We will then in turn show how to use this data to generate discontinuous functions in DOLFINx.\n"
284290
]
285291
},
286292
{
@@ -329,7 +335,8 @@
329335
"metadata": {},
330336
"source": [
331337
"## Read in MSH files with DOLFINx\n",
332-
"You can read in MSH files with DOLFINx, which will read them in on a single process, and then distribute them over the available ranks in the MPI communicator."
338+
"\n",
339+
"You can read in MSH files with DOLFINx, which will read them in on a single process, and then distribute them over the available ranks in the MPI communicator.\n"
333340
]
334341
},
335342
{
@@ -353,14 +360,17 @@
353360
},
354361
"source": [
355362
"## Convert msh-files to XDMF using meshio\n",
363+
"\n",
356364
"We will use `meshio` to read in the `msh` file, and convert it to a more suitable IO format. Meshio requires `h5py`, and can be installed on linux with the following commands:\n",
365+
"\n",
357366
"```{code}\n",
358367
"export HDF5_MPI=\"ON\"\n",
359368
"export CC=mpicc\n",
360369
"export HDF5_DIR=\"/usr/lib/x86_64-linux-gnu/hdf5/mpich/\"\n",
361370
"pip3 install --no-cache-dir --no-binary=h5py h5py meshio\n",
362371
"```\n",
363-
"We start by creating a convenience function for extracting data for a single cell type, and creating a new `meshio.Mesh`."
372+
"\n",
373+
"We start by creating a convenience function for extracting data for a single cell type, and creating a new `meshio.Mesh`.\n"
364374
]
365375
},
366376
{
@@ -385,7 +395,7 @@
385395
"cell_type": "markdown",
386396
"metadata": {},
387397
"source": [
388-
"This function returns a meshio mesh, including physical markers for the given type. The `prune_z` argument is for cases where we want to use two dimensional meshes. The last coordinate in the mesh (as it is generated in a 3D space) has to be removed for DOLFINx to consider this as a two dimensional geometry."
398+
"This function returns a meshio mesh, including physical markers for the given type. The `prune_z` argument is for cases where we want to use two dimensional meshes. The last coordinate in the mesh (as it is generated in a 3D space) has to be removed for DOLFINx to consider this as a two dimensional geometry.\n"
389399
]
390400
},
391401
{
@@ -401,8 +411,8 @@
401411
" # Create and save one file for the mesh, and one file for the facets\n",
402412
" triangle_mesh = create_mesh(msh, \"triangle\", prune_z=True)\n",
403413
" line_mesh = create_mesh(msh, \"line\", prune_z=True)\n",
404-
" meshio.write(\"mesh.xdmf\", triangle_mesh)\n",
405-
" meshio.write(\"mt.xdmf\", line_mesh)\n",
414+
" meshio.write(\"mesh.xdmf\", triangle_mesh, compression=None)\n",
415+
" meshio.write(\"mt.xdmf\", line_mesh, compression=None)\n",
406416
"MPI.COMM_WORLD.barrier()"
407417
]
408418
},
@@ -412,7 +422,7 @@
412422
"source": [
413423
"We have now written the mesh and the cell markers to one file, and the facet markers in a separate file. We can now read this data in DOLFINx using `XDMFFile.read_mesh` and `XDMFFile.read_meshtags`. The `dolfinx.MeshTags` stores the index of the entity, along with the value of the marker in two one dimensional arrays.\n",
414424
"\n",
415-
"Note that we have generated and written the mesh on only one processor. However, the `xdmf`-format supports parallel IO, and we can thus read the mesh in parallel."
425+
"Note that we have generated and written the mesh on only one processor. However, the `xdmf`-format supports parallel IO, and we can thus read the mesh in parallel.\n"
416426
]
417427
},
418428
{
@@ -433,7 +443,7 @@
433443
"cell_type": "markdown",
434444
"metadata": {},
435445
"source": [
436-
"We have now read in the mesh and corresponding cell and facet data. We can now create our discontinuous function `kappa` as follows"
446+
"We have now read in the mesh and corresponding cell and facet data. We can now create our discontinuous function `kappa` as follows\n"
437447
]
438448
},
439449
{
@@ -454,7 +464,7 @@
454464
"cell_type": "markdown",
455465
"metadata": {},
456466
"source": [
457-
"We can also efficiently use the facet data `ft` to create the Dirichlet boundary condition"
467+
"We can also efficiently use the facet data `ft` to create the Dirichlet boundary condition\n"
458468
]
459469
},
460470
{
@@ -475,7 +485,7 @@
475485
"cell_type": "markdown",
476486
"metadata": {},
477487
"source": [
478-
"We can now solve the problem in a similar fashion as above"
488+
"We can now solve the problem in a similar fashion as above\n"
479489
]
480490
},
481491
{

‎chapter3/subdomains.py‎

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
# ---
1515

1616
# # Defining subdomains for different materials
17+
#
1718
# Author: Jørgen S. Dokken
1819
#
1920
# Solving PDEs in domains made up of different materials is a frequently encountered task. In FEniCSx, we handle these problems by defining a Discontinous cell-wise constant function.
2021
# Such a function can be created over any mesh in the following way
22+
#
2123
# ## Subdomains on built-in meshes
24+
#
2225

2326
# +
2427
from dolfinx import default_scalar_type
@@ -54,6 +57,7 @@
5457

5558
# We will use a simple example with two materials in two dimensions to demonstrate the idea. The whole domain will be $\Omega=[0,1]\times[0,1]$, which consists of two subdomains
5659
# $\Omega_0=[0,1]\times [0,1/2]$ and $\Omega_1=[0,1]\times[1/2, 1]$. We start by creating two python functions, where each returns `True` if the input coordinate is inside its domain.
60+
#
5761

5862

5963
# +
@@ -74,14 +78,17 @@ def Omega_1(x):
7478
# $$
7579
# -\nabla \cdot [\kappa (x,y)\nabla u(x, y)]= 1 \qquad \text{in } \Omega,
7680
# $$
81+
#
7782
# $$
7883
# u=u_D=1 \qquad \text{on } \partial\Omega_D=[0,y], y\in[0,1]
7984
# $$
85+
#
8086
# $$
8187
# -\frac{\partial u}{\partial n}=0 \qquad \text{on } \partial\Omega\setminus \partial\Omega_D
8288
# $$
8389
#
8490
# Our next step is to define $\kappa$
91+
#
8592

8693
kappa = Function(Q)
8794
cells_0 = locate_entities(mesh, mesh.topology.dim, Omega_0)
@@ -91,11 +98,13 @@ def Omega_1(x):
9198
# 1 &\text{if } x\in\Omega_0\\
9299
# 0.1& \text{if } x\in\Omega_1\\
93100
# \end{cases}$
101+
#
94102

95103
kappa.x.array[cells_0] = np.full_like(cells_0, 1, dtype=default_scalar_type)
96104
kappa.x.array[cells_1] = np.full_like(cells_1, 0.1, dtype=default_scalar_type)
97105

98-
# We are now ready to define our variational formulation and Dirichlet boundary condition after using integration by parts
106+
# We are now ready to define our variational formulation and Dirichlet boundary condition after using integration by parts
107+
#
99108

100109
V = functionspace(mesh, ("Lagrange", 1))
101110
u, v = TrialFunction(V), TestFunction(V)
@@ -106,6 +115,7 @@ def Omega_1(x):
106115
bcs = [dirichletbc(default_scalar_type(1), dofs, V)]
107116

108117
# We can now solve and visualize the solution of the problem
118+
#
109119

110120
# +
111121
problem = LinearProblem(
@@ -152,9 +162,12 @@ def Omega_1(x):
152162

153163

154164
# We clearly observe different behavior in the two regions, which both have the same Dirichlet boundary condition on the left side, where $x=0$.
165+
#
155166

156167
# ## Interpolation with Python-function
168+
#
157169
# As we saw in the first approach, in many cases, we can use the geometrical coordinates to determine which coefficient we should use. Using the unstructured mesh from the previous example, we illustrate an alternative approach using interpolation:
170+
#
158171

159172

160173
def eval_kappa(x):
@@ -172,13 +185,16 @@ def eval_kappa(x):
172185
kappa2.interpolate(eval_kappa)
173186

174187
# We verify this by assembling the error between this new function and the old one
188+
#
175189

176190
# Difference in kappa's
177191
error = mesh.comm.allreduce(assemble_scalar(form((kappa - kappa2) ** 2 * dx)))
178192
print(error)
179193

180194
# ## Subdomains defined from external mesh data
195+
#
181196
# Let us now consider the same problem, but using GMSH to generate the mesh and subdomains. We will then in turn show how to use this data to generate discontinuous functions in DOLFINx.
197+
#
182198

183199
gmsh.initialize()
184200
proc = MPI.COMM_WORLD.rank
@@ -215,7 +231,9 @@ def eval_kappa(x):
215231
gmsh.finalize()
216232

217233
# ## Read in MSH files with DOLFINx
234+
#
218235
# You can read in MSH files with DOLFINx, which will read them in on a single process, and then distribute them over the available ranks in the MPI communicator.
236+
#
219237

220238
mesh_data = gmshio.read_from_msh("mesh.msh", MPI.COMM_WORLD, gdim=2)
221239
mesh = mesh_data.mesh
@@ -225,14 +243,18 @@ def eval_kappa(x):
225243
facet_markers = mesh_data.facet_tags
226244

227245
# ## Convert msh-files to XDMF using meshio
246+
#
228247
# We will use `meshio` to read in the `msh` file, and convert it to a more suitable IO format. Meshio requires `h5py`, and can be installed on linux with the following commands:
248+
#
229249
# ```{code}
230250
# export HDF5_MPI="ON"
231251
# export CC=mpicc
232252
# export HDF5_DIR="/usr/lib/x86_64-linux-gnu/hdf5/mpich/"
233253
# pip3 install --no-cache-dir --no-binary=h5py h5py meshio
234254
# ```
255+
#
235256
# We start by creating a convenience function for extracting data for a single cell type, and creating a new `meshio.Mesh`.
257+
#
236258

237259

238260
def create_mesh(mesh, cell_type, prune_z=False):
@@ -248,6 +270,7 @@ def create_mesh(mesh, cell_type, prune_z=False):
248270

249271

250272
# This function returns a meshio mesh, including physical markers for the given type. The `prune_z` argument is for cases where we want to use two dimensional meshes. The last coordinate in the mesh (as it is generated in a 3D space) has to be removed for DOLFINx to consider this as a two dimensional geometry.
273+
#
251274

252275
if proc == 0:
253276
# Read in mesh
@@ -256,13 +279,14 @@ def create_mesh(mesh, cell_type, prune_z=False):
256279
# Create and save one file for the mesh, and one file for the facets
257280
triangle_mesh = create_mesh(msh, "triangle", prune_z=True)
258281
line_mesh = create_mesh(msh, "line", prune_z=True)
259-
meshio.write("mesh.xdmf", triangle_mesh)
260-
meshio.write("mt.xdmf", line_mesh)
282+
meshio.write("mesh.xdmf", triangle_mesh, compression=None)
283+
meshio.write("mt.xdmf", line_mesh, compression=None)
261284
MPI.COMM_WORLD.barrier()
262285

263286
# We have now written the mesh and the cell markers to one file, and the facet markers in a separate file. We can now read this data in DOLFINx using `XDMFFile.read_mesh` and `XDMFFile.read_meshtags`. The `dolfinx.MeshTags` stores the index of the entity, along with the value of the marker in two one dimensional arrays.
264287
#
265288
# Note that we have generated and written the mesh on only one processor. However, the `xdmf`-format supports parallel IO, and we can thus read the mesh in parallel.
289+
#
266290

267291
with XDMFFile(MPI.COMM_WORLD, "mesh.xdmf", "r") as xdmf:
268292
mesh = xdmf.read_mesh(name="Grid")
@@ -272,6 +296,7 @@ def create_mesh(mesh, cell_type, prune_z=False):
272296
ft = xdmf.read_meshtags(mesh, name="Grid")
273297

274298
# We have now read in the mesh and corresponding cell and facet data. We can now create our discontinuous function `kappa` as follows
299+
#
275300

276301
Q = functionspace(mesh, ("DG", 0))
277302
kappa = Function(Q)
@@ -281,6 +306,7 @@ def create_mesh(mesh, cell_type, prune_z=False):
281306
kappa.x.array[top_cells] = np.full_like(top_cells, 0.1, dtype=default_scalar_type)
282307

283308
# We can also efficiently use the facet data `ft` to create the Dirichlet boundary condition
309+
#
284310

285311
V = functionspace(mesh, ("Lagrange", 1))
286312
u_bc = Function(V)
@@ -290,6 +316,7 @@ def create_mesh(mesh, cell_type, prune_z=False):
290316
bcs = [dirichletbc(default_scalar_type(1), left_dofs, V)]
291317

292318
# We can now solve the problem in a similar fashion as above
319+
#
293320

294321
# +
295322
u, v = TrialFunction(V), TestFunction(V)

0 commit comments

Comments
 (0)