std::vector<double> flic_flux(state CLL, state CL, state CR, state CRR, double dx, double dt, double C, int l) { // Returns the FLIC flux at the interface of neighbouring cells with states // CL and CR double TOL = 1.0e-5; double q0 = bound_below(CL.r() - CLL.r(), TOL); double q1 = bound_below(CR.r() - CL.r(), TOL); double q2 = bound_below(CRR.r() - CR.r(), TOL); double rLeft = q0 / q1; double rRight = q2 / q1; double phi = std::min(phi_flic(rLeft,C,l), phi_flic(rRight,C,l)); std::vector<double> FFO = force_flux(CL, CR, dx, dt); std::vector<double> FRI = richtmyer_flux(CL, CR, dx, dt); return FFO + phi * (FRI - FFO); }