Skip to content

Commit

Permalink
Working on 1D bc not 2d area ...
Browse files Browse the repository at this point in the history
Signed-off-by: Umberto Zerbinati <[email protected]>
  • Loading branch information
Umberto Zerbinati committed Apr 24, 2024
1 parent 8ab3598 commit 371e894
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ngsPETSc/plex.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ def createPETScDMPlex(self, mesh, labels):
vStart, _ = plex.getDepthStratum(0) # vertices
for e in self.ngMesh.Elements1D():
join = plex.getJoin([vStart+v.nr-1 for v in e.vertices])
plex.setLabelValue(FACE_SETS_LABEL, join[0], int(e.index))
if e.index in newLabels:
plex.setLabelValue(FACE_SETS_LABEL, join[0], int(newLabels[e.index]))
else:
plex.setLabelValue(FACE_SETS_LABEL, join[0], int(e.index))
if not (1 == self.ngMesh.Elements2D().NumPy()["index"]).all():
for e in self.ngMesh.Elements2D():
join = plex.getFullJoin([vStart+v.nr-1 for v in e.vertices])
if e.index in newLabels:
plex.setLabelValue(CELL_SETS_LABEL, join[0], int(newLabels[e.index]))
else:
plex.setLabelValue(CELL_SETS_LABEL, join[0], int(e.index))
plex.setLabelValue(CELL_SETS_LABEL, join[0], int(e.index))
self.petscPlex = plex
else:
plex = PETSc.DMPlex().createFromCellList(2,
Expand Down

0 comments on commit 371e894

Please sign in to comment.