ddfem 1.0.2__py3-none-any.whl → 1.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ddfem/boundary.py CHANGED
@@ -87,7 +87,6 @@ def classify_boundary(boundary_dict):
87
87
  boundary_values.update([(kk, f) for kk in ids])
88
88
 
89
89
  else:
90
- print(type(k), type(f))
91
90
  raise NotImplementedError(f"unknown boundary type {k} : {f}")
92
91
 
93
92
  return boundary_flux_cs, boundary_flux_vs, boundary_values
@@ -7,22 +7,25 @@ from .domain import Domain
7
7
 
8
8
 
9
9
  class DomainDune(Domain):
10
- def __init__(self, omega, x, gridView):
10
+ def __init__(self, omega, x, gridView, filterTolerance=0):
11
11
  super().__init__(omega)
12
12
  self.x = x
13
13
  self.gridView = gridView
14
+ self.fullSDF = self.gridFunction(self.omega(self.x), name="full-sdf")
15
+ if filterTolerance>0:
16
+ self.gridView = self._filter(tolerance=filterTolerance)
17
+ self.fullSDF = self.gridFunction(self.omega(self.x), name="full-sdf")
14
18
 
15
19
  self._phi = None
16
20
  self._bndProj = None
17
21
  self._extProj = None
18
22
  self._bndProjSDFs = {}
19
23
 
20
- self.fullSDF = self.gridFunction(self.omega(self.x), name="full-sdf")
21
24
 
22
25
  def gridFunction(self, expr, name):
23
26
  start_ = time.time()
24
27
  gf = dune.fem.function.gridFunction(expr, name=name, gridView=self.gridView)
25
- print(f"{name} setup: {time.time() - start_}")
28
+ # print(f"{name} setup: {time.time() - start_}")
26
29
  return gf
27
30
 
28
31
  def phi(self, x):
@@ -67,11 +70,11 @@ class DomainDune(Domain):
67
70
  )
68
71
 
69
72
  self.gridView.hierarchicalGrid.adapt(mark)
70
- print(self.gridView.size(0))
73
+ # print(self.gridView.size(0))
71
74
  lowerTol /= 2
72
75
  upperTol /= 2
73
76
 
74
- def _filter(self, tolerance=1):
77
+ def _filter(self, tolerance):
75
78
  sd = self.fullSDF
76
79
  tol = tolerance # * self.epsilon.value: issue here with epsilon being a UFL expression due to CSG approach
