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

vfetk.h

Go to the documentation of this file.
00001 
00060 #ifndef _VFETK_H_
00061 #define _VFETK_H_
00062 
00063 #include "maloc/maloc.h"
00064 #include "mc/mc.h"
00065 #include "apbs/vhal.h"
00066 #include "apbs/vatom.h"
00067 /* #include "apbs/valist.h" */
00068 #include "apbs/vcsm.h"
00069 #include "apbs/vpbe.h"
00070 #include "apbs/vunit.h"
00071 #include "apbs/vgreen.h"
00072 #include "apbs/vcap.h"
00073 #include "apbs/pbeparm.h"
00074 #include "apbs/femparm.h"
00075 
00081 enum eVfetk_LsolvType {
00082     VLT_SLU=0,  
00083     VLT_MG=1,  
00084     VLT_CG=2,  
00085     VLT_BCG=3  
00086 };
00087 
00092 typedef enum eVfetk_LsolvType Vfetk_LsolvType;
00093 
00094 
00099 enum eVfetk_MeshLoad {
00100     VML_DIRICUBE,  
00101     VML_NEUMCUBE,  
00102     VML_EXTERNAL  
00103 };
00104 
00109 typedef enum eVfetk_MeshLoad Vfetk_MeshLoad;
00110 
00116 enum eVfetk_NsolvType {
00117     VNT_NEW=0,  
00118     VNT_INC=1,  
00119     VNT_ARC=2  
00120 };
00121 
00126 typedef enum eVfetk_NsolvType Vfetk_NsolvType;
00127 
00133 enum eVfetk_GuessType {
00134     VGT_ZERO=0,  
00135     VGT_DIRI=1,  
00136     VGT_PREV=2  
00137 };
00138 
00143 typedef enum eVfetk_GuessType Vfetk_GuessType;
00144 
00150 enum eVfetk_PrecType {
00151     VPT_IDEN=0,  
00152     VPT_DIAG=1,  
00153     VPT_MG=2  
00154 };
00155 
00160 typedef enum eVfetk_PrecType Vfetk_PrecType;
00161 
00171 struct sVfetk { 
00172 
00173   Vmem *vmem;  
00174   Gem *gm;  
00177   AM *am;  
00178   Aprx *aprx;  
00179   PDE *pde;  
00180   Vpbe *pbe;  
00181   Vcsm *csm;  
00182   Vfetk_LsolvType lkey;  
00183   int lmax;  
00184   double ltol;  
00185   Vfetk_NsolvType nkey;  
00186   int nmax;  
00187   double ntol;  
00188   Vfetk_GuessType gues;  
00189   Vfetk_PrecType lprec;  
00190   int pjac;  
00192   PBEparm *pbeparm;  
00193   FEMparm *feparm;  
00194   Vhal_PBEType type;  
00195   int level;  
00197 };
00198 
00202 typedef struct sVfetk Vfetk;
00203 
00210 struct sVfetk_LocalVar {
00211     double nvec[VAPBS_DIM];  
00212     double vx[4][VAPBS_DIM];  
00213     double xq[VAPBS_DIM];  
00214     double U[MAXV];  
00215     double dU[MAXV][VAPBS_DIM];  
00216     double W;  
00217     double dW[VAPBS_DIM];  
00218     double d2W;  
00219     int sType;  
00220     int fType;  
00221     double diel;  
00222     double ionacc;  
00223     double A;  
00224     double F;  
00225     double B;  
00226     double DB;  
00227     double jumpDiel;  
00228     Vfetk *fetk;  
00229     Vgreen *green;  
00230     int initGreen;  
00232     SS *simp;  
00234     VV *verts[4];  
00235     int nverts;  
00236     double ionConc[MAXION];  
00237     double ionQ[MAXION];  
00238     double ionRadii[MAXION];  
00239     double zkappa2; 
00240     double zks2; 
00241     double ionstr; 
00242     int nion;  
00243     double Fu_v;  
00244     double DFu_wv;  
00245     double delta;  
00246     double u_D;  
00247     double u_T;  
00248 };
00249 
00254 typedef struct sVfetk_LocalVar Vfetk_LocalVar;
00255 
00256 #if !defined(VINLINE_VFETK)
00257 
00263     Gem* Vfetk_getGem(
00264             Vfetk *thee 
00265             );
00266 
00272     AM* Vfetk_getAM(
00273             Vfetk *thee 
00274             );
00275 
00281     Vpbe* Vfetk_getVpbe(
00282             Vfetk *thee 
00283             );
00284 
00290     Vcsm* Vfetk_getVcsm(
00291             Vfetk *thee 
00292             );
00293 
00302     int Vfetk_getAtomColor(
00303             Vfetk *thee, 
00304             int iatom  
00305             );
00306 
00307 #else /* if defined(VINLINE_VFETK) */
00308 #   define Vfetk_getGem(thee) ((thee)->gm)
00309 #   define Vfetk_getAM(thee) ((thee)->am)
00310 #   define Vfetk_getVpbe(thee) ((thee)->pbe)
00311 #   define Vfetk_getVcsm(thee) ((thee)->csm)
00312 #   define Vfetk_getAtomColor(thee, iatom) (Vatom_getPartID(Valist_getAtom(Vpbe_getValist(thee->pbe), iatom)))
00313 #endif /* if !defined(VINLINE_VFETK) */
00314 
00315 /* ///////////////////////////////////////////////////////////////////////////
00316 // Class Vfetk: Non-Inlineable methods (vfetk.c)
00318 
00328 Vfetk* Vfetk_ctor(
00329         Vpbe *pbe, 
00330         Vhal_PBEType type 
00331         );
00332 
00342 int Vfetk_ctor2(
00343         Vfetk *thee, 
00344         Vpbe *pbe, 
00345         Vhal_PBEType type 
00346         );
00347 
00353 void Vfetk_dtor(
00354         Vfetk **thee 
00355         );
00356 
00362 void Vfetk_dtor2(
00363         Vfetk *thee 
00364         );
00365 
00375 double* Vfetk_getSolution(
00376         Vfetk *thee, 
00377         int *length 
00378         );
00379 
00385 void Vfetk_setParameters(
00386         Vfetk *thee, 
00387         PBEparm *pbeparm, 
00388         FEMparm *feparm 
00389         );
00390 
00409 double  Vfetk_energy(
00410         Vfetk *thee, 
00411         int color, 
00415         int nonlin 
00417         );
00418 
00448 double  Vfetk_dqmEnergy(
00449         Vfetk *thee, 
00450         int color  
00454         );
00455 
00473 double Vfetk_qfEnergy(
00474         Vfetk *thee, 
00475         int color 
00477         );
00478 
00486 unsigned long int Vfetk_memChk(
00487         Vfetk *thee 
00488         );
00489 
00505 void Vfetk_setAtomColors(
00506         Vfetk *thee 
00507         );
00508 
00517 void Bmat_printHB(
00518         Bmat *thee, 
00519         char *fname 
00520         );
00521 
00527 Vrc_Codes Vfetk_genCube(
00528                                                                  Vfetk *thee,  
00529                                                                  double center[3],  
00530                                                                  double length[3],  
00531                                                                  Vfetk_MeshLoad meshType  
00532                                                                  );
00533  
00539 Vrc_Codes Vfetk_loadMesh(
00540                                                                   Vfetk *thee, 
00541                                                                   double center[3],  
00542                                                                   double length[3],  
00543                                                                   Vfetk_MeshLoad meshType,  
00544                                                                   Vio *sock  
00545                                                                   );
00546 
00553 PDE* Vfetk_PDE_ctor(
00554         Vfetk *fetk 
00555         );
00556 
00563 int Vfetk_PDE_ctor2(
00564         PDE *thee, 
00565         Vfetk *fetk 
00566         );
00567 
00574 void Vfetk_PDE_dtor(
00575         PDE **thee 
00576         );
00577 
00584 void Vfetk_PDE_dtor2(
00585         PDE *thee 
00586         );
00587 
00593 void Vfetk_PDE_initAssemble(
00594         PDE *thee, 
00595         int ip[], 
00596         double rp[] 
00597         );
00598 
00605 void Vfetk_PDE_initElement(
00606         PDE *thee,  
00607         int elementType,  
00608         int chart,  
00611         double tvx[][VAPBS_DIM],  
00612         void *data 
00613         );
00614 
00620 void Vfetk_PDE_initFace(
00621         PDE *thee, 
00622         int faceType, 
00624         int chart, 
00626         double tnvec[] 
00627         );
00628 
00636 void Vfetk_PDE_initPoint(
00637         PDE *thee,  
00638         int pointType, 
00639         int chart,  
00641         double txq[],  
00642         double tU[],  
00643         double tdU[][VAPBS_DIM] 
00644         );
00645 
00663 void Vfetk_PDE_Fu(
00664         PDE *thee, 
00665         int key, 
00667         double F[] 
00668         );
00669 
00680 double Vfetk_PDE_Fu_v(
00681         PDE *thee, 
00682         int key, 
00684         double V[],  
00685         double dV[][VAPBS_DIM] 
00686         );
00687 
00699 double Vfetk_PDE_DFu_wv(
00700         PDE *thee, 
00701         int key, 
00703         double W[], 
00704         double dW[][VAPBS_DIM], 
00705         double V[], 
00706         double dV[][VAPBS_DIM] 
00707         );
00708 
00715 void Vfetk_PDE_delta(
00716         PDE *thee, 
00717         int type, 
00718         int chart, 
00719         double txq[], 
00720         void *user, 
00721         double F[] 
00722         );
00723 
00731 void Vfetk_PDE_u_D(
00732         PDE *thee, 
00733         int type, 
00734         int chart, 
00735         double txq[], 
00736         double F[] 
00737         );
00738 
00746 void Vfetk_PDE_u_T(
00747         PDE *thee, 
00748         int type, 
00749         int chart, 
00750         double txq[], 
00751         double F[] 
00752         );
00753 
00759 void Vfetk_PDE_bisectEdge(
00760         int dim, 
00761         int dimII, 
00762         int edgeType,  
00763         int chart[], 
00765         double vx[][VAPBS_DIM] 
00766         );
00767 
00773 void Vfetk_PDE_mapBoundary(
00774         int dim, 
00775         int dimII, 
00776         int vertexType,  
00777         int chart, 
00778         double vx[VAPBS_DIM] 
00779         );
00780 
00789 int Vfetk_PDE_markSimplex(
00790         int dim, 
00791         int dimII, 
00792         int simplexType,  
00793         int faceType[VAPBS_NVS], 
00794         int vertexType[VAPBS_NVS], 
00795         int chart[], 
00796         double vx[][VAPBS_DIM], 
00797         void *simplex 
00798         );
00799 
00805 void Vfetk_PDE_oneChart(
00806         int dim, 
00807         int dimII, 
00808         int objType, 
00809         int chart[], 
00810         double vx[][VAPBS_DIM], 
00811         int dimV 
00812         );
00813 
00823 double Vfetk_PDE_Ju(
00824         PDE *thee, 
00825         int key 
00826         );
00827 
00835 void Vfetk_externalUpdateFunction(
00836         SS **simps, 
00838         int num 
00839         );
00840 
00841 
00904 int Vfetk_PDE_simplexBasisInit(
00905         int key, 
00907         int dim, 
00908         int comp, 
00910         int *ndof,  
00911         int dof[] 
00912         );
00913 
00921 void Vfetk_PDE_simplexBasisForm(
00922         int key, 
00924         int dim, 
00925         int comp ,
00926         int pdkey, 
00935         double xq[], 
00936         double basis[] 
00938         );
00939 
00945 void Vfetk_readMesh(
00946         Vfetk *thee, 
00947         int skey, 
00948         Vio *sock 
00949         );
00950 
00956 void Vfetk_dumpLocalVar();
00957 
00965 int Vfetk_fillArray(
00966         Vfetk *thee, 
00967         Bvec *vec, 
00968         Vdata_Type type 
00969         );
00970 
00985 int Vfetk_write(
00986         Vfetk *thee, 
00987         const char *iodev, 
00989         const char *iofmt, 
00991         const char *thost, 
00992         const char *fname, 
00993         Bvec *vec, 
00994         Vdata_Format format 
00995         );
00996 
01002 Vrc_Codes Vfetk_loadGem(
01003                                                                  Vfetk *thee, 
01004                                                                  Gem *gm 
01005                                                                  );
01006 
01007 
01008 #endif /* ifndef _VFETK_H_ */
01009 

Generated on Tue Apr 15 13:53:15 2008 for APBS by doxygen 1.3.4