momentum_leaking_matrix
momentum_leaking_matrix(V, T, dt=None, pow=1)
Constructs the momentum leaking matrix, that fudges the CD constraint to allow momentum to leak from the rig to the mesh. This is a diagonal matrix with entries ranging from 0 (full momentum leak), to 1 (no momentum leak). This leaking matrix is computed via a surface diffusion, where values at the surface have momentum leaking value set to 0, and smoothly increases to 1 at the interior.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
V |
(n, 3) float numpy array
|
Vertex positions |
required |
T |
(t, 4) int numpy array
|
Tet indices |
required |
dt |
float
|
Used in diffusion (default 1/l^2 where l is the mean edge lengths) |
None
|
pow |
float
|
Power to raise the diffusion weights to (default 1) |
1
|
Returns:
Name | Type | Description |
---|---|---|
D |
(n, n) scipy sparse matrix
|
Diagonal sparse matrix with entries varying from 0 (momentum-fully leaking) to 1 (momentum not leaking) for each vertex. |
Source code in src\fast_cody\momentum_leaking_matrix.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|