00001 00049 #ifndef _VCLIST_H_ 00050 #define _VCLIST_H_ 00051 00052 /* Generic headers */ 00053 #include "maloc/maloc.h" 00054 #include "apbs/vhal.h" 00055 00056 /* Headers specific to this file */ 00057 #include "apbs/valist.h" 00058 #include "apbs/vatom.h" 00059 #include "apbs/vunit.h" 00060 00066 enum eVclist_DomainMode { 00067 CLIST_AUTO_DOMAIN, 00069 CLIST_MANUAL_DOMAIN 00071 }; 00072 00078 typedef enum eVclist_DomainMode Vclist_DomainMode; 00079 00085 struct sVclistCell { 00086 Vatom **atoms; 00087 int natoms; 00088 }; 00089 00094 typedef struct sVclistCell VclistCell; 00095 00101 struct sVclist { 00102 00103 Vmem *vmem; 00104 Valist *alist; 00105 Vclist_DomainMode mode; 00106 int npts[VAPBS_DIM]; 00107 int n; 00108 double max_radius; 00109 VclistCell *cells; 00110 double lower_corner[VAPBS_DIM]; 00111 double upper_corner[VAPBS_DIM]; 00112 double spacs[VAPBS_DIM]; 00114 }; 00115 00120 typedef struct sVclist Vclist; 00121 00122 #if !defined(VINLINE_VCLIST) 00123 00129 unsigned long int Vclist_memChk( 00130 Vclist *thee 00131 ); 00132 00140 double Vclist_maxRadius( 00141 Vclist *thee 00142 ); 00143 00144 #else /* if defined(VINLINE_VCLIST) */ 00145 00146 # define Vclist_memChk(thee) (Vmem_bytes((thee)->vmem)) 00147 # define Vclist_maxRadius(thee) ((thee)->max_radius) 00148 00149 #endif /* if !defined(VINLINE_VCLIST) */ 00150 00151 /* /////////////////////////////////////////////////////////////////////////// 00152 // Class Vclist: Non-Inlineable methods (vclist.c) 00154 00159 Vclist* Vclist_ctor( 00160 Valist *alist, 00161 double max_radius, 00162 int npts[VAPBS_DIM], 00164 Vclist_DomainMode mode, 00165 double lower_corner[VAPBS_DIM], 00168 double upper_corner[VAPBS_DIM] 00171 ); 00172 00177 int Vclist_ctor2( 00178 Vclist *thee, 00179 Valist *alist, 00180 double max_radius, 00181 int npts[VAPBS_DIM], 00183 Vclist_DomainMode mode, 00184 double lower_corner[VAPBS_DIM], 00187 double upper_corner[VAPBS_DIM] 00190 ); 00191 00196 void Vclist_dtor( 00197 Vclist **thee 00198 ); 00199 00204 void Vclist_dtor2( 00205 Vclist *thee 00206 ); 00207 00215 VclistCell* Vclist_getCell( 00216 Vclist *thee, 00217 double position[VAPBS_DIM] 00218 ); 00219 00226 VclistCell* VclistCell_ctor( 00227 int natoms 00228 ); 00229 00236 int VclistCell_ctor2( 00237 VclistCell *thee, 00238 int natoms 00239 ); 00240 00245 void VclistCell_dtor( 00246 VclistCell **thee 00247 ); 00248 00253 void VclistCell_dtor2( 00254 VclistCell *thee 00255 ); 00256 00257 #endif /* ifndef _VCLIST_H_ */ 00258