Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** @file */
- #ifndef INDICES_H
- #define INDICES_H
- /* This file contains all functions relevant for indices calculations */
- #define N_POINTS_COARSE 3;
- #define N_POINTS_FINE 6;
- /**
- * Enumerator specifying valid grid types.
- */
- typedef enum {GRID_TYPE_COARSE, /*!< The coarse grid used for linear ansatz functions */
- GRID_TYPE_FINE /*!< The coarse grid used for quadratic ansatz functions */
- } grid_type;
- typedef enum {W,N,NE,E,S,SW} neighbour_type;
- /**
- * Enumerator specifying types of rectangles
- */
- typedef enum {RECT_TYPE_TOP, /*!< The rectangle with a tip pointing downwards */
- RECT_TYPE_BOTTOM /*!< The rectangle with a tip pointing upwards */
- } elem_type;
- int get_local_index(int glob_index,
- int elem_index,
- int elems_x,
- grid_type grid);
- void get_node_indices(int elem_index,
- int elems_x,
- int *indices,
- grid_type grid);
- void get_ele_indices(int node_index, int elems_x, int elems_y, int *elems, grid_type grid);
- void abs_2_coord(int glob_index, int elems_x, int *coord, grid_type grid);
- int coord_2_abs(int coord_x, int coord_y, int elems_x, grid_type grid);
- void elem_abs_2_coord(int elem_index, int elems_x, int *coord);
- int elem_coord_2_abs(int coord_x, int coord_y, int elems_x);
- void get_affected_elems_coarse(int coord_x, int coord_y, int elems_x, int elems_y, int *elems, grid_type grid);
- int validated_elem_coord_2_abs(int coord_x, int coord_y, int elems_x, int elems_y, grid_type grid);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement