Reading From the PROPHET Database
Convenience Routines:
[See PDE/Fluxes/coeffs.c.]
- real tcoeff (char* name)
Get /library/physics/name
Examples:
- kTq = tcoeff ("kTq");
- rtn = tcoeff ("silicon/sqrt_n/dirichlet.oxide");
- real rcoeff (char* name, int ireg)
Get /library/physics/region/name
Examples:
- ni = rcoeff ("ni-sze", *ireg);
- dix = rcoeff ("electrons/Dix", *ireg);
- real rscoeff (char* name, int ivar, int ireg)
Get /library/physics/region/var/name
Examples:
- dix = rscoeff ("Dix", ic, *ireg);
- real rscoeff2 (char* name, int ivar1, int ivar2, int ireg)
Get /library/physics/region/var1/name.var2
Examples:
- mu = rscoeff2 ("driftco", mdep[0], mdep[1], *ireg);
- kf = rscoeff2( "kf.cluster", msol[0], msol[1], *ireg);
- real rscoeff3 (char* name, int ivar1, int ivar2, int ivar3, int ireg)
Get /library/physics/region/var1/name.var2.var3
Examples:
- kf = rscoeff3 (kf.two2one", mdep[2], mdep[0], mdep[1], *ireg);
- kr = rscoeff3 (kr.two2one", mdep[2], mdep[0], mdep[1], *ireg);
- int reserve_coeff (char* name, real **array, domain *dom, int ireg, int ivar, int *map, int promote)
Store a local array of values:
If region & field dependent, array[ireg][ivar] = /library/physics/region/var/name
If only region dependent, array[ireg] = /library/physics/region/name
If not dependent, *array = /library/physics/name
Examples:
- reserve_coeff ("ni-sze", &nis, PDEdom, *ireg, -1, (int*)0, 0);
- reserve_coeff ("Dix", &Dix, dom, *ireg, is, msol, 0);
Other Database Access Routines:
- property* findDB (char* name, int flag);
If flag == 0, print error message if property is not found.
- property* get_local_property (char* name, plist* list);
- property* get_property (char* name, plist* list);
- property* find_property (char* path, plist* list);
- int evalcoeff (property *prop, real *value)
Evaluate property *prop from the database; return the
real number in value
- property* matco (char* name, int ivar, int ireg, domain* dom)
Get property /library/physics/region/var/name.
- property* matcon (char* name, char* svar, int ireg, domain* dom)
Get property /library/physics/region/var/name.
- real rmatco (char* name, int ivar, int ireg, domain* dom)
Get real value /library/physics/region/var/name.
- real rmatcon (char* name, char* svar, int ireg, domain* dom)
Get real value /library/physics/region/var/name.
Database Structures:
- property
enum type (pINT, pREAL, pSTRING, pliST, pIARRAY, pRARRAY)
union val (ival, rval, sval, lval, iaval, raval)
char *xfile (file where iarray or rarray data are stored)
- plist
plist *parent
int nalloc
char *names[] -->{"name1", "name2", "name3"}
int nused
char *props[] -->{"prop1", "prop2", "prop3"}
- rarray
int dim
int *bound -->{2, 3}
real data --> {{1.0, 14.0, 42.0}, {57.0, 57.0, 57.0}}