Matrix
Model ElementMatrixは、MotionSolveで使用される一般的な実数値のMxNマトリクスを定義します。
クラス名
Matrix
説明
- 行順または列順の密マトリクスとして
- 座標リスト(COO)フォーマットを使用した疎マトリクスとして
属性の概要
名前 | プロパティ | コマンドで変更可能か | 設計可能か |
---|---|---|---|
id | Int () | ||
label | Str () | ○ | |
full | Enum ("RORDER CORDER", default=None) | ○ | |
rows | Int (0) | ○ | |
columns | Int (0) | ○ | |
values | Double ([], count=0) | ○ | FDのみ |
sparse | Bool (False) | ○ | |
i | Int ([], count=0) | ○ | |
j | Int ([], count=0) | ○ |
使用法
#1: Dense Matrix Format (row or column order)
Matrix (rows=integer, columns=integer, values=list, optional_attributes)
#2. Sparse matrix in COO format
Matrix (sparse=True, rows=integer, columns=integer, i=list, j=list, values=list, optional_attributes)
属性
- rows
- 整数
- columns
- 整数
- values
- 倍精度値のリスト
- full
- 文字列
- sparse
- ブール
- rows
- 整数
- columns
- 整数
- i
- 整数のリスト
- j
- 整数のリスト
- values
- 倍精度値のリスト
- id
- 整数
- label
- 文字列
例
XMLシンタックス | Pythonシンタックス |
---|---|
Values = [11, 12, 13, 14, 15, 21, 22, 23, 24, 25, 31, 32, 33, 34, 35, 41, 42, 43, 44, 45] Mat1 = Matrix (label="Mat-1", rows=4, columns=5, full="RORDER", values=Values) |
|
Values = [11, 21, 31, 41, 12, 22, 32, 42, 13, 23, 33, 43, 14, 24, 34, 44, 15, 25, 35, 45] Mat2 = Matrix (label="Mat-2", rows=4, columns=5, values=Values) |
|
Irow = [1, 1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10] Jcol = [1, 7, 8, 9, 6, 4, 8, 2, 10, 7, 9, 3] Values = [3.3, 7.7, 2.9, 1.1, 2.2, 4.4, 7.6, 1.9, 9.2, 5.1, 10, 4.2] Mat3 = Matrix (label="Mat-3", sparse=True, rows=10, columns=10, i=Irow, j=Jcol, values=Values) |
コメント
- プロパティの概要、使用理由、および拡張方法については、プロパティをご参照ください。
- Matrixの詳細については、Reference: Matrixをご参照ください。