Closed vsoch closed 4 years ago
Here is a dummy example:
schrodinger.Schrodinger:
- grid:
x:
list: [[1, 2, 3], [1, 2, 3]]
V_x:
func:
- name: schrodinger_helpers.generate_V_x
args:
param1: ...
param2: ...
I think the nested params would be in the grid format as well, so we'd want to add a "value" index in case a grid isn't needed but just to set a single value.
More work on this last night, I think a testing file should have another level of "grids" to go alongside "tests" that can essentially be piped into a test section. For example:
schrodinger:
filename: /home/vanessa/Desktop/Code/pySchrodinger/schrodinger.py
grids: # each value evaluated to a list of terms
yourlist:
grid:
name:
list: [1, 2, 3]
min: 10
max: 20
say_hello:
func: schrodinger_helpers.say_hello
args:
name: Vanessa
generate_V_x:
func: schrodinger_helpers.generate_V_x
grid:
x:
min:
max:
one:
value: 1.0
# gridtest add function generate_V_x
generate_V_x_2:
name: schrodinger_helpers.generate_V_x
grid:
V_x:
function: generate_V_x_1
args:
x: 1.0
one: 1.0
tests:
Schrodinger.solve:
- grid:
V_x:
setup: generate_V_x_2
list: [1, 2, 3]
name: mylist
args:
x: 1.0
one: 1.0
Schrodinger.solve:
- args:
Nsteps: 0.001
dt: 1
eps: 1000
max_iter: null
result: 10
I'm not sure what to call the reference to a grid, a double grid seems redundant.
For example, see the animate functions here that use smaller functions to generate input arrays. We should be able to specify that.