Skip to content

Commit

Permalink
Add 'damped' as the default value for convergence_strategy in the sch…
Browse files Browse the repository at this point in the history
…ema.
  • Loading branch information
ftsamis committed Jun 2, 2016
1 parent 001abe7 commit d59c357
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 1 addition & 14 deletions tardis/io/config_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,20 +1013,7 @@ def from_config_dict(cls, config_dict, atom_data=None, test_parser=False,
montecarlo_section['last_no_of_packets'] = \
montecarlo_section['no_of_packets']

default_convergence_section = {'type': 'damped',
'lock_t_inner_cycles': 1,
't_inner_update_exponent': -0.5,
'damping_constant': 0.5}



if 'convergence_stragegy' not in montecarlo_section:
logger.warning('No convergence criteria selected - '
'just damping by 0.5 for w, t_rad and t_inner')
montecarlo_section['convergence_strategy'] = (
parse_convergence_section(default_convergence_section))
else:
montecarlo_section['convergence_strategy'] = (
montecarlo_section['convergence_strategy'] = (
parse_convergence_section(
montecarlo_section['convergence_strategy']))

Expand Down
2 changes: 2 additions & 0 deletions tardis/io/schemas/montecarlo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ properties:
oneOf:
- $ref: '#/definitions/convergence_strategy/damped'
- $ref: '#/definitions/convergence_strategy/specific'
default:
'type': 'damped'
required:
- no_of_packets
- iterations
Expand Down

0 comments on commit d59c357

Please sign in to comment.