forked from FEniCS/ufl
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
82 changed files
with
993 additions
and
2,482 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -41,7 +41,6 @@ jobs: | |
with: | ||
path: ./ffcx | ||
repository: FEniCS/ffcx | ||
ref: main | ||
- name: Install FFCx | ||
run: | | ||
cd ffcx | ||
|
This file contains 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 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 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 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 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 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 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,67 @@ | ||
import ufl | ||
import pytest | ||
|
||
|
||
def test_interval(): | ||
cell = ufl.interval | ||
assert cell.num_vertices() == 2 | ||
assert cell.num_edges() == 1 | ||
assert cell.num_faces() == 0 | ||
|
||
|
||
def test_triangle(): | ||
cell = ufl.triangle | ||
assert cell.num_vertices() == 3 | ||
assert cell.num_edges() == 3 | ||
assert cell.num_faces() == 1 | ||
|
||
|
||
def test_quadrilateral(): | ||
cell = ufl.quadrilateral | ||
assert cell.num_vertices() == 4 | ||
assert cell.num_edges() == 4 | ||
assert cell.num_faces() == 1 | ||
|
||
|
||
def test_tetrahedron(): | ||
cell = ufl.tetrahedron | ||
assert cell.num_vertices() == 4 | ||
assert cell.num_edges() == 6 | ||
assert cell.num_faces() == 4 | ||
|
||
|
||
def test_hexahedron(): | ||
cell = ufl.hexahedron | ||
assert cell.num_vertices() == 8 | ||
assert cell.num_edges() == 12 | ||
assert cell.num_faces() == 6 | ||
|
||
|
||
|
||
@pytest.mark.parametrize("cell", [ufl.interval]) | ||
def test_cells_1d(cell): | ||
assert cell.num_facets() == cell.num_vertices() | ||
assert cell.num_ridges() == 0 | ||
assert cell.num_peaks() == 0 | ||
|
||
|
||
@pytest.mark.parametrize("cell", [ufl.triangle, ufl.quadrilateral]) | ||
def test_cells_2d(cell): | ||
assert cell.num_facets() == cell.num_edges() | ||
assert cell.num_ridges() == cell.num_vertices() | ||
assert cell.num_peaks() == 0 | ||
|
||
|
||
@pytest.mark.parametrize("cell", [ufl.tetrahedron, ufl.hexahedron, ufl.prism, ufl.pyramid]) | ||
def test_cells_2d(cell): | ||
assert cell.num_facets() == cell.num_faces() | ||
assert cell.num_ridges() == cell.num_edges() | ||
assert cell.num_peaks() == cell.num_vertices() | ||
|
||
|
||
def test_tensorproductcell(): | ||
orig = ufl.TensorProductCell(ufl.interval, ufl.interval) | ||
cell = orig.reconstruct() | ||
assert cell.sub_cells() == orig.sub_cells() | ||
assert cell.topological_dimension() == orig.topological_dimension() | ||
assert cell.geometric_dimension() == orig.geometric_dimension() |
This file contains 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 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 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 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 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 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.