update solver_template.cpp