Skip to content
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# eg: 'keyword1', 'keyword2', 'keyword3',
],

packages=['bgem', 'bgem.polygons', 'bgem.bspline', 'bgem.gmsh', 'bgem.external', 'bgem.geometry', 'bgem.stochastic'], #setuptools.find_packages(where='src'),
packages=['bgem', 'bgem.core', 'bgem.polygons', 'bgem.bspline', 'bgem.gmsh', 'bgem.external', 'bgem.geometry', 'bgem.stochastic'], #setuptools.find_packages(where='src'),
package_dir={'': 'src'},
#py_modules=[os.path.splitext(os.path.basename(path))[0] for path in glob.glob('src/*.py')],
# package_data={
Expand Down
4 changes: 2 additions & 2 deletions src/bgem/gmsh/gmsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ def _assign_physical_groups(self, obj):

# set physical groups
for reg, tags in reg_to_tags.values():
reg._gmsh_id = gmsh.model.addPhysicalGroup(reg.dim, tags, tag=-1)
gmsh.model.setPhysicalName(reg.dim, reg._gmsh_id, reg.name)
reg_gmsh_id = gmsh.model.addPhysicalGroup(reg.dim, tags, tag=-1)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reg._gmsh_id association to the GMSH Physical group.
Original code is correct.

gmsh.model.setPhysicalName(reg.dim, reg_gmsh_id, reg.name)


def _set_mesh_step(self, obj: 'ObjectSet'):
Expand Down
2 changes: 1 addition & 1 deletion src/bgem/stochastic/fr_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ def make_fractures_gmsh(self, gmsh_geom: 'GeometryOCC', transform=None):
shape = shape.scale([fr.rx, fr.ry, 1]) \
.rotate(axis=[0, 0, 1], angle=fr.shape_angle) \
.rotate(axis=fr.rotation_axis, angle=fr.rotation_angle) \
.translate(fr.center + shift) \
.translate(fr.center) \
.set_region(region_name)
region_map[region_name] = i
shapes.append(shape)
Expand Down
2 changes: 1 addition & 1 deletion tests/stochastic/test_hausdorf_dfn.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def plot_dfn(power):
im = Image.new('RGBA', s, (255, 255, 255, 255))
draw = ImageDraw.Draw(im)

fracture_box = [1, 1, 0]
fracture_box = [1, 1, 1]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 2D test so box is ok. domain use zero z component anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem probably in UniformBoxPosition, where zero volume imply failure of Poisson number of samples.

sample_range = (0.001, 1)
power = 2.1
conf_range = [0.001, 1]
Expand Down