use crate::beta_functions::{eichhorn_beta_system, linearized_beta, BetaSystem}; use crate::coupling_space::{gravitational_fixed_point, CouplingPoint}; pub fn rk4_step(system: BetaSystem, step: f64, point: CouplingPoint) -> CouplingPoint { let k1 = linearized_beta(system, point); let k2 = linearized_beta(system, point.add(k1.scale(step / 2.0))); let k3 = linearized_beta(system, point.add(k2.scale(step / 2.0))); let k4 = linearized_beta(system, point.add(k3.scale(step))); let weighted = k1 .add(k2.scale(2.0)) .add(k3.scale(2.0)) .add(k4); point.add(weighted.scale(step / 6.0)) } pub fn demo_portal_coupling() -> f64 { let system = eichhorn_beta_system(); let mut start = gravitational_fixed_point(system.truncation); start.portal_coupling = 0.08; start.top_yukawa = 0.05; start.higgs_quartic = 0.02; rk4_step(system, 0.08333333333333333, start).portal_coupling }