Skip to content

Commit b9f0643

Browse files
committed
edges in numerical data
1 parent 7d86a23 commit b9f0643

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
* Added `compas_fd.types.IntNx2`.
13+
1214
### Changed
1315

1416
### Removed

src/compas_fd/solvers/fd_numerical_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from compas_fd.types import FloatNx1
1515
from compas_fd.types import FloatNx3
1616
from compas_fd.types import FloatNxM
17+
from compas_fd.types import IntNx2
1718
from compas_fd.types import IntNxM
1819

1920
from .result import Result
@@ -26,6 +27,7 @@ class FDNumericalData:
2627
free: int
2728
fixed: int
2829
xyz: FloatNx3
30+
edges: IntNx2
2931
C: IntNxM
3032
q: FloatNx1
3133
Q: FloatNxM
@@ -77,7 +79,7 @@ def from_params(
7779
A = C.T.dot(Q).dot(C)
7880
Ai = Ci.T.dot(Q).dot(Ci)
7981
Af = Ci.T.dot(Q).dot(Cf)
80-
return cls(free, fixed, xyz, C, q, Q, p, A, Ai, Af)
82+
return cls(free, fixed, xyz, edges, C, q, Q, p, A, Ai, Af)
8183

8284
@classmethod
8385
def from_mesh(cls, mesh: Mesh) -> "FDNumericalData":

src/compas_fd/types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
]
1919
"""An array-like object, with each item in the array containing one (1) float."""
2020

21+
IntNx2 = Union[
22+
Sequence[Annotated[Sequence[int], 2]],
23+
Annotated[npt.NDArray[np.int32], Literal["*, 2"]],
24+
]
25+
"""An array-like object, with each item in the array containing two (2) integers."""
26+
2127
IntNxM = Annotated[npt.NDArray[np.int32], Literal["*, *"]]
2228

2329
FloatNxM = Annotated[npt.NDArray[np.float64], Literal["*, *"]]

0 commit comments

Comments
 (0)