File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -267,5 +267,18 @@ def test_grad_extensions(self):
267
267
self .ph_object = self ._run_ph_farmer ()
268
268
self .assertAlmostEqual (self .ph_object .conv , 2.128968965420187 , places = 1 )
269
269
270
+ def test_dyn_grad_extensions (self ):
271
+ print ("** test dynamic grad extensions **" )
272
+ self .cfg .grad_rho_file_out = './_test_rho.csv'
273
+ #self.cfg.grad_cost_file_in = './examples/rho_test_data/grad_cost.csv'
274
+ self .cfg .xhatpath = './examples/rho_test_data/farmer_cyl_nonants.npy'
275
+ self .cfg .max_iterations = 4
276
+ self .cfg .dynamic_rho_dual_crit = True
277
+ self .cfg .dynamic_rho_dual_thresh = 0.1
278
+ self .ph_object = self ._run_ph_farmer ()
279
+ print (f"{ self .ph_object .conv = } " )
280
+ self .assertAlmostEqual (self .ph_object .conv , 0.039598 , places = 1 )
281
+
282
+
270
283
if __name__ == '__main__' :
271
284
unittest .main ()
You can’t perform that action at this time.
0 commit comments