2 % Base
class for all grid classes
7 nelements; % number of overall elements (
leaf + nonleaf)
9 nvertices; % number of vertices
11 nneigh; % number of neighbor elements
13 A; % vector of element area
15 Ainv; % vector of inverted element area
17 % matrix of vertex indices: 'VI(i,j)' is the global index of
18 % 'j'-th vertex of element 'i'
21 X; % vector of vertex x-coordinates
23 Y; % vector of vertex y-coordinates
25 CX; % vector of centroid x-values
27 CY; % vector of centroid y-values
29 % 'NBI(i,j)' = element index of 'j'-th neighbour of element 'i'
30 % boundary faces are set to -1 or negative values are requested
31 % by 'params.boundary_type'
34 % 'INB(i,j)' = local edge number in 'NBI(i,j)' leading from
35 % element 'NBI(i,j)' to element 'i', i.e. satisfying
36 % 'NBI(NBI(i,j), INB(i,j)) = i'
39 % 'EL(i,j)' = length of edge from element 'i' to neighbour 'j'
42 % 'DC(i,j)' = distance from centroid of element 'i' to NB 'j'
43 % for boundary elements, this is the distance to the reflected
44 % element (for use in boundary treatment)
47 % 'NX(i,j)' = x-coordinate of unit outer normal of edge from el
51 % 'NY(i,j)' = y-coordinate of unit outer normal of edge from el
55 % 'ECX(i,j)' = x-coordinate of midpoint of edge from el 'i' to
59 % 'ECY(i,j)' = x-coordinate of midpoint of edge from el 'i' to
63 % vector of x-coordinates of point `S_i` (for rect: identical to
66 % for diffusion-discretization with FV-schemes, points `S_i`
67 % must exist, such that `S_i S_j` is perpendicular to edge `i j`
68 % the intersection are denoted `S_ij`
71 % vector of y-coordinates of point `S_i` (for rect: identical to
74 % for diffusion-discretization with FV-schemes, points `S_i`
75 % must exist, such that `S_i S_j` is perpendicular to edge `i j`
76 % the intersection are denoted `S_ij`
79 % 'ESX(i,j)' = x-coordinate of point `S_ij` on edge el 'i' to
83 % 'ESY(i,j)' = x-coordinate of point `S_ij` on edge el 'i' to
87 % 'DS(i,j)' = distance from `S_i` of element 'i' to `S_j` of NB
88 % 'j' for boundary elements, this is the distance to the
89 % reflected element (for use in boundary treatment)
92 hmin; % minimal element-diameter
94 % geometry bound (simultaneously satisfying
95 % ``\alpha h_i^d \leq A(T_i),``
96 % ``\alpha \text{diam}(T_i) \leq h_i^{d-1}`` and
97 % ``\alpha h_i \leq \text{distance(midpoint i to any neighbour)}``
100 % Jacobian inverse transposed
'JIT(i,:,:)' is a
'2x2'-matrix of
101 % the Jacobian Inverse Transposed on element
'i'
113 res = check_consistency(grid);
117 F = edge_quad_eval(grid,elids,edgeids,degree,FF);
119 F = edge_quad_eval_mean(grid,elids,edgeids,degree,FF);
121 PP = edge_quad_points(grid,elids,edgeids,degree);
123 [P1, P2] = get_edge_points(grid,elids,edgeids);
125 ENBI = get_enbi(grid, edge, tstep);
127 gridp=gridpart(grid, eind);
129 inspect(grid, params);
131 p = plot_polygon_grid(grid,params);
133 p = plot_element_data(grid,data,plot_params);
135 plot_element_data_sequence(grid,data,plot_params);
137 p = plot_vertex_data(grid,data,params);
139 grid = set_boundary_types(grid,params);
146 % returns a deep copy
object of the grid implementation
148 % Every grid implementations needs to provide a deep copy method, because
149 % it is derived from a handle class.
152 % gcopy: Deep copy of type
gridbase.
Base class for all grid classes.