77
80
  phiFilter = (
@@ -1,11 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ddfem
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Diffuse domain finite element solver
5
5
  Author-email: Luke Benfield <luke.benfield@warwick.ac.uk>, Andreas Dedner <a.s.dedner@warwick.ac.uk>
6
6
  License-Expression: MIT
7
- Project-URL: Homepage, https://...
8
- Project-URL: Issues, https://...
7
+ Project-URL: Homepage, https://gitlab.dune-project.org/dune-fem/ddfem
8
+ Project-URL: Issues, https://gitlab.dune-project.org/dune-fem/ddfem/-/issues
9
+ Project-URL: Documentation, https://ddfem.readthedocs.io/en/latest/index.html
10
+ Project-URL: Repository, https://gitlab.dune-project.org/dune-fem/ddfem.git
9
11
  Classifier: Programming Language :: Python :: 3
10
12
  Classifier: Operating System :: OS Independent
11
13
  Requires-Python: >=3.9
@@ -13,6 +15,8 @@ Description-Content-Type: text/markdown
13
15
  License-File: LICENSE
14
16
  Requires-Dist: fenics-ufl==2022.2.0
15
17
  Requires-Dist: numpy
18
+ Provides-Extra: dune
19
+ Requires-Dist: dune-fem; extra == "dune"
16
20
  Dynamic: license-file
17
21
 
18
22
  # Diffuse Domain Finite Element Methods
@@ -1,5 +1,5 @@
1
1
  ddfem/__init__.py,sha256=vQb-XOm3isbvckRLe_Zi7vcSwu1iWAZYAokP37kNk_M,137
2
- ddfem/boundary.py,sha256=qpvvjRBBUZHZULIRovuz1h8U30KQRtYERIJxN5O251c,7570
2
+ ddfem/boundary.py,sha256=N3HGprdboCb3OIEYr_z-b7bvNnuyQjG47h-jPzU3XDg,7534
3
3
  ddfem/model2ufl.py,sha256=DedK1xWQ7L8l71i259jtxgoTSkIoDKV4BV52PMasZQU,4323
4
4
  ddfem/plot.py,sha256=eL9e8uhJrDHN44bJ5nzeXpKkTx-bL5MMzGU1Tm07Hoo,605
5
5
  ddfem/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -21,7 +21,7 @@ ddfem/geometry/arc.py,sha256=ouK8gxkd2f8RtpAK33p6-zU5RoyMejxEge2IEcCOtR4,1381
21
21
  ddfem/geometry/ball.py,sha256=Q_ped9ay3KypU8sKutAXPH9XkEFJx5hIK7qTCy1Y26E,679
22
22
  ddfem/geometry/box.py,sha256=ecXUMI2a17-hZZyUXol08z7wk3IZn1yHE_CV9YIyR18,915
23
23
  ddfem/geometry/domain.py,sha256=9yZpJhWqDrQ6MuWXg6HjJRFntcNbwtgdIbKIulQD_kM,1419
24
- ddfem/geometry/domain_dune.py,sha256=2ArzeRU42o4-TS21DXajPSCXj_3SlgGdehgN7QJhQzc,2600
24
+ ddfem/geometry/domain_dune.py,sha256=VbowbqLwUq04S27nIbz8SisHnEc15s08VCCivB27Wz8,2801
25
25
  ddfem/geometry/helpers.py,sha256=kunsuciuJJwkcZgDn8A7wbKYSqIAYjdvhei_YfjvVtk,1049
26
26
  ddfem/geometry/pie.py,sha256=WjgYPI6YvkcxPTQB1SjdN22dFQHV0X8kSO6QcXDLBSU,1003
27
27
  ddfem/geometry/plane.py,sha256=hCRLa06yXfXzfms2JIbAusdPf5qFUy9DrjNDfZ-0TGA,500
@@ -34,8 +34,8 @@ ddfem/transformers/NNS.py,sha256=lGQVCd1x6KrzVyOEAIttaDXBFjP9nLBIj9wnp_fvYtg,341
34
34
  ddfem/transformers/NS.py,sha256=fsih358oeayvmovhTAuddjbx7O0K_faF5qTAMQdHH8s,3612
35
35
  ddfem/transformers/__init__.py,sha256=okno6aFZoIPaJRi_Nw7cM63jpy18rS2yHsSuG7Vb4Og,195
36
36
  ddfem/transformers/transformer_base.py,sha256=Ey6iGk203lnzJOhLjMxyQNgKbclba_RIPpMW22OT7zQ,6347
37
- ddfem-1.0.2.dist-info/licenses/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
38
- ddfem-1.0.2.dist-info/METADATA,sha256=737gMEOPH6LSxlwhd91e9f7YgFrbZLIGP5KOM8zxCGw,742
39
- ddfem-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- ddfem-1.0.2.dist-info/top_level.txt,sha256=LF2T9-5A2Bak81PqbCcsAex8d5Xrla2Wq8yrlQi-ZtY,6
41
- ddfem-1.0.2.dist-info/RECORD,,
37
+ ddfem-1.0.3.dist-info/licenses/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
38
+ ddfem-1.0.3.dist-info/METADATA,sha256=4eHMTzgnd6ot1UdcifO40Bs1-DLjo20WjWTUDo-uYnc,1037
39
+ ddfem-1.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
+ ddfem-1.0.3.dist-info/top_level.txt,sha256=LF2T9-5A2Bak81PqbCcsAex8d5Xrla2Wq8yrlQi-ZtY,6
41
+ ddfem-1.0.3.dist-info/RECORD,,
File without changes