Skip to content

Commit

Permalink
Added unique indices and nodes to fe zones
Browse files Browse the repository at this point in the history
  • Loading branch information
lamkina committed Nov 8, 2024
1 parent fc5fbe8 commit 1e44f71
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions baseclasses/utils/tecplotIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,14 @@ def triConnectivity(self) -> npt.NDArray:
else:
raise TypeError(f"'triConnectivity' not supported for {self.zoneType.name} zone type.")

@property
def uniqueIndices(self) -> npt.NDArray:
return np.unique(self.connectivity.flatten())

Check warning on line 364 in baseclasses/utils/tecplotIO.py

View check run for this annotation

Codecov / codecov/patch

baseclasses/utils/tecplotIO.py#L364

Added line #L364 was not covered by tests

@property
def uniqueNodalData(self) -> Dict[str, npt.NDArray]:
return {var: self.data[var][self.uniqueIndices] for var in self.variables}

Check warning on line 368 in baseclasses/utils/tecplotIO.py

View check run for this annotation

Codecov / codecov/patch

baseclasses/utils/tecplotIO.py#L368

Added line #L368 was not covered by tests

def _validateZoneType(self) -> None:
supportedZones = [zone.name for zone in ZoneType if zone.name != "ORDERED"]
if isinstance(self.zoneType, str):
Expand Down

0 comments on commit 1e44f71

Please sign in to comment.