Skip to content

Commit 04631b2

Browse files
authored
Use adapt_common (#171)
Now that we've started moving things over to https://github.com/mesh-adaptation/adapt_common, we can drop them from Movement. ~~I'm currently using the `docs` branch https://github.com/mesh-adaptation/docs/tree/install-submodules so that `adapt_common` gets installed properly in the CI.~~ I switched the `monge_ampere_helmholtz.py` demo to use Clement recovery because this is targeted first for porting to `adapt_common` and (in my opinion) it gives results of similar quality but quicker. However, I haven't included Clement interpolation in the port yet because it will require a bit more work. I've also updated the `CODEOWNERS` file because I finally got round to changing my GitHub username.
1 parent 7116905 commit 04631b2

File tree

9 files changed

+104
-103
lines changed

9 files changed

+104
-103
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# These owners will be the default owners for everything in
44
# the repo. Unless a later match takes precedence,
55
# will be requested for review when someone opens a pull request.
6-
* @jwallwork23 @stephankramer
6+
* @joewallwork @stephankramer
77

88
# Order is important; the last matching pattern takes the most
99
# precedence. When someone opens a pull request that only

.github/workflows/test_suite.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '**.py'
1010
- '**.geo'
1111
- '.github/workflows/test_suite.yml'
12+
- '.gitmodules'
1213
- 'pyproject.toml'
1314

1415
# Run test suite whenever commits are pushed to an open PR
@@ -17,6 +18,7 @@ on:
1718
- '**.py'
1819
- '**.geo'
1920
- '.github/workflows/test_suite.yml'
21+
- '.gitmodules'
2022
- 'pyproject.toml'
2123

2224
# Run test suite every Sunday at 1AM

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "adapt_common"]
2+
path = adapt_common
3+
url = https://github.com/mesh-adaptation/adapt_common.git

adapt_common

Submodule adapt_common added at 85f8d46

demos/monge_ampere_helmholtz.py

Lines changed: 85 additions & 97 deletions
Large diffs are not rendered by default.

movement/monge_ampere.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import firedrake.exceptions as fexc
1010
import numpy as np
1111
import ufl
12-
from animate.utility import cofunction2function, function2cofunction
12+
from adapt_common.utility import cofunction2function, function2cofunction
1313
from firedrake.petsc import PETSc
1414
from pyadjoint import no_annotations
1515

movement/monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import abc
22

33
import ufl
4+
from adapt_common.norms import norm
45
from animate.recovery import recover_gradient_l2, recover_hessian_clement
5-
from animate.utility import norm
66
from firedrake import SpatialCoordinate
77
from firedrake.constant import Constant
88
from firedrake.function import Function

movement/mover.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
import firedrake.exceptions as fexc
66
import numpy as np
77
import ufl
8-
from animate.utility import function_data_max, function_data_min, function_data_sum
8+
from adapt_common.reduction import (
9+
function_data_max,
10+
function_data_min,
11+
function_data_sum,
12+
)
913
from firedrake.cython.dmcommon import create_section
1014
from firedrake.petsc import PETSc
1115

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools"]
33

44
[project]
55
name = "movement"
6-
version = "0.2"
6+
version = "0.3"
77
authors = [
88
{name = "Joseph G. Wallwork", email = "[email protected]"},
99
{name = "Stephan C. Kramer"},
@@ -43,7 +43,10 @@ Documentation = "https://mesh-adaptation.github.io/movement/index.html"
4343
Repository = "https://github.com/mesh-adaptation/movement"
4444

4545
[tool.setuptools]
46-
packages = ["movement"]
46+
packages = ["movement", "adapt_common"]
47+
48+
[tool.setuptools.package-dir]
49+
adapt_common = "adapt_common/adapt_common"
4750

4851
[tool.ruff]
4952
line-length = 88

0 commit comments

Comments
 (0)