Skip to content

Commit

Permalink
fix path defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
simbilod committed Jan 2, 2025
1 parent 3b8984b commit e5c077a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions meshwell/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(

# Model naming
self.model = gmsh.model
self.filename = filename
self.filename = Path(filename)
self.n_threads = n_threads

# Point snapping
Expand Down Expand Up @@ -155,8 +155,8 @@ def _initialize_model(self):
self.points = {}
self.segments = {}

self.model.add(self.filename)
self.model.setFileName(self.filename)
self.model.add(str(self.filename))
self.model.setFileName(str(self.filename))
gmsh.option.setNumber("General.NumThreads", self.n_threads)
gmsh.option.setNumber("Mesh.MaxNumThreads1D", self.n_threads)
gmsh.option.setNumber("Mesh.MaxNumThreads2D", self.n_threads)
Expand Down Expand Up @@ -346,7 +346,7 @@ def mesh(

# Use provided filename or default to self.filename
output_file = Path(
filename if filename is not None else str(self.filename).with_suffix(".msh")
filename if filename is not None else self.filename.with_suffix(".msh")
)

# Load CAD model or evaluate it
Expand Down

0 comments on commit e5c077a

Please sign in to comment.