00001 00054 #ifndef _VCLIST_H_ 00055 #define _VCLIST_H_ 00056 00057 /* Generic headers */ 00058 #include "maloc/maloc.h" 00059 #include "apbs/vhal.h" 00060 00061 /* Headers specific to this file */ 00062 #include "apbs/valist.h" 00063 #include "apbs/vatom.h" 00064 #include "apbs/vunit.h" 00065 00071 enum eVclist_DomainMode { 00072 CLIST_AUTO_DOMAIN, 00074 CLIST_MANUAL_DOMAIN 00076 }; 00077 00083 typedef enum eVclist_DomainMode Vclist_DomainMode; 00084 00090 struct sVclistCell { 00091 Vatom **atoms; 00092 int natoms; 00093 }; 00094 00099 typedef struct sVclistCell VclistCell; 00100 00106 struct sVclist { 00107 00108 Vmem *vmem; 00109 Valist *alist; 00110 Vclist_DomainMode mode; 00111 int npts[VAPBS_DIM]; 00112 int n; 00113 double max_radius; 00114 VclistCell *cells; 00115 double lower_corner[VAPBS_DIM]; 00116 double upper_corner[VAPBS_DIM]; 00117 double spacs[VAPBS_DIM]; 00119 }; 00120 00125 typedef struct sVclist Vclist; 00126 00127 #if !defined(VINLINE_VCLIST) 00128 00134 VEXTERNC unsigned long int Vclist_memChk( 00135 Vclist *thee 00136 ); 00137 00145 VEXTERNC double Vclist_maxRadius( 00146 Vclist *thee 00147 ); 00148 00149 #else /* if defined(VINLINE_VCLIST) */ 00150 00151 # define Vclist_memChk(thee) (Vmem_bytes((thee)->vmem)) 00152 # define Vclist_maxRadius(thee) ((thee)->max_radius) 00153 00154 #endif /* if !defined(VINLINE_VCLIST) */ 00155 00156 /* /////////////////////////////////////////////////////////////////////////// 00157 // Class Vclist: Non-Inlineable methods (vclist.c) 00159 00164 VEXTERNC Vclist* Vclist_ctor( 00165 Valist *alist, 00166 double max_radius, 00167 int npts[VAPBS_DIM], 00169 Vclist_DomainMode mode, 00170 double lower_corner[VAPBS_DIM], 00173 double upper_corner[VAPBS_DIM] 00176 ); 00177 00182 VEXTERNC Vrc_Codes Vclist_ctor2( 00183 Vclist *thee, 00184 Valist *alist, 00185 double max_radius, 00186 int npts[VAPBS_DIM], 00188 Vclist_DomainMode mode, 00189 double lower_corner[VAPBS_DIM], 00192 double upper_corner[VAPBS_DIM] 00195 ); 00196 00201 VEXTERNC void Vclist_dtor( 00202 Vclist **thee 00203 ); 00204 00209 VEXTERNC void Vclist_dtor2( 00210 Vclist *thee 00211 ); 00212 00220 VEXTERNC VclistCell* Vclist_getCell( 00221 Vclist *thee, 00222 double position[VAPBS_DIM] 00223 ); 00224 00231 VEXTERNC VclistCell* VclistCell_ctor( 00232 int natoms 00233 ); 00234 00241 VEXTERNC Vrc_Codes VclistCell_ctor2( 00242 VclistCell *thee, 00243 int natoms 00244 ); 00245 00250 VEXTERNC void VclistCell_dtor( 00251 VclistCell **thee 00252 ); 00253 00258 VEXTERNC void VclistCell_dtor2( 00259 VclistCell *thee 00260 ); 00261 00262 #endif /* ifndef _VCLIST_H_ */