/* pde_read_ucd.h all variables and arrays named */ /* from pde_read_ucd.c just call pde_read_ucd(file_name); */ /* only one call per execution */ /* start with subscript 1, <=n_vertices etc. */ #ifndef PDE_READ_UCD_H_ #define PDE_READ_UCD_H_ #ifndef _MAIN_ #define GLOBAL extern #else /* _MAIN_ in main() before include */ #define GLOBAL #endif void pde_read_ucd(char * file_name); GLOBAL int n_vertices; // number of nodes GLOBAL int n_cells; // number of cells GLOBAL int n_ndata; // length of node data, zero if none (Dirichlet values) GLOBAL int n_cdata; // length of cell data, zero if none (Neumann values) GLOBAL int n_mdata; // number of model data, zero if none (4th vertex 4D) typedef struct {double x; double y; double z;} xyz; GLOBAL xyz * vert; typedef struct {int u; int i;} keys; GLOBAL keys * key; typedef struct {int i; int matl; int ctyp; int v[9];} cells; GLOBAL cells * cell; /* ctyp pt=1(1) line=2(2) tri=3(3) quad=4(4) tet=5(4) pyr=6(5) prism=7(6) hex=8(8) type number, vert */ /* node data, Dirichlet boundary values */ GLOBAL int nodecomp; GLOBAL char *nodes1, *nodes2, *nodes3; /* component names */ GLOBAL int noden1, noden2, noden3; /* component lengths, sum is n_ndata*/ GLOBAL double * dirichlet_bound; typedef struct {double dirichlet; double fourth;} d4; GLOBAL d4 * d4th; /* Dirchilet bound and 4th component of node */ /* cell_data, Neumann boundary values */ GLOBAL int cellcomp; GLOBAL char *cells1, *cells2, *cells3; /* component names */ GLOBAL int celln1, celln2, celln3; /* component lengths, sum is n_ndata */ GLOBAL double * neumann_bound; /* model_data, optional fourth coordinate for vertices */ GLOBAL int modelcomp; GLOBAL char *models1, *models2, *models3; /* component names */ GLOBAL int modeln1, modeln2, modeln3; /* component lengths, sum is n_mdata*/ GLOBAL double * fourth_dim; #endif /* PDE_READ_UCD_H_ */