You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pygem/cffd.py
+65-51Lines changed: 65 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -19,13 +19,12 @@ class CFFD(FFD):
19
19
20
20
:param list n_control_points: number of control points in the x, y, and z
21
21
direction. Default is [2, 2, 2].
22
-
22
+
:param string mode: it can be ``affine`` or ``triaffine``. The first option is for the F that are affine in all the coordinates of the points.
23
+
The second one is for functions that are F in the coordinates of the points. The first option implies the second, but is optimal for that class of functions.
23
24
:cvar numpy.ndarray box_length: dimension of the FFD bounding box, in the
24
25
x, y and z direction (local coordinate system).
25
26
:cvar numpy.ndarray box_origin: the x, y and z coordinates of the origin of
26
27
the FFD bounding box.
27
-
:cvar numpy.ndarray rot_angle: rotation angle around x, y and z axis of the
28
-
FFD bounding box.
29
28
:cvar numpy.ndarray n_control_points: the number of control points in the
30
29
x, y, and z direction.
31
30
:cvar numpy.ndarray array_mu_x: collects the displacements (weights) along
@@ -36,79 +35,100 @@ class CFFD(FFD):
36
35
z, normalized with the box length z.
37
36
:cvar callable fun: it defines the F of the constraint F(x)=c. Default is the constant 1 function.
38
37
:cvar numpy.ndarray fixval: it defines the c of the constraint F(x)=c. Default is 1.
39
-
:cvar numpy.ndarray mask: a boolean tensor that tells to the class
38
+
:cvar numpy.ndarray ffd_mask: a boolean tensor that tells to the class
40
39
which control points can be moved, and in what direction, to enforce the constraint.
41
40
The tensor has shape (n_x,n_y,n_z,3), where the last dimension indicates movement
42
41
on x,y,z respectively. Default is all true.
43
-
:cvar numpy.ndarray weight_matrix: a symmetric positive definite weigth matrix.
44
-
It must be of row and column size the number of trues in the mask.
45
-
It weights the movemement of the control points which have a true flag in the mask.
46
-
Default is identity.
42
+
:cvar numpy.ndarray fun_mask: a boolean tensor that tells to the class
43
+
on which axis which constraint depends on. The tensor has shape (n_cons,3), where the last dimension indicates dependency on
44
+
on x,y,z respectively. Default is all true. It used only in the triaffine mode.
0 commit comments