-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset_default_values.py
381 lines (355 loc) · 24.4 KB
/
set_default_values.py
1
2
3
4
5
6
7
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
from simsopt.objectives import Weight
import numpy as np
def set_default(inputs):
out = ""
def logprint(mystr, out):
out += mystr + "\n"
return out
if 'coils_objective_weight' not in inputs.keys():
out = logprint('Setting default value for coils_objective_weight', out)
inputs['coils_objective_weight'] = Weight(1)
if 'CS_THRESHOLD' not in inputs.keys():
out = logprint('Setting default value for CS_THRESHOLD', out)
inputs['CS_THRESHOLD'] = 0
if 'CS_WEIGHT' not in inputs.keys():
out = logprint('Setting default value for CS_WEIGHT', out)
inputs['CS_WEIGHT'] = Weight(0)
if 'CS_WEIGHT_iteration' not in inputs.keys():
out = logprint('Setting default value for CS_WEIGHT_iteration', out)
inputs['CS_WEIGHT_iteration'] = False
if 'CC_THRESHOLD' not in inputs.keys():
out = logprint('Setting default value for CC_THRESHOLD', out)
inputs['CC_THRESHOLD'] = 0
if 'CC_WEIGHT' not in inputs.keys():
out = logprint('Setting default value for CC_WEIGHT', out)
inputs['CC_WEIGHT'] = Weight(0)
if 'CC_WEIGHT_iteration' not in inputs.keys():
out = logprint('Setting default value for CC_WEIGHT_iteration', out)
inputs['CC_WEIGHT_iteration'] = False
if 'directory' not in inputs.keys():
raise ValueError('No specified directory!')
if 'vmec' not in inputs.keys():
inputs['vmec'] = dict()
if 'filename' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec filename', out)
inputs['vmec']['filename'] = 'input.vacuum_cssc_scaled'
if 'verbose' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec verbose', out)
inputs['vmec']['verbose'] = False
if 'nphi' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec nphi', out)
inputs['vmec']['nphi'] = 34
if 'ntheta' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec ntheta', out)
inputs['vmec']['ntheta'] = 34
if 'internal_mpol' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec internal_mpol', out)
inputs['vmec']['internal_mpol'] = 8
if 'internal_ntor' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec internal_ntor', out)
inputs['vmec']['internal_ntor'] = 8
if 'max_boundary_mpol' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec max_boundary_mpol', out)
inputs['vmec']['max_boundary_mpol'] = None
if 'max_boundary_ntor' not in inputs['vmec'].keys():
out = logprint('Setting default value for vmec max_boundary_ntor', out)
inputs['vmec']['max_boundary_ntor'] = None
if 'dofs' not in inputs['vmec'].keys():
inputs['vmec']['dofs'] = dict()
if 'mpol' not in inputs['vmec']['dofs'].keys():
out = logprint('Setting default value for vmec dofs mpol', out)
inputs['vmec']['dofs']['mpol'] = 2
if 'ntor' not in inputs['vmec']['dofs'].keys():
out = logprint('Setting default value for vmec dofs ntor', out)
inputs['vmec']['dofs']['ntor'] = 2
if 'target' not in inputs['vmec'].keys():
inputs['vmec']['target'] = dict()
if 'aspect_ratio' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target aspec_ratio', out)
inputs['vmec']['target']['aspect_ratio'] = 3.5
if 'aspect_ratio_weight' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target aspect_ratio_weight', out)
inputs['vmec']['target']['aspect_ratio_weight'] = Weight(0)
if 'aspect_ratio_weight_iteration' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target aspect_ratio_weight_iteration', out)
inputs['vmec']['target']['aspect_ratio_weight_iteration'] = False
if 'aspect_ratio_constraint_type' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target aspect_ratio_constraint_type', out)
inputs['vmec']['target']['aspect_ratio_constraint_type'] = 'identity'
if 'iota' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target iota', out)
inputs['vmec']['target']['iota'] = -0.2
if 'iota_weight' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target iota_weight', out)
inputs['vmec']['target']['iota_weight'] = Weight(0)
if 'iota_weight_iteration' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target iota_weight', out)
inputs['vmec']['target']['iota_weight_iteration'] = False
if 'iota_constraint_type' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target iota_constraint_type', out)
inputs['vmec']['target']['iota_constraint_type'] = 'identity'
if 'qa_surface' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target qa_surface', out)
inputs['vmec']['target']['qa_surface'] = np.array([1])
if 'qa_ntheta' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target qa_ntheta', out)
inputs['vmec']['target']['qa_ntheta'] = 63
if 'qa_nphi' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target qa_nphi', out)
inputs['vmec']['target']['qa_nphi'] = 64
if 'volume' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec target volume', out)
inputs['vmec']['target']['volume'] = 0.15
if 'volume_weight' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec volume weight', out)
inputs['vmec']['target']['volume_weight'] = Weight(0)
if 'volume_weight_iteration' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec volume weight iteration', out)
inputs['vmec']['target']['volume_weight_iteration'] = False
if 'volume_constraint_type' not in inputs['vmec']['target'].keys():
out = logprint('Setting default value for vmec volume_constraint_type', out)
inputs['vmec']['target']['volume_constraint_type'] = 'min'
if 'magnetic_well_weight' not in inputs['vmec']['target']:
out = logprint('Setting default value for vmec magnetic_well_weight', out)
inputs['vmec']['target']['magnetic_well_weight'] = Weight(0)
if 'magnetic_well_type' not in inputs['vmec']['target']:
out = logprint('Setting default value for vmec magnetic_well_type', out)
inputs['vmec']['target']['magnetic_well_type'] = 'standard'
# COILS
if 'cnt_coils' not in inputs.keys():
inputs['cnt_coils'] = dict()
if 'geometry' not in inputs['cnt_coils'].keys():
inputs['cnt_coils']['geometry'] = dict()
if 'filename' not in inputs['cnt_coils']['geometry'].keys():
out = logprint('Setting default value for cnt_coils geometry filename', out)
inputs['cnt_coils']['geometry']['filename'] = 'flux_100_bs_cssc_cssc.json' # Input file for IL and PF coils initial guess
if 'dofs' not in inputs['cnt_coils'].keys():
inputs['cnt_coils']['dofs'] = dict()
if 'IL_order' not in inputs['cnt_coils']['dofs'].keys():
out = logprint('Setting default value for cnt_coils dofs IL_order', out)
inputs['cnt_coils']['dofs']['IL_order'] = 2 # The xn, yn, zn, with n<=IL_order are unfixed
if 'IL_geometry_free' not in inputs['cnt_coils']['dofs'].keys():
out = logprint('Setting default value for cnt_coils dofs IL_geometry_free', out)
inputs['cnt_coils']['dofs']['IL_geometry_free'] = True # Set to True to unfix IL coils geometry
if 'PF_current_free' not in inputs['cnt_coils']['dofs'].keys():
out = logprint('Setting default value for cnt_coils dofs PF_current_free', out)
inputs['cnt_coils']['dofs']['PF_current_free'] = True # Set to True to unfix PF current
if 'R00_free' not in inputs['cnt_coils']['dofs'].keys():
out = logprint('Setting default value for cnt_coils dofs R00_free', out)
inputs['cnt_coils']['dofs']['R00_free'] = False # Set to True to unfix PF current
if 'target' not in inputs['cnt_coils'].keys():
inputs['cnt_coils']['target'] = dict()
if 'square_flux_threshold' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target square flux threshold', out)
inputs['cnt_coils']['target']['square_flux_threshold'] = 1e-7
if 'square_flux_penalty_type' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target square flux penalty type', out)
inputs['cnt_coils']['target']['square_flux_constraint_type'] = 'objective'
if 'IL_length' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_length', out)
inputs['cnt_coils']['target']['IL_length'] = 3 # Maximum length for IL coils
if 'IL_length_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_length_weight', out)
inputs['cnt_coils']['target']['IL_length_weight'] = Weight(0) # Weight on IL length penalty
if 'IL_length_weight_iteration' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_length_weight_iteration', out)
inputs['cnt_coils']['target']['IL_length_weight_iteration'] = False
if 'IL_length_constraint_type' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_length_constraint_type', out)
inputs['cnt_coils']['target']['IL_length_constraint_type'] = 'max' # Weight on IL length penalty
if 'IL_msc_threshold' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_msc_threshold', out)
inputs['cnt_coils']['target']['IL_msc_threshold'] = 10 # Maximum mean curvature of IL coils
if 'IL_msc_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_msc_weight', out)
inputs['cnt_coils']['target']['IL_msc_weight'] = Weight(0) # Weight on IL mean curvature penalty
if 'IL_msc_weight_iteration' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_msc_weight_iteration', out)
inputs['cnt_coils']['target']['IL_msc_weight_iteration'] = False
if 'IL_maxc_threshold' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxc_threshold', out)
inputs['cnt_coils']['target']['IL_maxc_threshold'] = 20 # Maximum local curvature of IL coils
if 'IL_maxc_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxc_weight', out)
inputs['cnt_coils']['target']['IL_maxc_weight'] = Weight(0) # Weight on IL local curvature penalty
if 'IL_maxc_weight_iteration' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxc_weight_iteration', out)
inputs['cnt_coils']['target']['IL_maxc_weight_iteration'] = False
if 'IL_maxR_threshold' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxR_threshold', out)
inputs['cnt_coils']['target']['IL_maxR_threshold'] = 0.65
if 'IL_maxR_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxR_weight', out)
inputs['cnt_coils']['target']['IL_maxR_weight'] = Weight(0)
if 'IL_maxR_weight_iteration' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxR_weight_iteration', out)
inputs['cnt_coils']['target']['IL_maxR_weight_iteration'] = False
if 'IL_maxZ_threshold' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxZ_threshold', out)
inputs['cnt_coils']['target']['IL_maxZ_threshold'] = 0.75
if 'IL_maxZ_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxZ_weight', out)
inputs['cnt_coils']['target']['IL_maxZ_weight'] = Weight(0)
if 'IL_maxZ_weight_iteration' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_maxZ_weight_iteration', out)
inputs['cnt_coils']['target']['IL_maxZ_weight_iteration'] = False
if 'IL_vessel_threshold' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_vessel_threshold', out)
inputs['cnt_coils']['target']['IL_vessel_threshold'] = 0.16
if 'IL_vessel_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_vessel_weight', out)
inputs['cnt_coils']['target']['IL_vessel_weight'] = Weight(0)
if 'IL_vessel_weight_iteration' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target IL_vessel_weight_iteration', out)
inputs['cnt_coils']['target']['IL_vessel_weight_iteration'] = False
if 'arclength_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for arc length weight', out)
inputs['cnt_coils']['target']['arclength_weight'] = Weight(0)
if 'arclength_weight_iteration' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for arc length weight iteration', out)
inputs['cnt_coils']['target']['arclength_weight_iteration'] = False
# Winding angle
if 'winding' not in inputs.keys():
inputs['winding'] = dict()
if 'rot_order' not in inputs['winding'].keys():
out = logprint('Setting default value for winding angle rotation order', out)
inputs['winding']['rot_order'] = 10
if 'width' not in inputs['winding'].keys():
out = logprint('Setting default value for HTS tape width', out)
inputs['winding']['width'] = 4e-3
if 'tor_threshold' not in inputs['winding'].keys():
out = logprint('Setting default value for tor_threshold', out)
inputs['winding']['tor_threshold'] = 1e-3
if 'cur_threshold' not in inputs['winding'].keys():
out = logprint('Setting default value for cur_threshold', out)
inputs['winding']['cur_threshold'] = 1e-3
if 'il_tor_weight' not in inputs['winding'].keys():
out = logprint('Setting default value for il_tor_weight', out)
inputs['winding']['il_tor_weight'] = Weight(0)
if 'il_tor_weight_iteration' not in inputs['winding'].keys():
out = logprint('Setting default value for il_tor_weight_iteration', out)
inputs['winding']['il_tor_weight_iteration'] = False
if 'il_bincurv_weight' not in inputs['winding'].keys():
out = logprint('Setting default value for il_bincurv_weight', out)
inputs['winding']['il_bincurv_weight'] = Weight(0)
if 'il_bincurv_weight_iteration' not in inputs['winding'].keys():
out = logprint('Setting default value for il_bincurv_weight_iteration', out)
inputs['winding']['il_bincurv_weight_iteration'] = False
if 'il_twist_max' not in inputs['winding'].keys():
out = logprint('Setting default value for il_twist_max', out)
inputs['winding']['il_twist_max'] = 0.5
if 'il_twist_weight' not in inputs['winding'].keys():
out = logprint('Setting default value for il_twist_weight', out)
inputs['winding']['il_twist_weight'] = Weight(0)
if 'il_twist_weight_iteration' not in inputs['winding'].keys():
out = logprint('Setting default value for il_twist_weight_iteration', out)
inputs['winding']['il_twist_weight_iteration'] = False
## Windowpane coils related inputs
if 'wp_coils' not in inputs.keys():
inputs['wp_coils'] = dict()
if 'geometry' not in inputs['wp_coils'].keys():
inputs['wp_coils']['geometry'] = dict()
if 'filename' not in inputs['wp_coils']['geometry'].keys():
out = logprint('Setting default value for wp_coils geometry filename', out)
inputs['wp_coils']['geometry']['filename'] = None # if None, coils are initialized
# according to inputs below
if 'n_base_coils' not in inputs['wp_coils']['geometry'].keys():
inputs['wp_coils']['geometry']['n_base_coils'] = None
if 'ncoil_per_row' not in inputs['wp_coils']['geometry'].keys():
out = logprint('Setting default value for wp_coils geometry ncoils_per_row', out)
inputs['wp_coils']['geometry']['ncoil_per_row'] = 2 # total number of wp coils will be
# nfp*size(Z0)*ncoil_per_row
if 'R0' not in inputs['wp_coils']['geometry'].keys():
out = logprint('Setting default value for wp_coils geometry R0', out)
inputs['wp_coils']['geometry']['R0'] = 0.3 # Initial radial position of WP coils
if 'R1' not in inputs['wp_coils']['geometry'].keys():
out = logprint('Setting default value for wp_coils geometry R1', out)
inputs['wp_coils']['geometry']['R1'] = 0.05 # Initial radius of WP coils
if 'Z0' not in inputs['wp_coils']['geometry'].keys():
out = logprint('Setting default value for wp_coils geometry Z0', out)
inputs['wp_coils']['geometry']['Z0'] = [0] # Number of "rows" of WP coils
if 'dofs' not in inputs['wp_coils'].keys():
inputs['wp_coils']['dofs'] = dict()
if 'name' not in inputs['wp_coils']['dofs'].keys():
inputs['wp_coils']['dofs']['name'] = [] # by default curve is fixed
if 'target' not in inputs['wp_coils'].keys():
inputs['wp_coils']['target'] = dict()
if 'length' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target length', out)
inputs['wp_coils']['target']['length'] = inputs['cnt_coils']['target']['IL_length'] / 3 # max length for WP coils
if 'length_weight' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target length_weight', out)
inputs['wp_coils']['target']['length_weight'] = Weight(0) # Weight on WP length penalty
if 'length_constraint_type' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target length_constraint_type', out)
inputs['wp_coils']['target']['length_constraint_type'] = 'max' # Weight on IL length penalty
if 'msc_threshold' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target msc_threshold', out)
inputs['wp_coils']['target']['msc_threshold'] = 20 # Maximum mean curvature of WP coils
if 'msc_weight' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target msc_weight', out)
inputs['wp_coils']['target']['msc_weight'] = Weight(0) # Weight on WP coils mean curvature penalty
if 'maxc_threshold' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target maxc_threshold', out)
inputs['wp_coils']['target']['maxc_threshold'] = 50 # Maximum local curvature of WP coils
if 'maxc_weight' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target maxc_weight', out)
inputs['wp_coils']['target']['maxc_weight'] = Weight(0) # Weight on WP local curvature
if 'current_threshold' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target current_threshold', out)
inputs['wp_coils']['target']['current_threshold'] = 1E+5 # Maximum current in WP coils
if 'current_weight' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target current_weight', out)
inputs['wp_coils']['target']['current_weight'] = Weight(0) # Weight on WP maximum current penalty
if 'WP_maxZ_threshold' not in inputs['wp_coils']['target'].keys():
out = logprint('Setting default value for wp_coils target WP_maxZ_threshold', out)
inputs['wp_coils']['target']['WP_maxZ_threshold'] = 0.75
if 'WP_maxZ_weight' not in inputs['cnt_coils']['target'].keys():
out = logprint('Setting default value for cnt_coils target WP_maxZ_weight', out)
inputs['wp_coils']['target']['WP_maxZ_weight'] = Weight(0)
# NUMERICS
if 'numerics' not in inputs.keys():
inputs['numerics'] = dict()
if 'weight_iteration_factor' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics weight_iteration_factor', out)
inputs['numerics']['weight_iteration_factor'] = 2 # NUmber of iteration for initial stage two optimization
if 'weight_margin' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics weight_margin', out)
inputs['numerics']['weight_margin'] = 0.1 # NUmber of iteration for initial stage two optimization
if 'MAXITER_weight_iteration_stage_II' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics MAXITER_weight_iteration_stage_II', out)
inputs['numerics']['MAXITER_weight_iteration_stage_II'] = 100 # NUmber of iteration for initial stage two optimization
if 'MAXITER_weight_iteration_single_stage' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics MAXITER_weight_iteration_single_stage', out)
inputs['numerics']['MAXITER_weight_iteration_single_stage'] = 20 # NUmber of iteration for initial stage two optimization
if 'number_weight_iteration_stage_II' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics number_weight_iteration_stage_II', out)
inputs['numerics']['number_weight_iteration_stage_II'] = 100 # NUmber of iteration for initial stage two optimization
if 'number_weight_iteration_single_stage' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics number_weight_iteration_single_stage', out)
inputs['numerics']['number_weight_iteration_single_stage'] = 0 # NUmber of iteration for initial stage two optimization
if 'MAXITER_stage_2' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics MAXITER_stage_2', out)
inputs['numerics']['MAXITER_stage_2'] = 10 # NUmber of iteration for initial stage two optimization
if 'MAXITER_single_stage' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics MAXITER_single_stage', out)
inputs['numerics']['MAXITER_single_stage'] = 10 # NUmber of iteration for combined optimization
if 'fndiff_method' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics fndiff_method', out)
inputs['numerics']['fndiff_method'] = "forward"
if 'finite_difference_abs_step' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics finite_difference_abs_step', out)
inputs['numerics']['finite_difference_abs_step'] = 0
if 'finite_difference_rel_step' not in inputs['numerics'].keys():
out = logprint('Setting default value for numerics finite_difference_rel_step', out)
inputs['numerics']['finite_difference_rel_step'] = 1E-5
if 'JACOBIAN_THRESHOLD' not in inputs['numerics'].keys():
logprint('Setting default value for numerics JACOBIAN_THRESHOLD', out)
inputs['numerics']['JACOBIAN_THRESHOLD'] = 100
if 'algorithm' not in inputs['numerics'].keys():
logprint('Setting default value for numerics algorithm', out)
inputs['numerics']['algorithm'] = 'BFGS'
if 'taylor_test' not in inputs['numerics'].keys():
logprint('Setting default value for numerics taylor_test', out)
inputs['numerics']['taylor_test'] = False
return out