RadCluster
Graph-based cluster dynamics for irradiated materials
Loading...
Searching...
No Matches
Functions | Variables
benchmark_woodbury Namespace Reference

Functions

 make_config (prec_type, t_end)
 
 create_sim (i_mob, v_mob)
 
 run_case (label, i_mob, v_mob, prec_type, t_end)
 

Variables

 MODULE_ROOT = Path(__file__).resolve().parent.parent.parent
 
 REPO_ROOT = MODULE_ROOT.parent
 
str build_dir = MODULE_ROOT / 'build'
 
 exist_ok
 
str cmake_src = MODULE_ROOT / 'cpp_utils'
 
 flush
 
 res = subprocess.run(cmd, capture_output=True, text=True)
 
int I = 10_000
 
int V = 10_000
 
dict BASE_OVERRIDES
 
list all_results = []
 
str tag = f"t={t_end:.0e}"
 
str sw = f"{r.get('swelling',0):.5f}" if 'swelling' in r else 'FAIL'
 
str dfp = f"{r.get('delta_FP',0):.1e}" if 'delta_FP' in r else 'FAIL'
 
list wood = [r for r in all_results if r['i_mobile']==im and r['prec_type']==1 and r['t_end']==t_end]
 
list jac = [r for r in all_results if r['i_mobile']==im and r['prec_type']==0 and r['t_end']==t_end]
 
list ratio = jac[0]['wall_time'] / wood[0]['wall_time']
 
list mono = [r for r in all_results if r['i_mobile']==1 and r['prec_type']==pt and r['t_end']==t_end]
 
list coal = [r for r in all_results if r['i_mobile']==10 and r['prec_type']==pt and r['t_end']==t_end]
 

Detailed Description

benchmark_woodbury.py — Benchmark Woodbury vs Jacobi preconditioner.

Uses a SHORT time span (t=1e-6 to 0.1) to isolate the preconditioner
effect from the physics stiffness at later times. All 4 cases complete
in under a minute each.

Function Documentation

◆ create_sim()

benchmark_woodbury.create_sim (   i_mob,
  v_mob 
)

Definition at line 79 of file benchmark_woodbury.py.

◆ make_config()

benchmark_woodbury.make_config (   prec_type,
  t_end 
)

Definition at line 63 of file benchmark_woodbury.py.

◆ run_case()

benchmark_woodbury.run_case (   label,
  i_mob,
  v_mob,
  prec_type,
  t_end 
)

Definition at line 111 of file benchmark_woodbury.py.

Variable Documentation

◆ all_results

list benchmark_woodbury.all_results = []

Definition at line 144 of file benchmark_woodbury.py.

◆ BASE_OVERRIDES

dict benchmark_woodbury.BASE_OVERRIDES
Initial value:
1= {
2 'eta': 0.3, 'f_cl_i': 0.0, 'f_cl_v': 0.5,
3 'E_m_1D': 0.4, 'L_hat': 71.8,
4 'c_C': 1.94e-4, 'E_b_C_SIA': 0.65,
5 'rho_d': 1e16, 'Z_i': 1.05, 'Z_ii': 5,
6 'i_discrete': I, 'v_discrete': V,
7 'I_bin': 0, 'V_bin': 0,
8 'shape_function': 'linear',
9}

Definition at line 52 of file benchmark_woodbury.py.

◆ build_dir

str benchmark_woodbury.build_dir = MODULE_ROOT / 'build'

Definition at line 20 of file benchmark_woodbury.py.

◆ cmake_src

str benchmark_woodbury.cmake_src = MODULE_ROOT / 'cpp_utils'

Definition at line 22 of file benchmark_woodbury.py.

◆ coal

list benchmark_woodbury.coal = [r for r in all_results if r['i_mobile']==10 and r['prec_type']==pt and r['t_end']==t_end]

Definition at line 183 of file benchmark_woodbury.py.

◆ dfp

str benchmark_woodbury.dfp = f"{r.get('delta_FP',0):.1e}" if 'delta_FP' in r else 'FAIL'

Definition at line 164 of file benchmark_woodbury.py.

◆ exist_ok

benchmark_woodbury.exist_ok

Definition at line 21 of file benchmark_woodbury.py.

◆ flush

benchmark_woodbury.flush

Definition at line 23 of file benchmark_woodbury.py.

◆ I

int benchmark_woodbury.I = 10_000

Definition at line 49 of file benchmark_woodbury.py.

◆ jac

list benchmark_woodbury.jac = [r for r in all_results if r['i_mobile']==im and r['prec_type']==0 and r['t_end']==t_end]

Definition at line 173 of file benchmark_woodbury.py.

◆ MODULE_ROOT

benchmark_woodbury.MODULE_ROOT = Path(__file__).resolve().parent.parent.parent

Definition at line 13 of file benchmark_woodbury.py.

◆ mono

list benchmark_woodbury.mono = [r for r in all_results if r['i_mobile']==1 and r['prec_type']==pt and r['t_end']==t_end]

Definition at line 182 of file benchmark_woodbury.py.

◆ ratio

list benchmark_woodbury.ratio = jac[0]['wall_time'] / wood[0]['wall_time']

Definition at line 175 of file benchmark_woodbury.py.

◆ REPO_ROOT

benchmark_woodbury.REPO_ROOT = MODULE_ROOT.parent

Definition at line 14 of file benchmark_woodbury.py.

◆ res

benchmark_woodbury.res = subprocess.run(cmd, capture_output=True, text=True)

Definition at line 28 of file benchmark_woodbury.py.

◆ sw

str benchmark_woodbury.sw = f"{r.get('swelling',0):.5f}" if 'swelling' in r else 'FAIL'

Definition at line 163 of file benchmark_woodbury.py.

◆ tag

str benchmark_woodbury.tag = f"t={t_end:.0e}"

Definition at line 147 of file benchmark_woodbury.py.

◆ V

int benchmark_woodbury.V = 10_000

Definition at line 50 of file benchmark_woodbury.py.

◆ wood

list benchmark_woodbury.wood = [r for r in all_results if r['i_mobile']==im and r['prec_type']==1 and r['t_end']==t_end]

Definition at line 172 of file benchmark_woodbury.py.