Repository navigation
Test the ExodusII, CGNS and Triangle mesh readers, and load Triangle meshes without a facet file #5751
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
Open
pbrubeck
wants to merge
8
commits into
release
Choose a base branch
from
pbrubeck/test/mesh-formats
base: release
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.
Open
Test the ExodusII, CGNS and Triangle mesh readers, and load Triangle meshes without a facet file #5751
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a64a456
Name the dependency in the error for an unrecognised test dependency
pbrubeck 137c11e
Build PETSc with ExodusII and CGNS by default
pbrubeck be83098
Read Triangle and TetGen files with one cell or one facet
pbrubeck 9108f98
Mark the boundary faces of TetGen meshes
pbrubeck 5030bb8
Test the Triangle, TetGen and CGNS mesh readers
pbrubeck c76ac39
Load Triangle meshes without a facet file
pbrubeck ed17bac
Parametrize mesh tests over the presence of facet files
pbrubeck cdaa721
DROP BEFORE MERGE: Configure ExodusII with PETSc MR 9901
pbrubeck 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
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
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 |
|---|---|---|
|
|
@@ -440,6 +440,11 @@ class CommunityArch(Arch): | |
| ArchKey = tuple[OS, ScalarType, IntType, GPUPlatform] | ||
|
|
||
| # Configurations with official support that are tested in CI | ||
| # | ||
| # On Ubuntu, we tell PETSc to download Exodus II, because the Exodus II library | ||
| # from apt does not have ex_open_par, which PETSc needs. We also tell PETSc the | ||
| # paths to the HDF5 and NetCDF libraries from apt, because the CMake builds of | ||
| # CGNS and Exodus II cannot find them. | ||
| OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | ||
|
|
||
| # Ubuntu 26.04 x86 | ||
|
|
@@ -467,7 +472,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "libhypre-dev", | ||
| "libmumps-ptscotch-dev", | ||
| "libmetis-dev", | ||
| "libnetcdf-dev", | ||
| "libnetcdf-pnetcdf-dev", | ||
| "libopenblas-dev", | ||
| "libopenmpi-dev", | ||
| "libpnetcdf-dev", | ||
|
|
@@ -486,8 +491,15 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--with-hypre", | ||
| "--with-metis", | ||
| "--with-mumps", | ||
| "--with-netcdf", | ||
| "--with-netcdf-dir=/usr/lib/x86_64-linux-gnu/netcdf/pnetcdf", | ||
| "--with-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-cgns-cmake-arguments=-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi", | ||
| "--download-exodusii", | ||
| "--download-exodusii-cmake-arguments='" | ||
| "-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi " | ||
| "-DPnetcdf_LIBRARY_DIRS:PATH=/usr/lib/x86_64-linux-gnu " | ||
| "-DnetCDF_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/netCDF_pnetcdf'", | ||
| "--with-ptscotch", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can go away by fixing https://gitlab.com/petsc/petsc/-/work_items/2020 |
||
| "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", | ||
| "--with-ptscotch-include=/usr/include/scotch", | ||
|
|
@@ -528,7 +540,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "libhdf5-mpi-dev", | ||
| "libmumps-ptscotch-dev", | ||
| "libmetis-dev", | ||
| "libnetcdf-dev", | ||
| "libnetcdf-pnetcdf-dev", | ||
| "libopenblas-dev", | ||
| "libopenmpi-dev", | ||
| "libpnetcdf-dev", | ||
|
|
@@ -547,8 +559,15 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--with-hwloc", | ||
| "--with-metis", | ||
| "--with-mumps", | ||
| "--with-netcdf", | ||
| "--with-netcdf-dir=/usr/lib/x86_64-linux-gnu/netcdf/pnetcdf", | ||
| "--with-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-cgns-cmake-arguments=-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi", | ||
| "--download-exodusii", | ||
| "--download-exodusii-cmake-arguments='" | ||
| "-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi " | ||
| "-DPnetcdf_LIBRARY_DIRS:PATH=/usr/lib/x86_64-linux-gnu " | ||
| "-DnetCDF_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/netCDF_pnetcdf'", | ||
| "--with-ptscotch", | ||
| "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", | ||
| "--with-ptscotch-include=/usr/include/scotch", | ||
|
|
@@ -585,7 +604,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "libfftw3-mpi-dev", | ||
| "libhdf5-mpi-dev", | ||
| "libhwloc-dev", | ||
| "libnetcdf-dev", | ||
| "libnetcdf-pnetcdf-dev", | ||
| "libopenblas-dev", | ||
| "libopenmpi-dev", | ||
| "libpnetcdf-dev", | ||
|
|
@@ -602,8 +621,15 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--download-hypre", | ||
| "--download-metis", | ||
| "--download-mumps", | ||
| "--with-netcdf", | ||
| "--with-netcdf-dir=/usr/lib/x86_64-linux-gnu/netcdf/pnetcdf", | ||
| "--with-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-cgns-cmake-arguments=-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi", | ||
| "--download-exodusii", | ||
| "--download-exodusii-cmake-arguments='" | ||
| "-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi " | ||
| "-DPnetcdf_LIBRARY_DIRS:PATH=/usr/lib/x86_64-linux-gnu " | ||
| "-DnetCDF_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/netCDF_pnetcdf'", | ||
| "--download-ptscotch", | ||
| "--with-scalapack-lib=-lscalapack-openmpi", | ||
| "--with-suitesparse", | ||
|
|
@@ -647,7 +673,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "libhypre-dev", | ||
| "libmumps-ptscotch-dev", | ||
| "libmetis-dev", | ||
| "libnetcdf-dev", | ||
| "libnetcdf-pnetcdf-dev", | ||
| "libopenblas-dev", | ||
| "libopenmpi-dev", | ||
| "libpnetcdf-dev", | ||
|
|
@@ -666,8 +692,15 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--with-hypre", | ||
| "--with-metis", | ||
| "--with-mumps", | ||
| "--with-netcdf", | ||
| "--with-netcdf-dir=/usr/lib/aarch64-linux-gnu/netcdf/pnetcdf", | ||
| "--with-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-cgns-cmake-arguments=-DHDF5_ROOT:PATH=/usr/lib/aarch64-linux-gnu/hdf5/openmpi", | ||
| "--download-exodusii", | ||
| "--download-exodusii-cmake-arguments='" | ||
| "-DHDF5_ROOT:PATH=/usr/lib/aarch64-linux-gnu/hdf5/openmpi " | ||
| "-DPnetcdf_LIBRARY_DIRS:PATH=/usr/lib/aarch64-linux-gnu " | ||
| "-DnetCDF_DIR:PATH=/usr/lib/aarch64-linux-gnu/cmake/netCDF_pnetcdf'", | ||
| "--with-ptscotch", | ||
| "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", | ||
| "--with-ptscotch-include=/usr/include/scotch", | ||
|
|
@@ -708,7 +741,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "libhdf5-mpi-dev", | ||
| "libmumps-ptscotch-dev", | ||
| "libmetis-dev", | ||
| "libnetcdf-dev", | ||
| "libnetcdf-pnetcdf-dev", | ||
| "libopenblas-dev", | ||
| "libopenmpi-dev", | ||
| "libpnetcdf-dev", | ||
|
|
@@ -727,8 +760,15 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--with-hwloc", | ||
| "--with-metis", | ||
| "--with-mumps", | ||
| "--with-netcdf", | ||
| "--with-netcdf-dir=/usr/lib/aarch64-linux-gnu/netcdf/pnetcdf", | ||
| "--with-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-cgns-cmake-arguments=-DHDF5_ROOT:PATH=/usr/lib/aarch64-linux-gnu/hdf5/openmpi", | ||
| "--download-exodusii", | ||
| "--download-exodusii-cmake-arguments='" | ||
| "-DHDF5_ROOT:PATH=/usr/lib/aarch64-linux-gnu/hdf5/openmpi " | ||
| "-DPnetcdf_LIBRARY_DIRS:PATH=/usr/lib/aarch64-linux-gnu " | ||
| "-DnetCDF_DIR:PATH=/usr/lib/aarch64-linux-gnu/cmake/netCDF_pnetcdf'", | ||
| "--with-ptscotch", | ||
| "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", | ||
| "--with-ptscotch-include=/usr/include/scotch", | ||
|
|
@@ -770,7 +810,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "libhwloc-dev", | ||
| "libmumps-ptscotch-dev", | ||
| "libmetis-dev", | ||
| "libnetcdf-dev", | ||
| "libnetcdf-pnetcdf-dev", | ||
| "libopenblas-dev", | ||
| "libopenmpi-dev", | ||
| "libpnetcdf-dev", | ||
|
|
@@ -797,8 +837,15 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--with-hwloc", | ||
| "--with-metis", | ||
| "--with-mumps", | ||
| "--with-netcdf", | ||
| "--with-netcdf-dir=/usr/lib/x86_64-linux-gnu/netcdf/pnetcdf", | ||
| "--with-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-cgns-cmake-arguments=-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi", | ||
| "--download-exodusii", | ||
| "--download-exodusii-cmake-arguments='" | ||
| "-DHDF5_ROOT:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi " | ||
| "-DPnetcdf_LIBRARY_DIRS:PATH=/usr/lib/x86_64-linux-gnu " | ||
| "-DnetCDF_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/netCDF_pnetcdf'", | ||
| "--with-ptscotch", | ||
| "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", | ||
| "--with-ptscotch-include=/usr/include/scotch", | ||
|
|
@@ -864,6 +911,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--download-mumps", | ||
| "--download-netcdf", | ||
| "--download-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-exodusii", | ||
| "--download-ptscotch", | ||
| "--download-superlu_dist", | ||
|
|
||
|
|
@@ -920,6 +969,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { | |
| "--download-mumps", | ||
| "--download-netcdf", | ||
| "--download-pnetcdf", | ||
| "--download-cgns", | ||
| "--download-exodusii", | ||
| "--download-ptscotch", | ||
| "--download-superlu_dist", | ||
|
|
||
|
|
||
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
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 |
|---|---|---|
| @@ -1,30 +1,22 @@ | ||
| from os.path import abspath, dirname, join | ||
| import pytest | ||
| from firedrake import * | ||
| from firedrake.petsc import PETSc | ||
|
|
||
| pytestmark = pytest.mark.skipexodusii | ||
|
|
||
| cwd = abspath(dirname(__file__)) | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def exodus_mesh(): | ||
| try: | ||
| return Mesh(join(cwd, "..", "meshes", "brick.e")) | ||
| except PETSc.Error as e: | ||
| assert e.ierr == 56 | ||
| return Mesh(join(cwd, "..", "meshes", "brick.e")) | ||
|
|
||
|
|
||
| @pytest.mark.parallel(nprocs=2) | ||
| def test_create_from_file(exodus_mesh): | ||
| if exodus_mesh is None: | ||
| pytest.skip("PETSc not configured with exodusII") | ||
| else: | ||
| assert exodus_mesh | ||
| assert exodus_mesh | ||
|
|
||
|
|
||
| @pytest.mark.parallel(nprocs=2) | ||
| def test_sidesets(exodus_mesh): | ||
| if exodus_mesh is None: | ||
| pytest.skip("PETSc not configured with exodusII") | ||
| else: | ||
| assert (exodus_mesh.exterior_facets.unique_markers == [200, 201]).all() | ||
| assert (exodus_mesh.exterior_facets.unique_markers == [200, 201]).all() |
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.