/* 
  This file was generated automatically with /nfs/data-012/marques/software/source/libxc/svn/scripts/maple2c.pl.
  Do not edit this file directly as it can be overwritten!!

  This Source Code Form is subject to the terms of the Mozilla Public
  License, v. 2.0. If a copy of the MPL was not distributed with this
  file, You can obtain one at http://mozilla.org/MPL/2.0/.

  Maple version     : Maple 2016 (X86 64 LINUX)
  Maple source      : ../maple/gga_k_ol1.mpl
  Type of functional: work_gga_x
*/

void xc_gga_k_ol1_enhance
  (const xc_func_type *p,  xc_gga_work_x_t *r)
{
  double t1, t2, t5, t9, t11, t12, t13, t14;


  t1 = r->x * r->x;
  t2 = M_CBRT2;
  t5 = t2 * t2;
  t9 = M_CBRT6;
  t11 = 0.31415926535897932385e1 * 0.31415926535897932385e1;
  t12 = cbrt(t11);
  t13 = t12 * t12;
  t14 = 0.1e1 / t13;
  r->f = 0.1e1 + 0.5e1 / 0.9e1 * (t1 * t2 / 0.144e3 + 0.33850000000000000000e-2 * r->x * t5) * t9 * t14;

  if(r->order < 1) return;

  r->dfdx = 0.5e1 / 0.9e1 * (r->x * t2 / 0.72e2 + 0.33850000000000000000e-2 * t5) * t9 * t14;

  if(r->order < 2) return;

  r->d2fdx2 = 0.5e1 / 0.648e3 * t2 * t9 * t14;

  if(r->order < 3) return;

  r->d3fdx3 = 0.0e0;

  if(r->order < 4) return;


}

#define maple2c_order 3
#define maple2c_func  xc_gga_k_ol1_enhance
