scalar newton_F_0(RealFunction* fv, RefMap* rv) { return int_u_v(&xiter, fv, xiter.get_refmap(), rv) / TAU - int_u_v(&xprev, fv, xprev.get_refmap(), rv) / TAU + int_grad_u_grad_v_II(&xiter, fv, xiter.get_refmap(), rv) / RE // The 'II' version of int_grad_u_grad_v() // does exactly the same as the original function, but it assumes that the first argument is a Solution. // This inconsistency has historical reasons and we are going to eliminate it soon. + int_w_nabla_u_v_II(&xiter, &yiter, &xiter, fv, xiter.get_refmap(), rv) - int_u_dvdx(&piter, fv, piter.get_refmap(), rv); }
scalar newton_F_1(RealFunction* fv, RefMap* rv) { return int_u_v(&yiter, fv, yiter.get_refmap(), rv) / TAU - int_u_v(&yprev, fv, yprev.get_refmap(), rv) / TAU + int_grad_u_grad_v_II(&yiter, fv, yiter.get_refmap(), rv) / RE + int_w_nabla_u_v_II(&xiter, &yiter, &yiter, fv, yiter.get_refmap(), rv) - int_u_dvdy(&piter, fv, piter.get_refmap(), rv); }
// bilinear and linear forms corresponding to simple linearization // of convective term scalar bilinear_form_sym_0_0_1_1(RealFunction* fu, RealFunction* fv, RefMap* ru, RefMap* rv) { return int_grad_u_grad_v(fu, fv, ru, rv) / RE + int_u_v(fu, fv, ru, rv) / TAU; }
scalar simple_linear_form_1(RealFunction* fv, RefMap* rv) { return int_u_v(&yprev, fv, yprev.get_refmap(), rv) / TAU; }
scalar linear_form_0(RealFunction* fv, RefMap* rv) { return int_u_v(&xprev, fv, xprev.get_refmap(), rv) / TAU; }