Skip to content

Commit

Permalink
Update the test to the new options names.
Browse files Browse the repository at this point in the history
  • Loading branch information
cianwilson committed Jun 21, 2024
1 parent 8ecfae5 commit 4d52a8d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions tests/coupled_bcs/const/main_input
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ strict_L_Conservation = .false.
dTdr_Top = 32.31
T_Bottom = 17.865
couple_dtdr_top = .true.
dTdr_chi_coeff_top(1) = 70.2
dTdr_chi_a_coeff_top(1) = 70.2
couple_tvar_bottom = .true.
T_chi_coeff_bottom(1) = 34.1
T_dchidr_coeff_bottom(1) = -51.87
T_chi_a_coeff_bottom(1) = 34.1
T_dchidr_a_coeff_bottom(1) = -51.87
chi_a_Top(1) = 1.0d0
chi_a_Bottom(1) = 2.0d0
fix_chivar_a_top(1) = .true.
fix_chivar_a_bottom(1) = .true.
chi_a_Top(2) = 1.0342d0
dchidr_a_Bottom(2) = -27.6d0
couple_chivar_a_top(2) = .true.
chi_chi_coeff_top(2,1) = 107.01
chi_dchidr_coeff_top(2,1) = 7.064
chi_a_chi_a_coeff_top(2,1) = 107.01
chi_a_dchidr_a_coeff_top(2,1) = 7.064
couple_dchidr_a_bottom(2) = .true.
dchidr_chi_coeff_bottom(2,1) = 9.872
dchidr_a_chi_a_coeff_bottom(2,1) = 9.872
/
&Initial_Conditions_Namelist
init_type = 8 ! File init
Expand Down
24 changes: 12 additions & 12 deletions tests/coupled_bcs/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ def test_bcs(case):
dchi2dr_rmax = slices.vals[:,:,0,slices.lut[10204],0]

# coefficients input
chi1bc_rmax = float(bcs['chi_a_top(1)'].replace('d', 'e'))
chi1bc_rmin = float(bcs['chi_a_bottom(1)'].replace('d', 'e'))
chi1bc_rmax = float(bcs['chi_a_top(1)'.lower()].replace('d', 'e'))
chi1bc_rmin = float(bcs['chi_a_bottom(1)'.lower()].replace('d', 'e'))

dTdrbc_rmax = float(bcs['dtdr_top'].replace('d', 'e'))
dtdr_chi1_coeff_rmax = float(bcs['dtdr_chi_coeff_top(1)'].replace('d', 'e'))
dTdrbc_rmax = float(bcs['dTdr_top'.lower()].replace('d', 'e'))
dtdr_chi1_coeff_rmax = float(bcs['dTdr_chi_a_coeff_top(1)'.lower()].replace('d', 'e'))

Tbc_rmin = float(bcs['t_bottom'].replace('d', 'e'))
t_chi1_coeff_rmin = float(bcs['t_chi_coeff_bottom(1)'].replace('d', 'e'))
t_dchi1dr_coeff_rmin = float(bcs['t_dchidr_coeff_bottom(1)'].replace('d', 'e'))
Tbc_rmin = float(bcs['T_bottom'.lower()].replace('d', 'e'))
t_chi1_coeff_rmin = float(bcs['T_chi_a_coeff_bottom(1)'.lower()].replace('d', 'e'))
t_dchi1dr_coeff_rmin = float(bcs['T_dchidr_a_coeff_bottom(1)'.lower()].replace('d', 'e'))

chi2bc_rmax = float(bcs['chi_a_top(2)'].replace('d', 'e'))
chi2_chi1_coeff_rmax = float(bcs['chi_chi_coeff_top(2,1)'].replace('d', 'e'))
chi2_dchi1dr_coeff_rmax = float(bcs['chi_dchidr_coeff_top(2,1)'].replace('d', 'e'))
chi2bc_rmax = float(bcs['chi_a_top(2)'.lower()].replace('d', 'e'))
chi2_chi1_coeff_rmax = float(bcs['chi_a_chi_a_coeff_top(2,1)'.lower()].replace('d', 'e'))
chi2_dchi1dr_coeff_rmax = float(bcs['chi_a_dchidr_a_coeff_top(2,1)'.lower()].replace('d', 'e'))

dchi2drbc_rmin = float(bcs['dchidr_a_bottom(2)'].replace('d', 'e'))
dchi2dr_chi1_coeff_rmin = float(bcs['dchidr_chi_coeff_bottom(2,1)'].replace('d', 'e'))
dchi2drbc_rmin = float(bcs['dchidr_a_bottom(2)'.lower()].replace('d', 'e'))
dchi2dr_chi1_coeff_rmin = float(bcs['dchidr_a_chi_a_coeff_bottom(2,1)'.lower()].replace('d', 'e'))

# check if values produced match expected values based on input coefficients
def failed(values, expected, tol=1.e-10):
Expand Down

0 comments on commit 4d52a8d

Please sign in to comment.