phiFEM 0.8.1.dev1__py3-none-any.whl → 0.8.2.dev1__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.
- phifem/mesh_scripts.py +20 -10
- {phifem-0.8.1.dev1.dist-info → phifem-0.8.2.dev1.dist-info}/METADATA +2 -2
- phifem-0.8.2.dev1.dist-info/RECORD +7 -0
- {phifem-0.8.1.dev1.dist-info → phifem-0.8.2.dev1.dist-info}/WHEEL +1 -1
- phifem-0.8.1.dev1.dist-info/RECORD +0 -7
- {phifem-0.8.1.dev1.dist-info → phifem-0.8.2.dev1.dist-info}/licenses/COPYING +0 -0
- {phifem-0.8.1.dev1.dist-info → phifem-0.8.2.dev1.dist-info}/licenses/COPYING.lesser +0 -0
phifem/mesh_scripts.py
CHANGED
|
@@ -380,8 +380,9 @@ def _transfer_tags(
|
|
|
380
380
|
# TODO: change this line to allow parallel computing
|
|
381
381
|
source_tags = source_mesh_tags.values
|
|
382
382
|
|
|
383
|
-
|
|
384
|
-
|
|
383
|
+
num_entities = emap.topology.index_map(edim).size_local
|
|
384
|
+
dest_entities = np.arange(num_entities)
|
|
385
|
+
dest_tags = emap.sub_topology_to_topology(source_tags, False)
|
|
385
386
|
|
|
386
387
|
dest_entities_indices = np.hstack(dest_entities).astype(np.int32)
|
|
387
388
|
dest_entities_markers = np.hstack(dest_tags).astype(np.int32)
|
|
@@ -570,21 +571,30 @@ def _tag_facets(
|
|
|
570
571
|
interior_facets = np.setdiff1d(all_facets, boundary_facets)
|
|
571
572
|
|
|
572
573
|
cell_facet_pairs = _cells_facets_pairs(f2c_map, c2f_map, interior_facets)
|
|
573
|
-
levelset_eval_int = levelset_expression_facets.eval(
|
|
574
|
+
levelset_eval_int = levelset_expression_facets.eval(
|
|
575
|
+
mesh, cell_facet_pairs.reshape(-1, 2)
|
|
576
|
+
)
|
|
574
577
|
|
|
575
|
-
|
|
576
|
-
|
|
578
|
+
geq_zero_int = np.greater_equal(np.min(levelset_eval_int, axis=1), 0.0)
|
|
579
|
+
leq_zero_int = np.less_equal(np.max(levelset_eval_int, axis=1), 0.0)
|
|
577
580
|
direct_int = np.isclose(np.sum(np.abs(levelset_eval_int), axis=1), 0.0)
|
|
581
|
+
exterior_int = np.logical_and(geq_zero_int, ~direct_int)
|
|
582
|
+
interior_int = np.logical_and(leq_zero_int, ~direct_int)
|
|
578
583
|
|
|
579
584
|
connected_cells = f2c_map[boundary_facets][:, 0]
|
|
580
585
|
|
|
581
586
|
cell_facet_pairs = _compute_integration_entities(
|
|
582
587
|
mesh, connected_cells, boundary_facets, 0
|
|
583
588
|
)[0][1]
|
|
584
|
-
levelset_eval_bdy = levelset_expression_facets.eval(
|
|
585
|
-
|
|
586
|
-
|
|
589
|
+
levelset_eval_bdy = levelset_expression_facets.eval(
|
|
590
|
+
mesh, cell_facet_pairs.reshape(-1, 2)
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
geq_zero_bdy = np.greater_equal(np.min(levelset_eval_bdy, axis=1), 0.0)
|
|
594
|
+
leq_zero_bdy = np.less_equal(np.max(levelset_eval_bdy, axis=1), 0.0)
|
|
587
595
|
direct_bdy = np.isclose(np.sum(np.abs(levelset_eval_bdy), axis=1), 0.0)
|
|
596
|
+
exterior_bdy = np.logical_and(geq_zero_bdy, ~direct_bdy)
|
|
597
|
+
interior_bdy = np.logical_and(leq_zero_bdy, ~direct_bdy)
|
|
588
598
|
|
|
589
599
|
facets_indices = np.hstack([interior_facets, boundary_facets])
|
|
590
600
|
exterior = np.hstack([exterior_int, exterior_bdy])
|
|
@@ -702,7 +712,7 @@ def _compute_codim_interpolation_points(
|
|
|
702
712
|
codim_cell_name = codim_mesh.topology.cell_name()
|
|
703
713
|
new_elmt = element(family_name, codim_cell_name, degree)
|
|
704
714
|
new_space = dfx.fem.functionspace(codim_mesh, new_elmt)
|
|
705
|
-
return new_space.element.interpolation_points
|
|
715
|
+
return new_space.element.interpolation_points
|
|
706
716
|
|
|
707
717
|
|
|
708
718
|
def _levelset_expression(
|
|
@@ -769,7 +779,7 @@ def compute_tags_measures(
|
|
|
769
779
|
The boundaries measure.
|
|
770
780
|
Submesh c-map, v-map and n-map.
|
|
771
781
|
"""
|
|
772
|
-
interpolation_points = detection_space.element.interpolation_points
|
|
782
|
+
interpolation_points = detection_space.element.interpolation_points
|
|
773
783
|
levelset_expression = _levelset_expression(mesh, levelset, interpolation_points)
|
|
774
784
|
|
|
775
785
|
cells_tags = _tag_cells(mesh, levelset_expression, single_layer_cut)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: phiFEM
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2.dev1
|
|
4
4
|
Summary: phiFEM: convenience tools to use the phiFEM immersed boundary finite element method with dolfinx.
|
|
5
5
|
Project-URL: Homepage, https://github.com/PhiFEM/phiFEM
|
|
6
6
|
Project-URL: Issues, https://github.com/PhiFEM/phiFEM/issues
|
|
@@ -12,7 +12,7 @@ License-File: COPYING.lesser
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Requires-Python: >=3.9
|
|
15
|
-
Requires-Dist: fenics-dolfinx
|
|
15
|
+
Requires-Dist: fenics-dolfinx<0.11,>=0.9.0
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
|
|
18
18
|
<p align="center" width="100%">
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
phifem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
phifem/mesh_scripts.py,sha256=TIAGOjbfsHLrBFbNgvjs08iLEAPTabx-vrYUjmPcy0w,33678
|
|
3
|
+
phifem-0.8.2.dev1.dist-info/METADATA,sha256=dQqGlLjoQ9B5uEGV9c_Gn-qZJeg-xsxQYyHUsceXlLY,5612
|
|
4
|
+
phifem-0.8.2.dev1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
5
|
+
phifem-0.8.2.dev1.dist-info/licenses/COPYING,sha256=xTplwv1WHIfqq_EHLvXcq4ZTBCvBUwhGX1JBNYXrYnE,35146
|
|
6
|
+
phifem-0.8.2.dev1.dist-info/licenses/COPYING.lesser,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
|
7
|
+
phifem-0.8.2.dev1.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
phifem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
phifem/mesh_scripts.py,sha256=AAUsA75d8UVjKTcjbie9Ap9GS0zFBR2rvNPRiAfT9L0,33222
|
|
3
|
-
phifem-0.8.1.dev1.dist-info/METADATA,sha256=9N9PgoSH6zNVh_jN3XSkp_QVseI74H8y-3yYRESOLRM,5606
|
|
4
|
-
phifem-0.8.1.dev1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
5
|
-
phifem-0.8.1.dev1.dist-info/licenses/COPYING,sha256=xTplwv1WHIfqq_EHLvXcq4ZTBCvBUwhGX1JBNYXrYnE,35146
|
|
6
|
-
phifem-0.8.1.dev1.dist-info/licenses/COPYING.lesser,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
|
7
|
-
phifem-0.8.1.dev1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|