Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Dec 12, 2024
1 parent 6f96d72 commit 61ad5aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions festim/meshing/mesh_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ def define_volume_markers(self, materials):

def define_measures(self, materials):
"""Creates the fenics.Measure objects for self.dx and self.ds"""
if len(materials) > 1 and any(m.borders is None for m in materials):
raise ValueError(
"borders attributes need to be set for multiple 1D domains"
)
if materials[0].borders is not None:
materials.check_borders(self.size)
self.define_markers(materials)
Expand Down

0 comments on commit 61ad5aa

Please sign in to comment.