Skip to content

Commit cb1a18c

Browse files
authored
gmsh multisphere (#40)
1 parent 17dd92e commit cb1a18c

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
66
The format is based on `Keep a Changelog`_,
77
and this project adheres to `Semantic Versioning`_.
88

9+
`1.4.10`_ - 2021-06-08
10+
--------------------------
11+
Fixed
12+
'''''''
13+
- Bug in gmsh for multi-circle seeds.
14+
915
`1.4.9`_ - 2021-05-14
1016
--------------------------
1117
Fixed
@@ -231,7 +237,8 @@ Added
231237

232238
.. LINKS
233239
234-
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.9...HEAD
240+
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.10...HEAD
241+
.. _`1.4.10`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.9...v1.4.10
235242
.. _`1.4.9`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.8...v1.4.9
236243
.. _`1.4.8`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.7...v1.4.8
237244
.. _`1.4.7`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.6...v1.4.7

src/microstructpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
import microstructpy.seeding
55
import microstructpy.verification
66

7-
__version__ = '1.4.9'
7+
__version__ = '1.4.10'

src/microstructpy/meshing/trimesh.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,9 +938,11 @@ def _call_gmsh(pmesh, phases, res, edge_res):
938938
loops = []
939939
surfs = []
940940
seed_facets = {}
941+
seed_phases = {}
941942
for i, r in enumerate(pmesh.regions):
942943
s = pmesh.seed_numbers[i]
943944
seed_facets.setdefault(s, set()).symmetric_difference_update(r)
945+
seed_phases[s] = pmesh.phase_numbers[i]
944946
for i in seed_facets:
945947
region = list(seed_facets[i])
946948
sorted_pairs = _sort_facets([pmesh.facets[f] for f in region])
@@ -963,7 +965,7 @@ def _call_gmsh(pmesh, phases, res, edge_res):
963965
surfs.append(geom.add_plane_surface(loops[-1]))
964966
lbl = 'seed-' + str(i)
965967
geom.add_physical(surfs[-1], lbl)
966-
p_num = pmesh.phase_numbers[i]
968+
p_num = seed_phases[i]
967969
mat_type = phases[p_num].get('material_type', 'solid')
968970
if mat_type not in _misc.kw_void:
969971
phys_seeds.append(lbl)

0 commit comments

Comments
 (0)