The combustion problem – inversion of the parameter function.
The combustion problem – inversion of the parameter function
Float tol = 1e2*numeric_limits<Float>::epsilon();
size_t max_iter = 1000;
Float a_min = up ? ac : 0;
Float a_max = up ? 100 : ac;
for (size_t k = 0; abs(a_max - a_min) > tol; ++k) {
Float a1 = (a_max + a_min)/2;
Float lambda1 = 8*sqr(a1/cosh(a1));
{ a_max = a1; }
else { a_min = a1; }
check_macro (k < max_iter,
"lambda2alpha: max_iter=" << k
<< " reached and err=" << a_max - a_min);
}
return(a_max + a_min)/2;
};
see the Float page for the full documentation
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
Float lambda2alpha(Float lambda, bool up=false)
The combustion problem – the critical parameter value as a function.