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

vfetk.h

Go to the documentation of this file.
00001 
00049 #ifndef _VFETK_H_
00050 #define _VFETK_H_
00051 
00052 #include "maloc/maloc.h"
00053 #include "mc/mc.h"
00054 #include "apbs/vhal.h"
00055 #include "apbs/vatom.h"
00056 /* #include "apbs/valist.h" */
00057 #include "apbs/vcsm.h"
00058 #include "apbs/vpbe.h"
00059 #include "apbs/vunit.h"
00060 #include "apbs/vgreen.h"
00061 #include "apbs/vcap.h"
00062 #include "apbs/pbeparm.h"
00063 #include "apbs/femparm.h"
00064 
00070 enum eVfetk_LsolvType {
00071     VLT_SLU=0,  
00072     VLT_MG=1,  
00073     VLT_CG=2,  
00074     VLT_BCG=3  
00075 };
00076 
00081 typedef enum eVfetk_LsolvType Vfetk_LsolvType;
00082 
00088 enum eVfetk_NsolvType {
00089     VNT_NEW=0,  
00090     VNT_INC=1,  
00091     VNT_ARC=2  
00092 };
00093 
00098 typedef enum eVfetk_NsolvType Vfetk_NsolvType;
00099 
00105 enum eVfetk_GuessType {
00106     VGT_ZERO=0,  
00107     VGT_DIRI=1,  
00108     VGT_PREV=2  
00109 };
00110 
00115 typedef enum eVfetk_GuessType Vfetk_GuessType;
00116 
00122 enum eVfetk_PrecType {
00123     VPT_IDEN=0,  
00124     VPT_DIAG=1,  
00125     VPT_MG=2  
00126 };
00127 
00132 typedef enum eVfetk_PrecType Vfetk_PrecType;
00133 
00143 struct sVfetk { 
00144 
00145   Vmem *vmem;  
00146   Gem *gm;  
00149   AM *am;  
00150   Aprx *aprx;  
00151   PDE *pde;  
00152   Vpbe *pbe;  
00153   Vcsm *csm;  
00154   Vfetk_LsolvType lkey;  
00155   int lmax;  
00156   double ltol;  
00157   Vfetk_NsolvType nkey;  
00158   int nmax;  
00159   double ntol;  
00160   Vfetk_GuessType gues;  
00161   Vfetk_PrecType lprec;  
00162   int pjac;  
00164   PBEparm *pbeparm;  
00165   FEMparm *feparm;  
00166   Vhal_PBEType type;  
00167   int level;  
00169 };
00170 
00174 typedef struct sVfetk Vfetk;
00175 
00182 struct sVfetk_LocalVar {
00183     double nvec[3];  
00184     double vx[4][3];  
00185     double xq[3];  
00186     double U[MAXV];  
00187     double dU[MAXV][3];  
00188     double W;  
00189     double dW[3];  
00190     double d2W;  
00191     int sType;  
00192     int fType;  
00193     double diel;  
00194     double kappa2;  
00195     double A;  
00196     double F;  
00197     double B;  
00198     double DB;  
00199     double jumpDiel;  
00200     Vfetk *fetk;  
00201     Vgreen *green;  
00202     int initGreen;  
00204     SS *simp;  
00206     VV *verts[4];  
00207     int nverts;  
00208     double ionConc[MAXION];  
00209     double ionQ[MAXION];  
00210     double ionRadii[MAXION];  
00211     double zkappa2; 
00212     double zks2; 
00213     double ionstr; 
00214     int nion;  
00215     double Fu_v;  
00216     double DFu_wv;  
00217     double delta;  
00218     double u_D;  
00219     double u_T;  
00220 };
00221 
00226 typedef struct sVfetk_LocalVar Vfetk_LocalVar;
00227 
00228 #if !defined(VINLINE_VFETK)
00229 
00236     Gem*    Vfetk_getGem(Vfetk *thee);
00237 
00244     AM*     Vfetk_getAM(Vfetk *thee);
00245 
00252     Vpbe*   Vfetk_getVpbe(Vfetk *thee);
00253 
00260     Vcsm*   Vfetk_getVcsm(Vfetk *thee);
00261 
00270     int     Vfetk_getAtomColor(Vfetk *thee, int iatom);
00271 
00272 #else /* if defined(VINLINE_VFETK) */
00273 #   define Vfetk_getGem(thee) ((thee)->gm)
00274 #   define Vfetk_getAM(thee) ((thee)->am)
00275 #   define Vfetk_getVpbe(thee) ((thee)->pbe)
00276 #   define Vfetk_getVcsm(thee) ((thee)->csm)
00277 #   define Vfetk_getAtomColor(thee, iatom) (Vatom_getPartID(Valist_getAtom(Vpbe_getValist(thee->pbe), iatom)))
00278 #endif /* if !defined(VINLINE_VFETK) */
00279 
00280 /* 
00281 // Class Vfetk: Non-Inlineable methods (vfetk.c)
00283 
00294 Vfetk*  Vfetk_ctor(Vpbe *pbe, Vhal_PBEType type);
00295 
00307 int     Vfetk_ctor2(Vfetk *thee, Vpbe *pbe, Vhal_PBEType type);
00308 
00314 void    Vfetk_dtor(Vfetk **thee);
00315 
00321 void    Vfetk_dtor2(Vfetk *thee);
00322 
00333 double* Vfetk_getSolution(Vfetk *thee, int *length);
00334 
00343 void Vfetk_setParameters(Vfetk *thee, PBEparm *pbeparm,
00344   FEMparm *feparm);
00345 
00368 double  Vfetk_energy(Vfetk *thee, int color, int nonlin);
00369 
00398 double  Vfetk_dqmEnergy(Vfetk *thee, int color);
00399 
00416 double  Vfetk_qfEnergy(Vfetk *thee, int color);
00417 
00437 double Vfetk_lnDet(Vfetk *thee, int color, int oflag, int mflag);
00438 
00446 int     Vfetk_memChk(Vfetk *thee);
00447 
00463 void    Vfetk_setAtomColors(Vfetk *thee);
00464 
00474 void    Bmat_printHB(Bmat *thee, char *fname);
00475 
00486 int     Bmat_choleskyFactor(Bmat *thee, int flag);
00487 
00496 double  Mat_lnDetDiag(Mat *thee);
00497 
00507 int Vfetk_genCube(Vfetk *thee, double center[3], double length[3]);
00508 
00516 PDE* Vfetk_PDE_ctor(Vfetk *fetk);
00517 
00526 int Vfetk_PDE_ctor2(PDE *thee, Vfetk *fetk);
00527 
00535 void Vfetk_PDE_dtor(PDE **thee);
00536 
00544 void Vfetk_PDE_dtor2(PDE *thee);
00545 
00554 void Vfetk_PDE_initAssemble(PDE *thee, int ip[], double rp[]);
00555 
00568 void Vfetk_PDE_initElement(PDE *thee, int elementType, int chart,
00569   double tvx[][3], void *data);
00570 
00581 void Vfetk_PDE_initFace(PDE *thee, int faceType, int chart,
00582   double tnvec[]);
00583 
00598 void Vfetk_PDE_initPoint(PDE *thee, int pointType, int chart, 
00599   double txq[], double tU[], double tdU[][3]);
00600 
00622 void Vfetk_PDE_Fu(PDE *thee, int key, double F[]);
00623 
00640 double Vfetk_PDE_Fu_v(PDE *thee, int key, double V[], double dV[][3]);
00641 
00661 double Vfetk_PDE_DFu_wv(PDE *thee, int key, double W[], double dW[][3],
00662   double V[], double dV[][3]);
00663 
00676 void Vfetk_PDE_delta(PDE *thee, int type, int chart, double txq[],
00677   void *user, double F[]);
00678 
00691 void Vfetk_PDE_u_D(PDE *thee, int type, int chart, double txq[],
00692   double F[]);
00693 
00706 void Vfetk_PDE_u_T(PDE *thee, int type, int chart, double txq[],
00707   double F[]);
00708 
00725 void Vfetk_PDE_bisectEdge(int dim, int dimII, int edgeType, 
00726   int chart[], double vx[][3]);
00727 
00738 void Vfetk_PDE_mapBoundary(int dim, int dimII, int vertexType, 
00739   int chart, double vx[3]);
00740 
00757 int Vfetk_PDE_markSimplex(int dim, int dimII, int simplexType, 
00758   int faceType[4], int vertexType[4], int chart[], double vx[][3],
00759   void *simplex);
00760 
00772 void Vfetk_PDE_oneChart(int dim, int dimII, int objType, int chart[],
00773   double vx[][3], int dimV);
00774 
00786 double Vfetk_PDE_Ju(PDE *thee, int key);
00787 
00797 void Vfetk_externalUpdateFunction(SS **simps, int num);
00798 
00799 
00871 int Vfetk_PDE_simplexBasisInit(int key, int dim, int comp, int *ndof, 
00872   int dof[]);
00873 
00899 void Vfetk_PDE_simplexBasisForm(int key, int dim, int comp,
00900     int pdkey, double xq[], double basis[]);
00901 
00910 void Vfetk_readMesh(Vfetk *thee, int skey, Vio *sock);
00911 
00917 void Vfetk_dumpLocalVar();
00918 
00929 int Vfetk_fillArray(Vfetk *thee, Bvec *vec, Vdata_Type type);
00930 
00945 int Vfetk_write(Vfetk *thee, const char *iodev, const char *iofmt,
00946   const char *thost, const char *fname, Bvec *vec, Vdata_Format format);
00947 
00948 
00949 #endif /* ifndef _VFETK_H_ */
00950 

Generated on Tue Feb 17 09:27:05 2004 for APBS by doxygen1.2.18