Changeset 183
- Timestamp:
- 09/01/11 19:29:04 (22 months ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
-
pspio_pspdata.c (modified) (1 diff)
-
pspio_pspdata.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/pspio_pspdata.c
r180 r183 137 137 **********************************************************************/ 138 138 139 int pspio_pspdata_potential_get(const pspio_pspdata_t *data, const int n,140 const int l, constdouble j, const double r, double *value) {141 ASSERT(data != NULL, PSPIO_ERROR) 142 ASSERT(value != NULL, PSPIO_ERROR) 143 ASSERT(( n >= 0) && (l >=0) &&144 ((j == 0) || (abs(j - (double)l) - 0.5 < 10e-9)), PSPIO_ERROR) 139 int pspio_pspdata_potential_get(const pspio_pspdata_t *data, const int l, 140 const double j, const double r, double *value) { 141 ASSERT(data != NULL, PSPIO_ERROR); 142 ASSERT(value != NULL, PSPIO_ERROR); 143 ASSERT((l >=0) && 144 ((j == 0) || (abs(j - (double)l) - 0.5 < 10e-9)), PSPIO_ERROR); 145 145 146 HANDLE_FUNC_ERROR(pspio_meshfunc_eval(data->potentials[l+(int)j]->v,r,value)) 146 HANDLE_FUNC_ERROR(pspio_meshfunc_eval(data->potentials[l+(int)j]->v,r,value)); 147 147 148 148 return PSPIO_SUCCESS; 149 149 } 150 151 152 int pspio_pspdata_kbprojector_get(const pspio_pspdata_t *data, const int l, 153 const double j, const double r, double *value) { 154 ASSERT(data != NULL, PSPIO_ERROR); 155 ASSERT(value != NULL, PSPIO_ERROR); 156 ASSERT( (l >=0) && 157 ((j == 0) || (abs(j - (double)l) - 0.5 < 10e-9)), PSPIO_ERROR); 158 159 HANDLE_FUNC_ERROR(pspio_meshfunc_eval(data->kb_projectors[l+(int)j]->proj,r,value)); 160 161 return PSPIO_SUCCESS; 162 } -
trunk/src/pspio_pspdata.h
r180 r183 97 97 98 98 // The states 99 int n_states; /**< number of electronic states */ 99 int **qn_to_istate; /**< table giving the position of the state from the quantum numbers */ 100 int n_states; /**< number of electronic states */ 100 101 pspio_state_t **states; /**< struct with electronic states */ 101 102 … … 153 154 * radius and angular momenta. 154 155 * @param[in] psp_data: pointer to psp_data structure to be probed 155 * @param[in] n: quantum number156 156 * @param[in] l: angular momentum 157 157 * @param[in] j: total angular momentum … … 162 162 * keep performance in mind when tweaking it. 163 163 */ 164 int pspio_pspdata_potential_get(const pspio_pspdata_t *data, const int n, 165 const int l, const double j, const double r, double *value); 164 int pspio_pspdata_potential_get(const pspio_pspdata_t *data, const int l, 165 const double j, const double r, double *value); 166 167 /** 168 * Gets a KB projector associated with the psp_data structure for given 169 * radius and angular momenta. 170 * @param[in] psp_data: pointer to psp_data structure to be probed 171 * @param[in] l: angular momentum 172 * @param[in] j: total angular momentum 173 * @param[in] r: radius 174 * @param[out] value: value of the specified projector at r 175 * @return error code. 176 * @note This routine is called many times when using Libpspio. Please 177 * keep performance in mind when tweaking it. 178 */ 179 int pspio_pspdata_kbprojector_get(const pspio_pspdata_t *data, const int l, 180 const double j, const double r, double *value); 166 181 167 182 #endif
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)