Skip to content

Commit

Permalink
Merge pull request #231 from mfem/mfem_47_dev
Browse files Browse the repository at this point in the history
PyMFEM4.7
  • Loading branch information
sshiraiwa committed Aug 7, 2024
2 parents 3e68b55 + 9a2e7ae commit 54ca753
Show file tree
Hide file tree
Showing 27 changed files with 1,670 additions and 700 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-and-test-callable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ jobs:
sudo apt-get install mpich libmpich-dev
pip install mpi4py
- name: Purge PIP cache
- name: Purge PIP chach
run: pip cache purge

- name: Cache CUDA
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-and-test-dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# build-and-test-dispatch.yml
#
# Dispatch workflow for build-and-test-callable.yml

name: Build and Test (dispatch)

on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
ls -l dist/
#python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_7_8_9_10:
make_binary_3_8_9_10_11:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp37-cp37m", "cp38-cp38", "cp39-cp39", "cp310-cp310"]
pythonpath: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testrelease_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
ls -l dist/
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
#python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_7_8_9_10:
make_binary_3_8_9_10_11:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp37-cp37m", "cp38-cp38", "cp39-cp39", "cp310-cp310"]
pythonpath: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
Expand Down
118 changes: 118 additions & 0 deletions data/compass.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
SetFactory("OpenCASCADE");

order = 1;

R = 1;
r = 0.2;

Point(1) = {0,0,0};

Point(2) = {r/Sqrt(2),r/Sqrt(2),0};
Point(3) = {-r/Sqrt(2),r/Sqrt(2),0};
Point(4) = {-r/Sqrt(2),-r/Sqrt(2),0};
Point(5) = {r/Sqrt(2),-r/Sqrt(2),0};

Point(6) = {R,0,0};
Point(7) = {R/Sqrt(2),R/Sqrt(2),0};
Point(8) = {0,R,0};
Point(9) = {-R/Sqrt(2),R/Sqrt(2),0};
Point(10) = {-R,0,0};
Point(11) = {-R/Sqrt(2),-R/Sqrt(2),0};
Point(12) = {0,-R,0};
Point(13) = {R/Sqrt(2),-R/Sqrt(2),0};

Line(1) = {1,2};
Line(2) = {1,3};
Line(3) = {1,4};
Line(4) = {1,5};

Line(5) = {1,6};
Line(6) = {1,8};
Line(7) = {1,10};
Line(8) = {1,12};

Line(9) = {2,6};
Line(10) = {2,8};
Line(11) = {3,8};
Line(12) = {3,10};
Line(13) = {4,10};
Line(14) = {4,12};
Line(15) = {5,12};
Line(16) = {5,6};

Line(17) = {6,7};
Line(18) = {7,8};
Line(19) = {8,9};
Line(20) = {9,10};
Line(21) = {10,11};
Line(22) = {11,12};
Line(23) = {12,13};
Line(24) = {13,6};

Transfinite Curve{1:24} = 2;

Physical Curve("ENE") = {17};
Physical Curve("NNE") = {18};
Physical Curve("NNW") = {19};
Physical Curve("WNW") = {20};
Physical Curve("WSW") = {21};
Physical Curve("SSW") = {22};
Physical Curve("SSE") = {23};
Physical Curve("ESE") = {24};

Curve Loop(1) = {9,17,18,-10};
Curve Loop(2) = {11,19,20,-12};
Curve Loop(3) = {13,21,22,-14};
Curve Loop(4) = {15,23,24,-16};

Plane Surface(1) = {1};
Plane Surface(2) = {2};
Plane Surface(3) = {3};
Plane Surface(4) = {4};

Transfinite Surface{1} = {2,6,7,8};
Transfinite Surface{2} = {3,8,9,10};
Transfinite Surface{3} = {4,10,11,12};
Transfinite Surface{4} = {5,12,13,6};
Recombine Surface{1:4};

Physical Surface("Base") = {1,2,3,4};

Curve Loop(5) = {1,10,-6};
Plane Surface(5) = {5};
Physical Surface("N Even") = {5};

Curve Loop(6) = {6,-11,-2};
Plane Surface(6) = {6};
Physical Surface("N Odd") = {6};

Curve Loop(7) = {2,12,-7};
Plane Surface(7) = {7};
Physical Surface("W Even") = {7};

Curve Loop(8) = {7,-13,-3};
Plane Surface(8) = {8};
Physical Surface("W Odd") = {8};

Curve Loop(9) = {3,14,-8};
Plane Surface(9) = {9};
Physical Surface("S Even") = {9};

Curve Loop(10) = {8,-15,-4};
Plane Surface(10) = {10};
Physical Surface("S Odd") = {10};

Curve Loop(11) = {4,16,-5};
Plane Surface(11) = {11};
Physical Surface("E Even") = {11};

Curve Loop(12) = {5,-9,-1};
Plane Surface(12) = {12};
Physical Surface("E Odd") = {12};

// Generate 2D mesh
Mesh 2;
SetOrder order;
Mesh.MshFileVersion = 2.2;

Save "compass.msh";
96 changes: 96 additions & 0 deletions data/compass.mesh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
MFEM mesh v1.3

