parameter_sweep.loop_tool.loop_tool

Module Contents

Classes

loopTool

Functions

get_working_dir()

parameter_sweep.loop_tool.loop_tool.get_working_dir()
class parameter_sweep.loop_tool.loop_tool.loopTool(loop_file, solver=None, build_function=None, initialize_function=None, optimize_function=None, build_outputs=None, number_of_subprocesses=None, parallel_back_end='MultiProcessing', probe_function=None, save_name=None, saving_dir=None, execute_simulations=True, custom_do_param_sweep=None, custom_do_param_sweep_kwargs=None, h5_backup=None)
h5_backup_location

supported keys for yaml config file. please update as new options are added

build_run_dict()

This builds the dict that will be used for simulatiuons

check_dict_keys(test_dict)

used to test supported key in provided .yaml file

check_loop_keys(loop_keys)

tests loop keys

run_simulations()

runs the simulations created in build_run_dict

run_model_test()

function to run a single test, with out param sweep

get_loop_type(loop)

containst types of loop options that are extracted from yaml file build_loop - options that are passed into build function init_loop - options that are passed into initialization function optimize_loop - options that are passed into optimize function sweep_param_loop - this will creates the paramters that should be sweeped over diff_param_loop - parmaters for differential sweeps

get_loop_key(loop, loop_type)

function for finding loop type

build_sweep_directories(loop, loop_type, sweep_directory, cur_dir, cur_h5_dir)

this creats the loop directory dict, which is then used to run the paramter sweep

update_dir_path(cur_dir, key, value)

creates directory pathing for h5 file strucutre

update_sim_options(loop_type, loop_key, loop_value, loop)

used to update simulation options for each specific loop

get_loop_params(key, loop_value, loop)
get_diff_params(key, loop_value)

creates dict for differntial sweep -creates dict for diff_spec, these are differnetial samples that would be sampled for each reference design -creaste sweep_reference-dict which will contain paramters that will be sweeped over to generate reference values

get_num_samples(value_dict)
get_sweep_params(key, loop_value)
init_sim_options()

resets simulations options

execute_sweep(sweep_directory)

runs through sweep directory and execute each simulation unless in test mode, in which only try build, init, and solve

execute_param_sweep_run(value)

this executes the parameter sweep if no data exists in the back upfile, or user forces exceution this defined by check solution exists function

setup_param_sweep(value)

set up variables before a sweep run with parmater sweep tool, resets any of prior options

build_sim_kwargs()

here we build all the kwargs option first loading defaults provided by default calls, followed by those in the loops, overriding any defaults or adding new options to kwargs

check_solution_exists()

check if solution exists, ensuring to use only rank 0 if user running MPI, otherwise do direct solution check

run_parameter_sweep()

setup and run paramer sweep

run_diff_parameter_sweep()

setup and run diff paramer sweep fix once the diff paramter tool is updated to new version.