File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ def test_nothing_happens(self):
1414 A = np .random .rand (3 , original_mesh_points .reshape (- 1 ).shape [0 ])
1515 b = cffd .fun (original_mesh_points )
1616 cffd .fixval = b
17- cffd .indices = np .arange (np .prod (cffd .n_control_points ) * 3 ).tolist ()
18- cffd .M = np .eye (len (cffd .indices ))
1917 new_mesh_points = cffd (original_mesh_points )
2018 assert np .array_equal (original_mesh_points , new_mesh_points )
2119
@@ -28,8 +26,6 @@ def test_constraint(self):
2826 "tests/test_datasets/meshpoints_sphere_orig.npy" )
2927 b = cffd .fun (original_mesh_points )
3028 cffd .fixval = b
31- cffd .indices = np .arange (np .prod (cffd .n_control_points ) * 3 ).tolist ()
32- cffd .M = np .eye (len (cffd .indices ))
3329 new_mesh_points = cffd (original_mesh_points )
3430 assert np .isclose (np .linalg .norm (cffd .fun (new_mesh_points ) - b ),
3531 np .array ([0.0 ]))
Original file line number Diff line number Diff line change 66
77
88class TestCFFD (TestCase ):
9+ def test_nothing_happens_0 (self ):
10+ np .random .seed (0 )
11+ cffd = CFFD ()
12+ original_mesh_points = np .load (
13+ "tests/test_datasets/meshpoints_sphere_orig.npy" )
14+ A = np .random .rand (3 , original_mesh_points .reshape (- 1 ).shape [0 ])
15+
16+ def fun (x ):
17+ x = x .reshape (- 1 )
18+ return A @ x
19+ new_mesh_points = cffd (original_mesh_points )
20+ assert np .array_equal (original_mesh_points , new_mesh_points )
21+
22+
923 def test_nothing_happens (self ):
1024 np .random .seed (0 )
1125 cffd = CFFD ()
You can’t perform that action at this time.
0 commit comments