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[VAPBS_DIM];  
00184     double vx[4][VAPBS_DIM];  
00185     double xq[VAPBS_DIM];  
00186     double U[MAXV];  
00187     double dU[MAXV][VAPBS_DIM];  
00188     double W;  
00189     double dW[VAPBS_DIM];  
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 
00235     Gem* Vfetk_getGem(
00236             Vfetk *thee 
00237             );
00238 
00244     AM* Vfetk_getAM(
00245             Vfetk *thee 
00246             );
00247 
00253     Vpbe* Vfetk_getVpbe(
00254             Vfetk *thee 
00255             );
00256 
00262     Vcsm* Vfetk_getVcsm(
00263             Vfetk *thee 
00264             );
00265 
00274     int Vfetk_getAtomColor(
00275             Vfetk *thee, 
00276             int iatom  
00277             );
00278 
00279 #else /* if defined(VINLINE_VFETK) */
00280 #   define Vfetk_getGem(thee) ((thee)->gm)
00281 #   define Vfetk_getAM(thee) ((thee)->am)
00282 #   define Vfetk_getVpbe(thee) ((thee)->pbe)
00283 #   define Vfetk_getVcsm(thee) ((thee)->csm)
00284 #   define Vfetk_getAtomColor(thee, iatom) (Vatom_getPartID(Valist_getAtom(Vpbe_getValist(thee->pbe), iatom)))
00285 #endif /* if !defined(VINLINE_VFETK) */
00286 
00287 /* ///////////////////////////////////////////////////////////////////////////
00288 // Class Vfetk: Non-Inlineable methods (vfetk.c)
00290 
00300 Vfetk* Vfetk_ctor(
00301         Vpbe *pbe, 
00302         Vhal_PBEType type 
00303         );
00304 
00314 int Vfetk_ctor2(
00315         Vfetk *thee, 
00316         Vpbe *pbe, 
00317         Vhal_PBEType type 
00318         );
00319 
00325 void Vfetk_dtor(
00326         Vfetk **thee 
00327         );
00328 
00334 void Vfetk_dtor2(
00335         Vfetk *thee 
00336         );
00337 
00347 double* Vfetk_getSolution(
00348         Vfetk *thee, 
00349         int *length 
00350         );
00351 
00357 void Vfetk_setParameters(
00358         Vfetk *thee, 
00359         PBEparm *pbeparm, 
00360         FEMparm *feparm 
00361         );
00362 
00381 double  Vfetk_energy(
00382         Vfetk *thee, 
00383         int color, 
00387         int nonlin 
00389         );
00390 
00420 double  Vfetk_dqmEnergy(
00421         Vfetk *thee, 
00422         int color  
00426         );
00427 
00445 double Vfetk_qfEnergy(
00446         Vfetk *thee, 
00447         int color 
00449         );
00450 
00458 unsigned long int Vfetk_memChk(
00459         Vfetk *thee 
00460         );
00461 
00477 void Vfetk_setAtomColors(
00478         Vfetk *thee 
00479         );
00480 
00489 void Bmat_printHB(
00490         Bmat *thee, 
00491         char *fname 
00492         );
00493 
00500 int Vfetk_genCube(
00501         Vfetk *thee, 
00502         double center[VAPBS_DIM], 
00503         double length[VAPBS_DIM] 
00504         );
00505 
00512 PDE* Vfetk_PDE_ctor(
00513         Vfetk *fetk 
00514         );
00515 
00522 int Vfetk_PDE_ctor2(
00523         PDE *thee, 
00524         Vfetk *fetk 
00525         );
00526 
00533 void Vfetk_PDE_dtor(
00534         PDE **thee 
00535         );
00536 
00543 void Vfetk_PDE_dtor2(
00544         PDE *thee 
00545         );
00546 
00552 void Vfetk_PDE_initAssemble(
00553         PDE *thee, 
00554         int ip[], 
00555         double rp[] 
00556         );
00557 
00564 void Vfetk_PDE_initElement(
00565         PDE *thee,  
00566         int elementType,  
00567         int chart,  
00570         double tvx[][VAPBS_DIM],  
00571         void *data 
00572         );
00573 
00579 void Vfetk_PDE_initFace(
00580         PDE *thee, 
00581         int faceType, 
00583         int chart, 
00585         double tnvec[] 
00586         );
00587 
00595 void Vfetk_PDE_initPoint(
00596         PDE *thee,  
00597         int pointType, 
00598         int chart,  
00600         double txq[],  
00601         double tU[],  
00602         double tdU[][VAPBS_DIM] 
00603         );
00604 
00622 void Vfetk_PDE_Fu(
00623         PDE *thee, 
00624         int key, 
00626         double F[] 
00627         );
00628 
00639 double Vfetk_PDE_Fu_v(
00640         PDE *thee, 
00641         int key, 
00643         double V[],  
00644         double dV[][VAPBS_DIM] 
00645         );
00646 
00658 double Vfetk_PDE_DFu_wv(
00659         PDE *thee, 
00660         int key, 
00662         double W[], 
00663         double dW[][VAPBS_DIM], 
00664         double V[], 
00665         double dV[][VAPBS_DIM] 
00666         );
00667 
00674 void Vfetk_PDE_delta(
00675         PDE *thee, 
00676         int type, 
00677         int chart, 
00678         double txq[], 
00679         void *user, 
00680         double F[] 
00681         );
00682 
00690 void Vfetk_PDE_u_D(
00691         PDE *thee, 
00692         int type, 
00693         int chart, 
00694         double txq[], 
00695         double F[] 
00696         );
00697 
00705 void Vfetk_PDE_u_T(
00706         PDE *thee, 
00707         int type, 
00708         int chart, 
00709         double txq[], 
00710         double F[] 
00711         );
00712 
00718 void Vfetk_PDE_bisectEdge(
00719         int dim, 
00720         int dimII, 
00721         int edgeType,  
00722         int chart[], 
00724         double vx[][VAPBS_DIM] 
00725         );
00726 
00732 void Vfetk_PDE_mapBoundary(
00733         int dim, 
00734         int dimII, 
00735         int vertexType,  
00736         int chart, 
00737         double vx[VAPBS_DIM] 
00738         );
00739 
00748 int Vfetk_PDE_markSimplex(
00749         int dim, 
00750         int dimII, 
00751         int simplexType,  
00752         int faceType[VAPBS_NVS], 
00753         int vertexType[VAPBS_NVS], 
00754         int chart[], 
00755         double vx[][VAPBS_DIM], 
00756         void *simplex 
00757         );
00758 
00764 void Vfetk_PDE_oneChart(
00765         int dim, 
00766         int dimII, 
00767         int objType, 
00768         int chart[], 
00769         double vx[][VAPBS_DIM], 
00770         int dimV 
00771         );
00772 
00782 double Vfetk_PDE_Ju(
00783         PDE *thee, 
00784         int key 
00785         );
00786 
00794 void Vfetk_externalUpdateFunction(
00795         SS **simps, 
00797         int num 
00798         );
00799 
00800 
00863 int Vfetk_PDE_simplexBasisInit(
00864         int key, 
00866         int dim, 
00867         int comp, 
00869         int *ndof,  
00870         int dof[] 
00871         );
00872 
00880 void Vfetk_PDE_simplexBasisForm(
00881         int key, 
00883         int dim, 
00884         int comp ,
00885         int pdkey, 
00894         double xq[], 
00895         double basis[] 
00897         );
00898 
00904 void Vfetk_readMesh(
00905         Vfetk *thee, 
00906         int skey, 
00907         Vio *sock 
00908         );
00909 
00915 void Vfetk_dumpLocalVar();
00916 
00924 int Vfetk_fillArray(
00925         Vfetk *thee, 
00926         Bvec *vec, 
00927         Vdata_Type type 
00928         );
00929 
00944 int Vfetk_write(
00945         Vfetk *thee, 
00946         const char *iodev, 
00948         const char *iofmt, 
00950         const char *thost, 
00951         const char *fname, 
00952         Bvec *vec, 
00953         Vdata_Format format 
00954         );
00955 
00956 
00957 #endif /* ifndef _VFETK_H_ */
00958 

Generated on Tue Dec 6 10:05:31 2005 for APBS by doxygen 1.3.5