From: Wolfgang Bangerth Date: Sun, 14 Mar 2021 14:14:43 +0000 (+0100) Subject: Use better function names. X-Git-Tag: v9.3.0-rc1~292^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e255821bf9c3aae2ea2d3b26674072db95d2e4ca;p=dealii.git Use better function names. --- diff --git a/source/sundials/kinsol.cc b/source/sundials/kinsol.cc index 28a8a3ea17..0c27dc2369 100644 --- a/source/sundials/kinsol.cc +++ b/source/sundials/kinsol.cc @@ -131,7 +131,7 @@ namespace SUNDIALS { template int - t_kinsol_function(N_Vector yy, N_Vector FF, void *user_data) + residual_or_iteration_callback(N_Vector yy, N_Vector FF, void *user_data) { KINSOL &solver = *static_cast *>(user_data); @@ -163,7 +163,7 @@ namespace SUNDIALS # if DEAL_II_SUNDIALS_VERSION_LT(5, 0, 0) template int - t_kinsol_setup_jacobian(KINMem kinsol_mem) + setup_jacobian_callback(KINMem kinsol_mem) { KINSOL &solver = *static_cast *>(kinsol_mem->kin_user_data); @@ -186,11 +186,11 @@ namespace SUNDIALS template int - t_kinsol_solve_jacobian(KINMem kinsol_mem, - N_Vector x, - N_Vector b, - realtype *sJpnorm, - realtype *sFdotJp) + solve_with_jacobian_callback(KINMem kinsol_mem, + N_Vector x, + N_Vector b, + realtype *sJpnorm, + realtype *sFdotJp) { KINSOL &solver = *static_cast *>(kinsol_mem->kin_user_data); @@ -228,7 +228,7 @@ namespace SUNDIALS template int - t_kinsol_setup_jacobian(N_Vector u, + setup_jacobian_callback(N_Vector u, N_Vector f, SUNMatrix /* ignored */, void *user_data, @@ -262,11 +262,11 @@ namespace SUNDIALS template int - t_kinsol_solve_jacobian(SUNLinearSolver LS, - SUNMatrix /*ignored*/, - N_Vector x, - N_Vector b, - realtype /*tol*/) + solve_with_jacobian_callback(SUNLinearSolver LS, + SUNMatrix /*ignored*/, + N_Vector x, + N_Vector b, + realtype /*tol*/) { // Receive the object that describes the linear solver and // unpack the pointer to the KINSOL object from which we can then @@ -390,7 +390,8 @@ namespace SUNDIALS kinsol_mem = KINCreate(); - int status = KINInit(kinsol_mem, t_kinsol_function, solution); + int status = + KINInit(kinsol_mem, residual_or_iteration_callback, solution); (void)status; AssertKINSOL(status); @@ -432,10 +433,10 @@ namespace SUNDIALS { # if DEAL_II_SUNDIALS_VERSION_LT(5, 0, 0) auto KIN_mem = static_cast(kinsol_mem); - KIN_mem->kin_lsolve = t_kinsol_solve_jacobian; + KIN_mem->kin_lsolve = solve_with_jacobian_callback; if (setup_jacobian) // user assigned a function object to the Jacobian // set-up slot - KIN_mem->kin_lsetup = t_kinsol_setup_jacobian; + KIN_mem->kin_lsetup = setup_jacobian_callback; # else // Set the operations we care for in the sun_linear_solver object // and attach it to the KINSOL object. The functions that will get @@ -465,7 +466,7 @@ namespace SUNDIALS return 0; }; - LS->ops->solve = t_kinsol_solve_jacobian; + LS->ops->solve = solve_with_jacobian_callback; // Even though we don't use it, KINSOL still wants us to set some // kind of matrix object for the nonlinear solver. This is because @@ -503,7 +504,7 @@ namespace SUNDIALS if (setup_jacobian) { status = - KINSetJacFn(kinsol_mem, &t_kinsol_setup_jacobian); + KINSetJacFn(kinsol_mem, &setup_jacobian_callback); AssertKINSOL(status); } # endif