Skip to content
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

Introduce edge integrals #330

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Contributors:
| Corrado Maurini <[email protected]>
| Jack S. Hale <[email protected]>
| Tuomas Airaksinen <[email protected]>
| Nacime Bouziani <[email protected]>
dham marked this conversation as resolved.
Show resolved Hide resolved
| Reuben W. Hill <[email protected]>
| Cécile Daversin-Catty <[email protected]>
| Nacime Bouziani <[email protected]>
| Matthew Scroggs <[email protected]>

14 changes: 11 additions & 3 deletions test/test_classcoverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
Circumradius,
Coefficient,
Constant,
EdgeJacobian,
EdgeJacobianDeterminant,
EdgeJacobianInverse,
FacetArea,
FacetNormal,
FunctionSpace,
Expand Down Expand Up @@ -292,9 +295,14 @@ def testAll(self):
_test_object(g, (), ())
g = FacetJacobianInverse(domain)
_test_object(g, (dim - 1, dim), ())

g = FacetNormal(domain)
_test_object(g, (dim,), ())
g = EdgeJacobian(domain3D)
_test_object(g, (3, 1), ())
g = EdgeJacobianDeterminant(domain3D)
_test_object(g, (), ())
g = EdgeJacobianInverse(domain3D)
_test_object(g, (1, 3), ())
g = FacetNormal(domain3D)
_test_object(g, (3,), ())
# g = CellNormal(domain)
# _test_object(g, (dim,), ())

Expand Down
4 changes: 4 additions & 0 deletions test/test_measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def test_construct_forms_from_default_measures():
ds = Measure("ds")
dS = Measure("dS")

dl = Measure("dl")

dP = Measure("dP")
# dV = Measure("dV")

Expand All @@ -37,6 +39,8 @@ def test_construct_forms_from_default_measures():
assert ds.integral_type() == "exterior_facet"
assert dS.integral_type() == "interior_facet"

assert dl.integral_type() == "edge"

assert dP.integral_type() == "vertex"
# TODO: Change dP to dV:
# assert dP.integral_type() == "point"
Expand Down
10 changes: 10 additions & 0 deletions test/test_piecewise_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
from ufl.checks import is_cellwise_constant
from ufl.classes import (
CellCoordinate,
EdgeJacobian,
EdgeJacobianDeterminant,
EdgeJacobianInverse,
FacetJacobian,
FacetJacobianDeterminant,
FacetJacobianInverse,
Expand Down Expand Up @@ -284,6 +287,13 @@ def mappings_are_cellwise_constant(domain, test):
assert is_cellwise_constant(e) == test
e = FacetJacobianInverse(domain)
assert is_cellwise_constant(e) == test
if domain.topological_dimension() > 2:
e = EdgeJacobian(domain)
assert is_cellwise_constant(e) == test
e = EdgeJacobianDeterminant(domain)
assert is_cellwise_constant(e) == test
e = EdgeJacobianInverse(domain)
assert is_cellwise_constant(e) == test


def test_mappings_are_cellwise_constant_on_linear_affine_cells(affine_domains):
Expand Down
Loading
Loading