#
# MFEM Geometry Types (see mesh/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
# TRIANGLE = 2
# SQUARE = 3
# TETRAHEDRON = 4
# CUBE = 5
# PRISM = 6
#

dimension
2

elements
12
10 2 7 0 1
11 2 0 7 2
12 2 9 0 2
13 2 0 9 3
14 2 11 0 3
15 2 0 11 4
16 2 5 0 4
17 2 0 5 1
9 3 1 5 6 7
9 3 2 7 8 9
9 3 3 9 10 11
9 3 4 11 12 5

attribute_sets
16
"Base" 1 9
"E Even" 1 16
"E Odd" 1 17
"East" 2 16 17
"N Even" 1 10
"N Odd" 1 11
"North" 2 10 11
"Rose" 8 10 11 12 13 14 15 16 17
"Rose Even" 4 10 12 14 16
"Rose Odd" 4 11 13 15 17
"S Even" 1 14
"S Odd" 1 15
"South" 2 14 15
"W Even" 1 12
"W Odd" 1 13
"West" 2 12 13

boundary
8
1 1 5 6
2 1 6 7
3 1 7 8
4 1 8 9
5 1 9 10
6 1 10 11
7 1 11 12
8 1 12 5

bdr_attribute_sets
13
"Boundary" 8 1 2 3 4 5 6 7 8
"ENE" 1 1
"ESE" 1 8
"Eastern Boundary" 2 1 8
"NNE" 1 2
"NNW" 1 3
"Northern Boundary" 2 2 3
"SSE" 1 7
"SSW" 1 6
"Southern Boundary" 2 6 7
"WNW" 1 4
"WSW" 1 5
"Western Boundary" 2 4 5

vertices
13
2
0 0
0.14142136 0.14142136
-0.14142136 0.14142136
-0.14142136 -0.14142136
0.14142136 -0.14142136
1 0
0.70710678 0.70710678
0 1
-0.70710678 0.70710678
-1 0
-0.70710678 -0.70710678
0 -1
0.70710678 -0.70710678

mfem_mesh_end
62 changes: 62 additions & 0 deletions data/compass.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
$MeshFormat
2.2 0 8
$EndMeshFormat
$PhysicalNames
17
1 1 "ENE"
1 2 "NNE"
1 3 "NNW"
1 4 "WNW"
1 5 "WSW"
1 6 "SSW"
1 7 "SSE"
1 8 "ESE"
2 9 "Base"
2 10 "N Even"
2 11 "N Odd"
2 12 "W Even"
2 13 "W Odd"
2 14 "S Even"
2 15 "S Odd"
2 16 "E Even"
2 17 "E Odd"
$EndPhysicalNames
$Nodes
13
1 0 0 0
2 0.1414213562373095 0.1414213562373095 0
3 -0.1414213562373095 0.1414213562373095 0
4 -0.1414213562373095 -0.1414213562373095 0
5 0.1414213562373095 -0.1414213562373095 0
6 1 0 0
7 0.7071067811865475 0.7071067811865475 0
8 0 1 0
9 -0.7071067811865475 0.7071067811865475 0
10 -1 0 0
11 -0.7071067811865475 -0.7071067811865475 0
12 0 -1 0
13 0.7071067811865475 -0.7071067811865475 0
$EndNodes
$Elements
20
1 1 2 1 17 6 7
2 1 2 2 18 7 8
3 1 2 3 19 8 9
4 1 2 4 20 9 10
5 1 2 5 21 10 11
6 1 2 6 22 11 12
7 1 2 7 23 12 13
8 1 2 8 24 13 6
9 2 2 10 5 1 2 8
10 2 2 11 6 1 8 3
11 2 2 12 7 1 3 10
12 2 2 13 8 1 10 4
13 2 2 14 9 1 4 12
14 2 2 15 10 1 12 5
15 2 2 16 11 1 5 6
16 2 2 17 12 1 6 2
17 3 2 9 1 2 6 7 8
18 3 2 9 2 3 8 9 10
19 3 2 9 3 4 10 11 12
20 3 2 9 4 5 12 13 6
$EndElements
17 changes: 17 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
<<< Change Log. >>>

2024 08
* MFEM 4.7 support
- AttributeSets are supported. ex39 and ex39p are added to demonstrate how to use it from Python
- Hyperbolic conservation element/face form integrators (hyperbolic.hpp) are supported. ex18.py and
ex18.py are updated to conform with the updated C++ examples.
- Update SWIG requirement to >= 4.2.1 (required to wrap MFEM routines which use recent C++ features)
- Buiding --with-libceed will download libceed=0.12.0, as required by MFEM 4.7
- Fixed eltrans::transformback
- Improved testing using Github actions
- New caller and dispatch yml configulations allows for running a test manually
- Test runs automatically for PR and PR update
- Test using Python 3.11 is added
- Refresh install instruction (Install.md)
- Python 3.7 has reached EOL and is no longer supported. This version will support Python 3.8 and above, and
will likely be the last version to support Python 3.8.


2023 11 - 2024 01
* MFEM 4.6 support
- Default MFEM SHA is updated to a version on 11/26/2023 (slightly newer than
Expand Down
Loading

0 comments on commit 54ca753

Please sign in to comment.