28 #ifndef _DFT_COMMON_H_
29 #define _DFT_COMMON_H_
35 #define EXTERN_C extern "C"
93 virtual void getAtom(
int icent,
int *cnt,
real (*coor)[3],
94 int *
charge,
int *mult)
const;
98 int *nblcnt,
int (*iblcks)[2])
const;
101 int *nblcnt,
int (*iblcks)[2])
const;
102 virtual void getExps(
int *maxl,
int **nucbas,
real (**aa)[2])
const;
107 int *norbbl,
int (*orbblock)[2],
116 #define dal_new(sz,tp) (tp*)dal_malloc_((sz)*sizeof(tp),__FUNCTION__, __LINE__)
117 void*
dal_malloc_(
size_t sz,
const char *func,
unsigned line);
119 #define dal_malloc(sz) dal_malloc_((sz),__FUNCTION__, __LINE__)
145 printf(
"B:(%8.2f %8.2f %8.2f)-(%8.2f %8.2f %8.2f): %8.2f %8.2f %8.2f ",
149 for(
int i=0; i<3; i++)
150 if(p[i]<
lo[i] || p[i] >=
hi[i]) {
162 template<
typename Iterator>
167 throw "BoundingBox called for empty set";
169 real r = start->radius() + OFF;
170 for(
int i=0; i<3; i++) {
171 box.
lo[i] = start->center[i]-r;
172 box.
hi[i] = start->center[i]+r;
175 for(++start; start != end; ++start) {
176 real r = start->radius() + OFF;
177 for(
int i=0; i<3; i++) {
178 real l = start->center[i]-r;
if (l<box.
lo[i]) box.
lo[i] = l;
179 real h = start->center[i]+r;
if (h>box.
hi[i]) box.
hi[i] = h;