• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

src/fem/apbs/vfetk.h

Go to the documentation of this file.
00001 
00054 #ifndef _VFETK_H_
00055 #define _VFETK_H_
00056 
00057 #include "maloc/maloc.h"
00058 #include "mc/mc.h"
00059 #include "apbs/vhal.h"
00060 #include "apbs/vatom.h"
00061 /* #include "apbs/valist.h" */
00062 #include "apbs/vcsm.h"
00063 #include "apbs/vpbe.h"
00064 #include "apbs/vunit.h"
00065 #include "apbs/vgreen.h"
00066 #include "apbs/vcap.h"
00067 #include "apbs/pbeparm.h"
00068 #include "apbs/femparm.h"
00069 
00075 enum eVfetk_LsolvType {
00076     VLT_SLU=0,  
00077     VLT_MG=1,  
00078     VLT_CG=2,  
00079     VLT_BCG=3  
00080 };
00081 
00086 typedef enum eVfetk_LsolvType Vfetk_LsolvType;
00087 
00088 
00093 enum eVfetk_MeshLoad {
00094     VML_DIRICUBE,  
00095     VML_NEUMCUBE,  
00096     VML_EXTERNAL  
00097 };
00098 
00103 typedef enum eVfetk_MeshLoad Vfetk_MeshLoad;
00104 
00110 enum eVfetk_NsolvType {
00111     VNT_NEW=0,  
00112     VNT_INC=1,  
00113     VNT_ARC=2  
00114 };
00115 
00120 typedef enum eVfetk_NsolvType Vfetk_NsolvType;
00121 
00127 enum eVfetk_GuessType {
00128     VGT_ZERO=0,  
00129     VGT_DIRI=1,  
00130     VGT_PREV=2  
00131 };
00132 
00137 typedef enum eVfetk_GuessType Vfetk_GuessType;
00138 
00144 enum eVfetk_PrecType {
00145     VPT_IDEN=0,  
00146     VPT_DIAG=1,  
00147     VPT_MG=2  
00148 };
00149 
00154 typedef enum eVfetk_PrecType Vfetk_PrecType;
00155 
00165 struct sVfetk { 
00166 
00167   Vmem *vmem;  
00168   Gem *gm;  
00171   AM *am;  
00172   Aprx *aprx;  
00173   PDE *pde;  
00174   Vpbe *pbe;  
00175   Vcsm *csm;  
00176   Vfetk_LsolvType lkey;  
00177   int lmax;  
00178   double ltol;  
00179   Vfetk_NsolvType nkey;  
00180   int nmax;  
00181   double ntol;  
00182   Vfetk_GuessType gues;  
00183   Vfetk_PrecType lprec;  
00184   int pjac;  
00186   PBEparm *pbeparm;  
00187   FEMparm *feparm;  
00188   Vhal_PBEType type;  
00189   int level;  
00191 };
00192 
00196 typedef struct sVfetk Vfetk;
00197 
00204 struct sVfetk_LocalVar {
00205     double nvec[VAPBS_DIM];  
00206     double vx[4][VAPBS_DIM];  
00207     double xq[VAPBS_DIM];  
00208     double U[MAXV];  
00209     double dU[MAXV][VAPBS_DIM];  
00210     double W;  
00211     double dW[VAPBS_DIM];  
00212     double d2W;  
00213     int sType;  
00214     int fType;  
00215     double diel;  
00216     double ionacc;  
00217     double A;  
00218     double F;  
00219     double B;  
00220     double DB;  
00221     double jumpDiel;  
00222     Vfetk *fetk;  
00223     Vgreen *green;  
00224     int initGreen;  
00226     SS *simp;  
00228     VV *verts[4];  
00229     int nverts;  
00230     double ionConc[MAXION];  
00231     double ionQ[MAXION];  
00232     double ionRadii[MAXION];  
00233     double zkappa2; 
00234     double zks2; 
00235     double ionstr; 
00236     int nion;  
00237     double Fu_v;  
00238     double DFu_wv;  
00239     double delta;  
00240     double u_D;  
00241     double u_T;  
00242 };
00243 
00248 typedef struct sVfetk_LocalVar Vfetk_LocalVar;
00249 
00250 #if !defined(VINLINE_VFETK)
00251 
00257     VEXTERNC Gem* Vfetk_getGem(
00258             Vfetk *thee 
00259             );
00260 
00266     VEXTERNC AM* Vfetk_getAM(
00267             Vfetk *thee 
00268             );
00269 
00275     VEXTERNC Vpbe* Vfetk_getVpbe(
00276             Vfetk *thee 
00277             );
00278 
00284     VEXTERNC Vcsm* Vfetk_getVcsm(
00285             Vfetk *thee 
00286             );
00287 
00294     VEXTERNC int Vfetk_getAtomColor(
00295             Vfetk *thee, 
00296             int iatom  
00297             );
00298 
00299 #else /* if defined(VINLINE_VFETK) */
00300 #   define Vfetk_getGem(thee) ((thee)->gm)
00301 #   define Vfetk_getAM(thee) ((thee)->am)
00302 #   define Vfetk_getVpbe(thee) ((thee)->pbe)
00303 #   define Vfetk_getVcsm(thee) ((thee)->csm)
00304 #   define Vfetk_getAtomColor(thee, iatom) (Vatom_getPartID(Valist_getAtom(Vpbe_getValist(thee->pbe), iatom)))
00305 #endif /* if !defined(VINLINE_VFETK) */
00306 
00307 /* ///////////////////////////////////////////////////////////////////////////
00308 // Class Vfetk: Non-Inlineable methods (vfetk.c)
00310 
00320 VEXTERNC Vfetk* Vfetk_ctor(
00321         Vpbe *pbe, 
00322         Vhal_PBEType type 
00323         );
00324 
00334 VEXTERNC int Vfetk_ctor2(
00335         Vfetk *thee, 
00336         Vpbe *pbe, 
00337         Vhal_PBEType type 
00338         );
00339 
00345 VEXTERNC void Vfetk_dtor(
00346         Vfetk **thee 
00347         );
00348 
00354 VEXTERNC void Vfetk_dtor2(
00355         Vfetk *thee 
00356         );
00357 
00367 VEXTERNC double* Vfetk_getSolution(
00368         Vfetk *thee, 
00369         int *length 
00370         );
00371 
00377 VEXTERNC void Vfetk_setParameters(
00378         Vfetk *thee, 
00379         PBEparm *pbeparm, 
00380         FEMparm *feparm 
00381         );
00382 
00401 VEXTERNC double  Vfetk_energy(
00402         Vfetk *thee, 
00403         int color, 
00407         int nonlin 
00409         );
00410 
00440 VEXTERNC double  Vfetk_dqmEnergy(
00441         Vfetk *thee, 
00442         int color  
00446         );
00447 
00465 VEXTERNC double Vfetk_qfEnergy(
00466         Vfetk *thee, 
00467         int color 
00469         );
00470 
00478 VEXTERNC unsigned long int Vfetk_memChk(
00479         Vfetk *thee 
00480         );
00481 
00497 VEXTERNC void Vfetk_setAtomColors(
00498         Vfetk *thee 
00499         );
00500 
00509 VEXTERNC void Bmat_printHB(
00510         Bmat *thee, 
00511         char *fname 
00512         );
00513 
00519 VEXTERNC Vrc_Codes Vfetk_genCube(
00520          Vfetk *thee,  
00521          double center[3],  
00522          double length[3],  
00523          Vfetk_MeshLoad meshType  
00524          );
00525  
00531 VEXTERNC Vrc_Codes Vfetk_loadMesh(
00532           Vfetk *thee, 
00533           double center[3],  
00534           double length[3],  
00535           Vfetk_MeshLoad meshType,  
00536           Vio *sock  
00537           );
00538 
00545 VEXTERNC PDE* Vfetk_PDE_ctor(
00546         Vfetk *fetk 
00547         );
00548 
00555 VEXTERNC int Vfetk_PDE_ctor2(
00556         PDE *thee, 
00557         Vfetk *fetk 
00558         );
00559 
00566 VEXTERNC void Vfetk_PDE_dtor(
00567         PDE **thee 
00568         );
00569 
00576 VEXTERNC void Vfetk_PDE_dtor2(
00577         PDE *thee 
00578         );
00579 
00585 VEXTERNC void Vfetk_PDE_initAssemble(
00586         PDE *thee, 
00587         int ip[], 
00588         double rp[] 
00589         );
00590 
00597 VEXTERNC void Vfetk_PDE_initElement(
00598         PDE *thee,  
00599         int elementType,  
00600         int chart,  
00603         double tvx[][VAPBS_DIM],  
00604         void *data 
00605         );
00606 
00612 VEXTERNC void Vfetk_PDE_initFace(
00613         PDE *thee, 
00614         int faceType, 
00616         int chart, 
00618         double tnvec[] 
00619         );
00620 
00628 VEXTERNC void Vfetk_PDE_initPoint(
00629         PDE *thee,  
00630         int pointType, 
00631         int chart,  
00633         double txq[],  
00634         double tU[],  
00635         double tdU[][VAPBS_DIM] 
00636         );
00637 
00655 VEXTERNC void Vfetk_PDE_Fu(
00656         PDE *thee, 
00657         int key, 
00659         double F[] 
00660         );
00661 
00672 VEXTERNC double Vfetk_PDE_Fu_v(
00673         PDE *thee, 
00674         int key, 
00676         double V[],  
00677         double dV[][VAPBS_DIM] 
00678         );
00679 
00691 VEXTERNC double Vfetk_PDE_DFu_wv(
00692         PDE *thee, 
00693         int key, 
00695         double W[], 
00696         double dW[][VAPBS_DIM], 
00697         double V[], 
00698         double dV[][VAPBS_DIM] 
00699         );
00700 
00707 VEXTERNC void Vfetk_PDE_delta(
00708         PDE *thee, 
00709         int type, 
00710         int chart, 
00711         double txq[], 
00712         void *user, 
00713         double F[] 
00714         );
00715 
00723 VEXTERNC void Vfetk_PDE_u_D(
00724         PDE *thee, 
00725         int type, 
00726         int chart, 
00727         double txq[], 
00728         double F[] 
00729         );
00730 
00738 VEXTERNC void Vfetk_PDE_u_T(
00739         PDE *thee, 
00740         int type, 
00741         int chart, 
00742         double txq[], 
00743         double F[] 
00744         );
00745 
00751 VEXTERNC void Vfetk_PDE_bisectEdge(
00752         int dim, 
00753         int dimII, 
00754         int edgeType,  
00755         int chart[], 
00757         double vx[][VAPBS_DIM] 
00758         );
00759 
00765 VEXTERNC void Vfetk_PDE_mapBoundary(
00766         int dim, 
00767         int dimII, 
00768         int vertexType,  
00769         int chart, 
00770         double vx[VAPBS_DIM] 
00771         );
00772 
00781 VEXTERNC int Vfetk_PDE_markSimplex(
00782         int dim, 
00783         int dimII, 
00784         int simplexType,  
00785         int faceType[VAPBS_NVS], 
00786         int vertexType[VAPBS_NVS], 
00787         int chart[], 
00788         double vx[][VAPBS_DIM], 
00789         void *simplex 
00790         );
00791 
00797 VEXTERNC void Vfetk_PDE_oneChart(
00798         int dim, 
00799         int dimII, 
00800         int objType, 
00801         int chart[], 
00802         double vx[][VAPBS_DIM], 
00803         int dimV 
00804         );
00805 
00815 VEXTERNC double Vfetk_PDE_Ju(
00816         PDE *thee, 
00817         int key 
00818         );
00819 
00827 VEXTERNC void Vfetk_externalUpdateFunction(
00828         SS **simps, 
00830         int num 
00831         );
00832 
00833 
00896 VEXTERNC int Vfetk_PDE_simplexBasisInit(
00897         int key, 
00899         int dim, 
00900         int comp, 
00902         int *ndof,  
00903         int dof[] 
00904         );
00905 
00913 VEXTERNC void Vfetk_PDE_simplexBasisForm(
00914         int key, 
00916         int dim, 
00917         int comp ,
00918         int pdkey, 
00927         double xq[], 
00928         double basis[] 
00930         );
00931 
00937 VEXTERNC void Vfetk_readMesh(
00938         Vfetk *thee, 
00939         int skey, 
00940         Vio *sock 
00941         );
00942 
00948 VEXTERNC void Vfetk_dumpLocalVar();
00949 
00957 VEXTERNC int Vfetk_fillArray(
00958         Vfetk *thee, 
00959         Bvec *vec, 
00960         Vdata_Type type 
00961         );
00962 
00977 VEXTERNC int Vfetk_write(
00978         Vfetk *thee, 
00979         const char *iodev, 
00981         const char *iofmt, 
00983         const char *thost, 
00984         const char *fname, 
00985         Bvec *vec, 
00986         Vdata_Format format 
00987         );
00988 
00994 VEXTERNC Vrc_Codes Vfetk_loadGem(
00995          Vfetk *thee, 
00996          Gem *gm 
00997          );
00998 
00999 
01000 #endif /* ifndef _VFETK_H_ */

Generated on Wed Oct 20 2010 12:01:33 for APBS by  doxygen 1.7.2