AdH Kraken 0.0.0
Next generation Adaptive Hydraulics
Loading...
Searching...
No Matches
snode.h
1#ifndef H_SNODE_
2#define H_SNODE_
3
4//+++++++++++++++++++++++++++++++++++++++++++++++++++++++//
5//+++++++++++++++++++++++++++++++++++++++++++++++++++++++//
6//+++++++++++++++++++++++++++++++++++++++++++++++++++++++//
7
8typedef struct {
9
10 int id; /* local id */
11 int string; /* string attached to node if there is one */
12 int edge_string; /* edge string associated with node if there is one */
13 int node_string; /* node string associated with node if there is one */
14 int original_id; /* original node number - UNSET_INT if not an original node -- different than global_node?*/
15 int parent[2]; /* (node_ladj/radj) when a node is adapted, it is averaged based on these two original nodes. */
16 int parent_res_pe[2]; /* (node_ladj/radj) when a node is adapted, it is averaged based on these two original nodes. */
17 int parent_res_id[2]; /* (node_ladj/radj) when a node is adapted, it is averaged based on these two original nodes. */
18 int level; /* the level of the node */
19 int block; /* which block a node is assigned */
20 int els_flag; /* ?? */
21 int bflag; /* boundary flag :: 0 = surface, 1 = bottom, 2 = sidewall (3d) */
22 double x, y, z; /* node cartesian postion */
23 double area; /* the total area of elements surrounded the node */
24
25 int nelems_connected; /* the total number of elements connected to this node */
26 int *elemID; /* an array of element IDs connected to this node */
27 int gid; /* (global_num) global id */
28 int global_surf_id; /* for winds/waves I/O global surface id = gid in 2D or UNSET_INT in 3D if not a surface node */
29 int global_bed_id; /* for sediment I/O global surface id = gid in 2D or UNSET_INT in 3D if not a bed node */
30
31 int myid; /* myid needed for node_order */
32 int resident_pe; /* (sd) owning processor */
33 int resident_id; /* (rnode) node number on OWNING precessor - if this is ghost, this will be different than calling node */
34
35 int *ghosted_arr; // array of n_ghosted that contains which PEs the local node is ghosted on
36 int n_ghosted;
37} SNODE;
38
39
40/*********************************************************/
41/* struct methods -------------------------------------- */
42void snode_alloc_array(SNODE **node, int nnodes);
43void snode_init(SNODE *);
44void snode_init_array(SNODE *, int);
45void snode_init_alloc_array(SNODE **node, int nnodes);
46void snode_copy(SNODE *, SNODE);
47void snode_copy_array(SNODE *, SNODE *, int);
48void snode_free(SNODE *);
49void snode_free_array(SNODE *node, int nnodes);
50void snode_printScreen(SNODE);
51void snode2svect(SNODE *nd, SVECT *v, int nnodes);
52void snode2svect2d(SNODE *nd, SVECT2D *v, int nnodes);
53
54/***********************************************************/
55/***********************************************************/
56/***********************************************************/
57
58#endif
Definition: snode.h:8
Definition: svect2d.h:4
Definition: svect.h:4