#ifndef _2d_FE_H #define _2d_FE_H // A header file defining the data-structures // that we will use. typedef struct { double x,y; } Point; typedef struct { Point p; //coordinates double attribute; int bdmarker; } Node; typedef struct { int points[2]; int bdmarker; } Edge; // I've hardcoded the number of nodes per element to 3. // One should allow 6 nodes per element if one wishes // to use the Triangle -o2 option for quadratic elements. typedef struct { int vertices[3]; double attribute; } Element; // The GLOBAL VARIABLES: int num_nodes; int num_edges; int num_elements; Node *nodes = NULL; Edge *edges = NULL; Element *elements = NULL; bool mesh_initialized = false; #endif