-
Notifications
You must be signed in to change notification settings - Fork 31
FEM capabilities in the problem/data classes #115
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
Draft
acdanila
wants to merge
15
commits into
master
Choose a base branch
from
fem_implementation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2909722
skeleton
acdanila 135d496
minor correction to skeleton
acdanila 49a9900
tests
acdanila ce6ea34
improved tests
acdanila 4e0d753
discussed changes to base, data and domain, pending further verification
acdanila b0f8bca
better guards in MeshedData to make sure correct kind of space is used
acdanila e4a7a39
carlos comments round 1
acdanila 079bf41
gh actions added pytest
acdanila 330c0b7
fix actions
acdanila 034b246
added to_dolfinx function in MeshedSpace in order to be able to prese…
acdanila 5c7cacf
fixed pytest action
acdanila 4861703
cleaned imports and flake8
acdanila a92bdab
fix pytest path in CI
acdanila 9431cee
minor change for in create_mesh signature for dolfinx version compati…
acdanila c863ac4
cicd included dolfinx
acdanila File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,129 @@ | ||
| name: Pytest | ||
|
|
||
| on: | ||
| # Trigger the workflow on push or pull request, | ||
| # but only for the master branch | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| examples: | ||
| name: Pytest | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| DEVITO_COMPILER: gcc | ||
| DEVITO_LANGUAGE: openmp | ||
| PYTHON_VERSION: 3.11.12 | ||
|
|
||
| strategy: | ||
| # Prevent all build to stop if a single one fails | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - name: Checkout stride | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| path: stride | ||
|
|
||
| - name: Checkout devito | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| repository: devitocodes/devito | ||
| path: devito | ||
|
|
||
| - name: Setup conda | ||
| uses: mamba-org/setup-micromamba@v2 | ||
| with: | ||
| environment-file: stride/environment.yml | ||
| init-shell: bash | ||
| cache-environment: true | ||
| post-cleanup: 'all' | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash -l {0} | ||
| run: | | ||
| cd stride | ||
| pip install -e . | ||
|
|
||
| - name: Install devito | ||
| shell: bash -l {0} | ||
| run: | | ||
| cd devito | ||
| pip install -e . | ||
|
|
||
| - name: Pytest | ||
| shell: bash -l {0} | ||
| run: | | ||
| cd stride | ||
| python -m pytest stride/tests/ -v | ||
|
|
||
| pytest-dolfinx: | ||
| name: Pytest DOLFINx | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| DEVITO_COMPILER: gcc | ||
| DEVITO_LANGUAGE: openmp | ||
| PYTHON_VERSION: 3.11.12 | ||
|
|
||
| strategy: | ||
| # Prevent all build to stop if a single one fails | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - name: Checkout stride | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| path: stride | ||
|
|
||
| - name: Checkout devito | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| repository: devitocodes/devito | ||
| path: devito | ||
|
|
||
| - name: Setup conda | ||
| uses: mamba-org/setup-micromamba@v2 | ||
| with: | ||
| environment-file: stride/environment.yml | ||
| init-shell: bash | ||
| cache-environment: true | ||
| post-cleanup: 'all' | ||
|
|
||
| # applied over the base environment rather than replacing it, the same way the file is meant | ||
| # to be used locally. The complex build is the one that covers both cases: it runs the | ||
| # resistive tests as well, whereas a real build has to skip the capacitive ones | ||
| - name: Install FEM dependencies | ||
| shell: bash -l {0} | ||
| run: | | ||
| micromamba install -y -n stride -f stride/environment-fem-complex.yml | ||
|
|
||
| # a missing or real-scalar build would turn the FEM tests into skips rather than failures, | ||
| # so the suite would go green having run none of them | ||
| - name: Check the build is complex | ||
| shell: bash -l {0} | ||
| run: | | ||
| python -c "import dolfinx, numpy; assert numpy.dtype(dolfinx.default_scalar_type).kind == 'c'" | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash -l {0} | ||
| run: | | ||
| cd stride | ||
| pip install -e . | ||
|
|
||
| - name: Install devito | ||
| shell: bash -l {0} | ||
| run: | | ||
| cd devito | ||
| pip install -e . | ||
|
|
||
| - name: Pytest | ||
| shell: bash -l {0} | ||
| run: | | ||
| cd stride | ||
| python -m pytest stride/tests/ -v | ||
This file contains hidden or 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,34 @@ | ||
| # Finite-element extras for stride, complex-scalar PETSc build. | ||
| # | ||
| # This file is ADDITIVE: it lists only what the FEM problem types need on top of the base | ||
| # environment, and is applied over an existing environment rather than creating one: | ||
| # | ||
| # conda env create -n stride-dolfinx-complex -f environment.yml | ||
| # conda env update -n stride-dolfinx-complex -f environment-fem-complex.yml | ||
| # | ||
| # Copying the base dependency list into this file instead is what lets the two drift apart, so | ||
| # please keep it additive. | ||
| # | ||
| # DOLFINx cannot be installed with pip -- there are no wheels -- so these dependencies are | ||
| # conda-only and deliberately not in requirements-optional.txt. Everything in stride works | ||
| # without them; only the FEM problem types need them. | ||
| # | ||
| # PETSc is built for either real or complex scalars and the two cannot coexist. Use this file | ||
| # for the complex build, environment-fem-real.yml for the real one. | ||
| # | ||
| # The MPI implementation is pinned here rather than in the base environment, which needs no MPI | ||
| # at all. Mixing implementations between the base and this overlay causes hangs at exit inside | ||
| # MPI finalisation, so if the base environment ever grows an MPI dependency, the two pins must | ||
| # agree. | ||
| name: stride-dolfinx-complex | ||
| channels: | ||
| - conda-forge | ||
| dependencies: | ||
| - fenics-dolfinx==0.9.0 | ||
| - petsc=*=*complex* | ||
| - mpi=*=*openmpi* | ||
| - openmpi | ||
| - petsc4py | ||
| - mpi4py | ||
| - gmsh # mesh generation, plus its Python bindings | ||
| - python-gmsh |
This file contains hidden or 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,34 @@ | ||
| # Finite-element extras for stride, real-scalar PETSc build. | ||
| # | ||
| # This file is ADDITIVE: it lists only what the FEM problem types need on top of the base | ||
| # environment, and is applied over an existing environment rather than creating one: | ||
| # | ||
| # conda env create -n stride-dolfinx-real -f environment.yml | ||
| # conda env update -n stride-dolfinx-real -f environment-fem-real.yml | ||
| # | ||
| # Copying the base dependency list into this file instead is what lets the two drift apart, so | ||
| # please keep it additive. | ||
| # | ||
| # DOLFINx cannot be installed with pip -- there are no wheels -- so these dependencies are | ||
| # conda-only and deliberately not in requirements-optional.txt. Everything in stride works | ||
| # without them; only the FEM problem types need them. | ||
| # | ||
| # PETSc is built for either real or complex scalars and the two cannot coexist. Use this file | ||
| # for the real build, environment-fem-complex.yml for the complex one. | ||
| # | ||
| # The MPI implementation is pinned here rather than in the base environment, which needs no MPI | ||
| # at all. Mixing implementations between the base and this overlay causes hangs at exit inside | ||
| # MPI finalisation, so if the base environment ever grows an MPI dependency, the two pins must | ||
| # agree. | ||
| name: stride-dolfinx-real | ||
| channels: | ||
| - conda-forge | ||
| dependencies: | ||
| - fenics-dolfinx==0.9.0 | ||
| - petsc=*=*real* | ||
| - mpi=*=*openmpi* | ||
| - openmpi | ||
| - petsc4py | ||
| - mpi4py | ||
| - gmsh # mesh generation, plus its Python bindings | ||
| - python-gmsh |
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.