67#include "maloc/maloc.h"
261#if !defined(VINLINE_VFETK)
311# define Vfetk_getGem(thee) ((thee)->gm)
312# define Vfetk_getAM(thee) ((thee)->am)
313# define Vfetk_getVpbe(thee) ((thee)->pbe)
314# define Vfetk_getVcsm(thee) ((thee)->csm)
315# define Vfetk_getAtomColor(thee, iatom) (Vatom_getPartID(Valist_getAtom(Vpbe_getValist(thee->pbe), iatom)))
331VEXTERNC Vfetk* Vfetk_ctor(
332 Vpbe *pbe, /**< Vpbe (PBE manager object) */
Contains declarations for class APOLparm.
eVfetk_LsolvType
Linear solver type.
enum eVfetk_MeshLoad Vfetk_MeshLoad
Declare FEMparm_GuessType type.
VEXTERNC int Vfetk_PDE_markSimplex(int dim, int dimII, int simplexType, int faceType[VAPBS_NVS], int vertexType[VAPBS_NVS], int chart[], double vx[][VAPBS_DIM], void *simplex)
User-defined error estimator – in our case, a geometry-based refinement method; forcing simplex refin...
VEXTERNC int Vfetk_write(Vfetk *thee, const char *iodev, const char *iofmt, const char *thost, const char *fname, Bvec *vec, Vdata_Format format)
Write out data.
VEXTERNC double Vfetk_PDE_Ju(PDE *thee, int key)
Energy functional. This returns the energy (less delta function terms) in the form:
VEXTERNC Vrc_Codes Vfetk_loadMesh(Vfetk *thee, double center[3], double length[3], Vfetk_MeshLoad meshType, Vio *sock)
Loads a mesh into the Vfetk (and associated) object(s).
VEXTERNC void Vfetk_externalUpdateFunction(SS **simps, int num)
External hook to simplex subdivision routines in Gem. Called each time a simplex is subdivided (we us...
VEXTERNC void Vfetk_PDE_initFace(PDE *thee, int faceType, int chart, double tnvec[])
Do once-per-face initialization.
VEXTERNC void Vfetk_PDE_initElement(PDE *thee, int elementType, int chart, double tvx[][VAPBS_DIM], void *data)
Do once-per-element initialization.
VEXTERNC int Vfetk_PDE_simplexBasisInit(int key, int dim, int comp, int *ndof, int dof[])
Initialize the bases for the trial or the test space, for a particular component of the system,...
VEXTERNC void Vfetk_dtor(Vfetk **thee)
Object destructor.
VEXTERNC void Vfetk_PDE_dtor(PDE **thee)
Destroys FEtk PDE object.
VEXTERNC int Vfetk_getAtomColor(Vfetk *thee, int iatom)
Get the partition information for a particular atom.
VEXTERNC void Vfetk_PDE_delta(PDE *thee, int type, int chart, double txq[], void *user, double F[])
Evaluate a (discretized) delta function source term at the given point.
VEXTERNC void Vfetk_PDE_mapBoundary(int dim, int dimII, int vertexType, int chart, double vx[VAPBS_DIM])
Map a boundary point to some pre-defined shape.
enum eVfetk_GuessType Vfetk_GuessType
Declare FEMparm_GuessType type.
VEXTERNC void Bmat_printHB(Bmat *thee, char *fname)
Writes a Bmat to disk in Harwell-Boeing sparse matrix format.
VEXTERNC double Vfetk_PDE_Fu_v(PDE *thee, int key, double V[], double dV[][VAPBS_DIM])
This is the weak form of the PBE; i.e. the strong form integrated with a test function to give:
VEXTERNC void Vfetk_PDE_simplexBasisForm(int key, int dim, int comp, int pdkey, double xq[], double basis[])
Evaluate the bases for the trial or test space, for a particular component of the system,...
VEXTERNC Gem * Vfetk_getGem(Vfetk *thee)
Get a pointer to the Gem (grid manager) object.
VEXTERNC Vrc_Codes Vfetk_loadGem(Vfetk *thee, Gem *gm)
Load a Gem geometry manager object into Vfetk.
VEXTERNC void Vfetk_PDE_u_D(PDE *thee, int type, int chart, double txq[], double F[])
Evaluate the Dirichlet boundary condition at the given point.
VEXTERNC double Vfetk_dqmEnergy(Vfetk *thee, int color)
Get the "mobile charge" and "polarization" contributions to the electrostatic energy.
VEXTERNC void Vfetk_PDE_bisectEdge(int dim, int dimII, int edgeType, int chart[], double vx[][VAPBS_DIM])
Define the way manifold edges are bisected.
VEXTERNC unsigned long int Vfetk_memChk(Vfetk *thee)
Return the memory used by this structure (and its contents) in bytes.
VEXTERNC double * Vfetk_getSolution(Vfetk *thee, int *length)
Create an array containing the solution (electrostatic potential in units of ) at the finest mesh lev...
VEXTERNC void Vfetk_PDE_initAssemble(PDE *thee, int ip[], double rp[])
Do once-per-assembly initialization.
eVfetk_MeshLoad
Mesh loading operation.
VEXTERNC Vrc_Codes Vfetk_genCube(Vfetk *thee, double center[3], double length[3], Vfetk_MeshLoad meshType)
Construct a rectangular mesh (in the current Vfetk object)
VEXTERNC PDE * Vfetk_PDE_ctor(Vfetk *fetk)
Constructs the FEtk PDE object.
VEXTERNC void Vfetk_PDE_dtor2(PDE *thee)
FORTRAN stub: destroys FEtk PDE object.
enum eVfetk_NsolvType Vfetk_NsolvType
Declare FEMparm_NsolvType type.
VEXTERNC void Vfetk_PDE_initPoint(PDE *thee, int pointType, int chart, double txq[], double tU[], double tdU[][VAPBS_DIM])
Do once-per-point initialization.
VEXTERNC int Vfetk_PDE_ctor2(PDE *thee, Vfetk *fetk)
Intializes the FEtk PDE object.
VEXTERNC void Vfetk_dtor2(Vfetk *thee)
FORTRAN stub object destructor.
VEXTERNC double Vfetk_qfEnergy(Vfetk *thee, int color)
Get the "fixed charge" contribution to the electrostatic energy.
VEXTERNC Vcsm * Vfetk_getVcsm(Vfetk *thee)
Get a pointer to the Vcsm (charge-simplex map) object.
VPUBLIC double Vfetk_energy(Vfetk *thee, int color, int nonlin)
Return the total electrostatic energy.
VEXTERNC Vpbe * Vfetk_getVpbe(Vfetk *thee)
Get a pointer to the Vpbe (PBE manager) object.
VEXTERNC int Vfetk_fillArray(Vfetk *thee, Bvec *vec, Vdata_Type type)
Fill an array with the specified data.
VEXTERNC void Vfetk_PDE_Fu(PDE *thee, int key, double F[])
Evaluate strong form of PBE. For interior points, this is:
VEXTERNC int Vfetk_ctor2(Vfetk *thee, Vpbe *pbe, Vhal_PBEType type)
FORTRAN stub constructor for Vfetk object.
eVfetk_NsolvType
Non-linear solver type.
VEXTERNC double Vfetk_PDE_DFu_wv(PDE *thee, int key, double W[], double dW[][VAPBS_DIM], double V[], double dV[][VAPBS_DIM])
This is the linearization of the weak form of the PBE; e.g., for use in a Newton iteration....
VEXTERNC void Vfetk_PDE_u_T(PDE *thee, int type, int chart, double txq[], double F[])
Evaluate the "true solution" at the given point for comparison with the numerical solution.
enum eVfetk_LsolvType Vfetk_LsolvType
Declare FEMparm_LsolvType type.
VEXTERNC void Vfetk_setAtomColors(Vfetk *thee)
Transfer color (partition ID) information frmo a partitioned mesh to the atoms.
eVfetk_PrecType
Preconditioner type.
VEXTERNC void Vfetk_PDE_oneChart(int dim, int dimII, int objType, int chart[], double vx[][VAPBS_DIM], int dimV)
Unify the chart for different coordinate systems – a no-op for us.
VEXTERNC void Vfetk_readMesh(Vfetk *thee, int skey, Vio *sock)
Read in mesh and initialize associated internal structures.
VEXTERNC AM * Vfetk_getAM(Vfetk *thee)
Get a pointer to the AM (algebra manager) object.
VEXTERNC void Vfetk_dumpLocalVar()
Debugging routine to print out local variables used by PDE object.
VEXTERNC void Vfetk_setParameters(Vfetk *thee, PBEparm *pbeparm, FEMparm *feparm)
Set the parameter objects.
eVfetk_GuessType
Initial guess type.
enum eVfetk_PrecType Vfetk_PrecType
Declare FEMparm_GuessType type.
enum eVdata_Format Vdata_Format
Declaration of the Vdata_Format type as the Vdata_Format enum.
#define VAPBS_NVS
Number of vertices per simplex (hard-coded to 3D)
#define MAXION
The maximum number of ion species that can be involved in a single PBE calculation.
enum eVhal_PBEType Vhal_PBEType
Declaration of the Vhal_PBEType type as the Vhal_PBEType enum.
enum eVdata_Type Vdata_Type
Declaration of the Vdata_Type type as the Vdata_Type enum.
#define VAPBS_DIM
Our dimension.
Contains declarations for class PBEparm.
Parameter structure for FEM-specific variables from input files.
Parameter structure for PBE variables from input files.
Charge-simplex map class.
double dU[MAXV][VAPBS_DIM]
Contains public data members for Vfetk class/module.
Contains public data members for Vgreen class/module.
Contains public data members for Vpbe class/module.
Contains declarations for class Vatom.
Contains declarations for class Vcap.
Contains declarations for the Vcsm class.
Contains declarations for class Vgreen.
Contains generic macro definitions for APBS.
Contains declarations for class Vpbe.
Contains a collection of useful constants and conversion factors.