Changeset 112
- Timestamp:
- 08/31/11 01:40:16 (21 months ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
-
read_abinit5.c (modified) (3 diffs)
-
read_abinit_header.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_abinit5.c
r109 r112 53 53 HANDLE_FUNC_ERROR (read_abinit_header(fp, psp_data, pspcod, rchrg, fchrg)) 54 54 55 /// make core charge if needed 55 56 if (rchrg > 0.0) { 56 57 psp_data->has_nlcc = 1; … … 58 59 } 59 60 61 /// read in 60 62 /**< read in psp code and xc code*/ 61 63 if(fgets(line, MAX_STRLEN, fp) == NULL) { … … 63 65 } 64 66 narg = sscanf (line, "%d %d %d %d %d", &pspcod, &pspxc, &(psp_data->l_max), &idum, &((psp_data->mesh)->np) ); 65 ///check narg is equal to 567 PSPIO_ASSERT(narg==5, PSPIO_EIO) 66 68 67 69 return PSPIO_SUCCESS; -
trunk/src/read_abinit_header.c
r108 r112 66 66 } 67 67 narg = sscanf (line, "%lf %lf %d", &(psp_data->z), &(psp_data->zvalence), &idum); 68 ///check narg is equal to 268 PSPIO_ASSERT(narg==2, PSPIO_EIO) 69 69 70 70 /**< read in psp code and xc code*/ … … 73 73 } 74 74 narg = sscanf (line, "%d %d %d %d %d", &pspcod, &pspxc, &(psp_data->l_max), &(psp_data->l_local), &np); 75 ///check narg is equal to 5 75 PSPIO_ASSERT(narg==5, PSPIO_EIO) 76 76 77 77 78 HANDLE_FUNC_ERROR(pspio_mesh_alloc(psp_data->mesh, np)) … … 93 94 break; 94 95 default: 96 HANDLE_FUNC_ERROR(pspio_mesh_free(psp_data->mesh)) 95 97 HANDLE_ERROR(PSPIO_EVALUE) 96 98 } 97 99 98 100 99 HANDLE_FUNC_ERROR( ab2libxc(pspxc,psp_data) ) 101 ierr = ab2libxc(pspxc,psp_data); 102 if (ierr){ 103 HANDLE_FUNC_ERROR(pspio_mesh_free(psp_data->mesh)) 104 HANDLE_ERROR(ierr) 105 } 100 106 101 107 /// if we have a NLCC data line to read … … 105 111 /**< read in NLCC parameters */ 106 112 if(fgets(line, MAX_STRLEN, fp) == NULL) { 113 HANDLE_FUNC_ERROR(pspio_mesh_free(psp_data->mesh)) 107 114 HANDLE_ERROR(PSPIO_EIO) 108 115 } 109 116 narg = sscanf (line, "%lf %lf %lf", &rchrg, &fchrg, &qchrg); 110 ///check narg is equal to 3117 PSPIO_ASSERT(narg==3, PSPIO_EIO) 111 118 } 112 119
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/libpspio/chrome/site/your_project_logo.png)