Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

vfetk.h

Go to the documentation of this file.
00001 
00072 #ifndef _VFETK_H_
00073 #define _VFETK_H_
00074 
00075 #include "maloc/maloc.h"
00076 #include "mc/mc.h"
00077 #include "apbs/vhal.h"
00078 #include "apbs/vatom.h"
00079 /* #include "apbs/valist.h" */
00080 #include "apbs/vcsm.h"
00081 #include "apbs/vpbe.h"
00082 #include "apbs/vunit.h"
00083 #include "apbs/vgreen.h"
00084 #include "apbs/vcap.h"
00085 #include "apbs/pbeparm.h"
00086 #include "apbs/femparm.h"
00087 
00093 enum eVfetk_LsolvType {
00094     VLT_SLU=0,  
00095     VLT_MG=1,  
00096     VLT_CG=2,  
00097     VLT_BCG=3  
00098 };
00099 
00104 typedef enum eVfetk_LsolvType Vfetk_LsolvType;
00105 
00111 enum eVfetk_NsolvType {
00112     VNT_NEW=0,  
00113     VNT_INC=1,  
00114     VNT_ARC=2  
00115 };
00116 
00121 typedef enum eVfetk_NsolvType Vfetk_NsolvType;
00122 
00128 enum eVfetk_GuessType {
00129     VGT_ZERO=0,  
00130     VGT_DIRI=1,  
00131     VGT_PREV=2  
00132 };
00133 
00138 typedef enum eVfetk_GuessType Vfetk_GuessType;
00139 
00145 enum eVfetk_PrecType {
00146     VPT_IDEN=0,  
00147     VPT_DIAG=1,  
00148     VPT_MG=2  
00149 };
00150 
00155 typedef enum eVfetk_PrecType Vfetk_PrecType;
00156 
00166 struct sVfetk { 
00167 
00168   Vmem *vmem;  
00169   Gem *gm;  
00172   AM *am;  
00173   Aprx *aprx;  
00174   PDE *pde;  
00175   Vpbe *pbe;  
00176   Vcsm *csm;  
00177   Vfetk_LsolvType lkey;  
00178   int lmax;  
00179   double ltol;  
00180   Vfetk_NsolvType nkey;  
00181   int nmax;  
00182   double ntol;  
00183   Vfetk_GuessType gues;  
00184   Vfetk_PrecType lprec;  
00185   int pjac;  
00187   PBEparm *pbeparm;  
00188   FEMparm *feparm;  
00189   Vhal_PBEType type;  
00190   int level;  
00192 };
00193 
00197 typedef struct sVfetk Vfetk;
00198 
00205 struct sVfetk_LocalVar {
00206     double nvec[VAPBS_DIM];  
00207     double vx[4][VAPBS_DIM];  
00208     double xq[VAPBS_DIM];  
00209     double U[MAXV];  
00210     double dU[MAXV][VAPBS_DIM];  
00211     double W;  
00212     double dW[VAPBS_DIM];  
00213     double d2W;  
00214     int sType;  
00215     int fType;  
00216     double diel;  
00217     double ionacc;  
00218     double A;  
00219     double F;  
00220     double B;  
00221     double DB;  
00222     double jumpDiel;  
00223     Vfetk *fetk;  
00224     Vgreen *green;  
00225     int initGreen;  
00227     SS *simp;  
00229     VV *verts[4];  
00230     int nverts;  
00231     double ionConc[MAXION];  
00232     double ionQ[MAXION];  
00233     double ionRadii[MAXION];  
00234     double zkappa2; 
00235     double zks2; 
00236     double ionstr; 
00237     int nion;  
00238     double Fu_v;  
00239     double DFu_wv;  
00240     double delta;  
00241     double u_D;  
00242     double u_T;  
00243 };
00244 
00249 typedef struct sVfetk_LocalVar Vfetk_LocalVar;
00250 
00251 #if !defined(VINLINE_VFETK)
00252 
00258     Gem* Vfetk_getGem(
00259             Vfetk *thee 
00260             );
00261 
00267     AM* Vfetk_getAM(
00268             Vfetk *thee 
00269             );
00270 
00276     Vpbe* Vfetk_getVpbe(
00277             Vfetk *thee 
00278             );
00279 
00285     Vcsm* Vfetk_getVcsm(
00286             Vfetk *thee 
00287             );
00288 
00297     int Vfetk_getAtomColor(
00298             Vfetk *thee, 
00299             int iatom  
00300             );
00301 
00302 #else /* if defined(VINLINE_VFETK) */
00303 #   define Vfetk_getGem(thee) ((thee)->gm)
00304 #   define Vfetk_getAM(thee) ((thee)->am)
00305 #   define Vfetk_getVpbe(thee) ((thee)->pbe)
00306 #   define Vfetk_getVcsm(thee) ((thee)->csm)
00307 #   define Vfetk_getAtomColor(thee, iatom) (Vatom_getPartID(Valist_getAtom(Vpbe_getValist(thee->pbe), iatom)))
00308 #endif /* if !defined(VINLINE_VFETK) */
00309 
00310 /* ///////////////////////////////////////////////////////////////////////////
00311 // Class Vfetk: Non-Inlineable methods (vfetk.c)
00313 
00323 Vfetk* Vfetk_ctor(
00324         Vpbe *pbe, 
00325         Vhal_PBEType type 
00326         );
00327 
00337 int Vfetk_ctor2(
00338         Vfetk *thee, 
00339         Vpbe *pbe, 
00340         Vhal_PBEType type 
00341         );
00342 
00348 void Vfetk_dtor(
00349         Vfetk **thee 
00350         );
00351 
00357 void Vfetk_dtor2(
00358         Vfetk *thee 
00359         );
00360 
00370 double* Vfetk_getSolution(
00371         Vfetk *thee, 
00372         int *length 
00373         );
00374 
00380 void Vfetk_setParameters(
00381         Vfetk *thee, 
00382         PBEparm *pbeparm, 
00383         FEMparm *feparm 
00384         );
00385 
00404 double  Vfetk_energy(
00405         Vfetk *thee, 
00406         int color, 
00410         int nonlin 
00412         );
00413 
00443 double  Vfetk_dqmEnergy(
00444         Vfetk *thee, 
00445         int color  
00449         );
00450 
00468 double Vfetk_qfEnergy(
00469         Vfetk *thee, 
00470         int color 
00472         );
00473 
00481 unsigned long int Vfetk_memChk(
00482         Vfetk *thee 
00483         );
00484 
00500 void Vfetk_setAtomColors(
00501         Vfetk *thee 
00502         );
00503 
00512 void Bmat_printHB(
00513         Bmat *thee, 
00514         char *fname 
00515         );
00516 
00523 int Vfetk_genCube(
00524         Vfetk *thee, 
00525         double center[VAPBS_DIM], 
00526         double length[VAPBS_DIM] 
00527         );
00528 
00535 PDE* Vfetk_PDE_ctor(
00536         Vfetk *fetk 
00537         );
00538 
00545 int Vfetk_PDE_ctor2(
00546         PDE *thee, 
00547         Vfetk *fetk 
00548         );
00549 
00556 void Vfetk_PDE_dtor(
00557         PDE **thee 
00558         );
00559 
00566 void Vfetk_PDE_dtor2(
00567         PDE *thee 
00568         );
00569 
00575 void Vfetk_PDE_initAssemble(
00576         PDE *thee, 
00577         int ip[], 
00578         double rp[] 
00579         );
00580 
00587 void Vfetk_PDE_initElement(
00588         PDE *thee,  
00589         int elementType,  
00590         int chart,  
00593         double tvx[][VAPBS_DIM],  
00594         void *data 
00595         );
00596 
00602 void Vfetk_PDE_initFace(
00603         PDE *thee, 
00604         int faceType, 
00606         int chart, 
00608         double tnvec[] 
00609         );
00610 
00618 void Vfetk_PDE_initPoint(
00619         PDE *thee,  
00620         int pointType, 
00621         int chart,  
00623         double txq[],  
00624         double tU[],  
00625         double tdU[][VAPBS_DIM] 
00626         );
00627 
00645 void Vfetk_PDE_Fu(
00646         PDE *thee, 
00647         int key, 
00649         double F[] 
00650         );
00651 
00662 double Vfetk_PDE_Fu_v(
00663         PDE *thee, 
00664         int key, 
00666         double V[],  
00667         double dV[][VAPBS_DIM] 
00668         );
00669 
00681 double Vfetk_PDE_DFu_wv(
00682         PDE *thee, 
00683         int key, 
00685         double W[], 
00686         double dW[][VAPBS_DIM], 
00687         double V[], 
00688         double dV[][VAPBS_DIM] 
00689         );
00690 
00697 void Vfetk_PDE_delta(
00698         PDE *thee, 
00699         int type, 
00700         int chart, 
00701         double txq[], 
00702         void *user, 
00703         double F[] 
00704         );
00705 
00713 void Vfetk_PDE_u_D(
00714         PDE *thee, 
00715         int type, 
00716         int chart, 
00717         double txq[], 
00718         double F[] 
00719         );
00720 
00728 void Vfetk_PDE_u_T(
00729         PDE *thee, 
00730         int type, 
00731         int chart, 
00732         double txq[], 
00733         double F[] 
00734         );
00735 
00741 void Vfetk_PDE_bisectEdge(
00742         int dim, 
00743         int dimII, 
00744         int edgeType,  
00745         int chart[], 
00747         double vx[][VAPBS_DIM] 
00748         );
00749 
00755 void Vfetk_PDE_mapBoundary(
00756         int dim, 
00757         int dimII, 
00758         int vertexType,  
00759         int chart, 
00760         double vx[VAPBS_DIM] 
00761         );
00762 
00771 int Vfetk_PDE_markSimplex(
00772         int dim, 
00773         int dimII, 
00774         int simplexType,  
00775         int faceType[VAPBS_NVS], 
00776         int vertexType[VAPBS_NVS], 
00777         int chart[], 
00778         double vx[][VAPBS_DIM], 
00779         void *simplex 
00780         );
00781 
00787 void Vfetk_PDE_oneChart(
00788         int dim, 
00789         int dimII, 
00790         int objType, 
00791         int chart[], 
00792         double vx[][VAPBS_DIM], 
00793         int dimV 
00794         );
00795 
00805 double Vfetk_PDE_Ju(
00806         PDE *thee, 
00807         int key 
00808         );
00809 
00817 void Vfetk_externalUpdateFunction(
00818         SS **simps, 
00820         int num 
00821         );
00822 
00823 
00886 int Vfetk_PDE_simplexBasisInit(
00887         int key, 
00889         int dim, 
00890         int comp, 
00892         int *ndof,  
00893         int dof[] 
00894         );
00895 
00903 void Vfetk_PDE_simplexBasisForm(
00904         int key, 
00906         int dim, 
00907         int comp ,
00908         int pdkey, 
00917         double xq[], 
00918         double basis[] 
00920         );
00921 
00927 void Vfetk_readMesh(
00928         Vfetk *thee, 
00929         int skey, 
00930         Vio *sock 
00931         );
00932 
00938 void Vfetk_dumpLocalVar();
00939 
00947 int Vfetk_fillArray(
00948         Vfetk *thee, 
00949         Bvec *vec, 
00950         Vdata_Type type 
00951         );
00952 
00967 int Vfetk_write(
00968         Vfetk *thee, 
00969         const char *iodev, 
00971         const char *iofmt, 
00973         const char *thost, 
00974         const char *fname, 
00975         Bvec *vec, 
00976         Vdata_Format format 
00977         );
00978 
00979 
00980 #endif /* ifndef _VFETK_H_ */
00981 

Generated on Thu Jul 12 11:49:46 2007 for APBS by doxygen 1.3.4