1 /*
2  Copyright (C) 2006-2007 M.A.L. Marques
3 
4  This Source Code Form is subject to the terms of the Mozilla Public
5  License, v. 2.0. If a copy of the MPL was not distributed with this
6  file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8 
9 #include "util.h"
10 
11 #define XC_GGA_K_OL2          513 /* Ou-Yang and Levy v.2 */
12 
13 typedef struct{
14   double aa, bb, cc;
15 } gga_k_ol2_params;
16 
17 static void
gga_k_ol2_init(xc_func_type * p)18 gga_k_ol2_init(xc_func_type *p)
19 {
20   gga_k_ol2_params *params;
21 
22   assert(p!=NULL && p->params == NULL);
23   p->params = libxc_malloc(sizeof(gga_k_ol2_params));
24   params = (gga_k_ol2_params *) (p->params);
25 
26   switch(p->info->number){
27   case XC_GGA_K_OL2:
28     params->aa = 1.0;
29     params->bb = 1.0/K_FACTOR_C;
30     params->cc = 0.00887/K_FACTOR_C;
31     break;
32   }
33 }
34 
35 #include "decl_gga.h"
36 #include "maple2c/gga_exc/gga_k_ol2.c"
37 #include "work_gga.c"
38 
39 #ifdef __cplusplus
40 extern "C"
41 #endif
42 const xc_func_info_type xc_func_info_gga_k_ol2 = {
43   XC_GGA_K_OL2,
44   XC_KINETIC,
45   "Ou-Yang and Levy v.2",
46   XC_FAMILY_GGA,
47   {&xc_ref_OuYang1991_379, NULL, NULL, NULL, NULL},
48   XC_FLAGS_3D | MAPLE2C_FLAGS,
49   5e-26,
50   {0, NULL, NULL, NULL, NULL},
51   gga_k_ol2_init, NULL,
52   NULL, work_gga, NULL
53 };
54