00001 00072 #ifndef _VCLIST_H_ 00073 #define _VCLIST_H_ 00074 00075 /* Generic headers */ 00076 #include "maloc/maloc.h" 00077 #include "apbs/vhal.h" 00078 00079 /* Headers specific to this file */ 00080 #include "apbs/valist.h" 00081 #include "apbs/vatom.h" 00082 #include "apbs/vunit.h" 00083 00089 enum eVclist_DomainMode { 00090 CLIST_AUTO_DOMAIN, 00092 CLIST_MANUAL_DOMAIN 00094 }; 00095 00101 typedef enum eVclist_DomainMode Vclist_DomainMode; 00102 00108 struct sVclistCell { 00109 Vatom **atoms; 00110 int natoms; 00111 }; 00112 00117 typedef struct sVclistCell VclistCell; 00118 00124 struct sVclist { 00125 00126 Vmem *vmem; 00127 Valist *alist; 00128 Vclist_DomainMode mode; 00129 int npts[VAPBS_DIM]; 00130 int n; 00131 double max_radius; 00132 VclistCell *cells; 00133 double lower_corner[VAPBS_DIM]; 00134 double upper_corner[VAPBS_DIM]; 00135 double spacs[VAPBS_DIM]; 00137 }; 00138 00143 typedef struct sVclist Vclist; 00144 00145 #if !defined(VINLINE_VCLIST) 00146 00152 unsigned long int Vclist_memChk( 00153 Vclist *thee 00154 ); 00155 00163 double Vclist_maxRadius( 00164 Vclist *thee 00165 ); 00166 00167 #else /* if defined(VINLINE_VCLIST) */ 00168 00169 # define Vclist_memChk(thee) (Vmem_bytes((thee)->vmem)) 00170 # define Vclist_maxRadius(thee) ((thee)->max_radius) 00171 00172 #endif /* if !defined(VINLINE_VCLIST) */ 00173 00174 /* /////////////////////////////////////////////////////////////////////////// 00175 // Class Vclist: Non-Inlineable methods (vclist.c) 00177 00182 Vclist* Vclist_ctor( 00183 Valist *alist, 00184 double max_radius, 00185 int npts[VAPBS_DIM], 00187 Vclist_DomainMode mode, 00188 double lower_corner[VAPBS_DIM], 00191 double upper_corner[VAPBS_DIM] 00194 ); 00195 00200 int Vclist_ctor2( 00201 Vclist *thee, 00202 Valist *alist, 00203 double max_radius, 00204 int npts[VAPBS_DIM], 00206 Vclist_DomainMode mode, 00207 double lower_corner[VAPBS_DIM], 00210 double upper_corner[VAPBS_DIM] 00213 ); 00214 00219 void Vclist_dtor( 00220 Vclist **thee 00221 ); 00222 00227 void Vclist_dtor2( 00228 Vclist *thee 00229 ); 00230 00238 VclistCell* Vclist_getCell( 00239 Vclist *thee, 00240 double position[VAPBS_DIM] 00241 ); 00242 00249 VclistCell* VclistCell_ctor( 00250 int natoms 00251 ); 00252 00259 int VclistCell_ctor2( 00260 VclistCell *thee, 00261 int natoms 00262 ); 00263 00268 void VclistCell_dtor( 00269 VclistCell **thee 00270 ); 00271 00276 void VclistCell_dtor2( 00277 VclistCell *thee 00278 ); 00279 00280 #endif /* ifndef _VCLIST_H_ */ 00281