jacobi.template
Loading...
Searching...
No Matches
square.m
Go to the documentation of this file.
1% Square:
2% flatpak run org.octave.Octave <filename>
3% or
4% octave --no-window-system --no-gui -qf <filename>
5
6clear all
7clc
8% %% L-shape
9% g=[2 0 2 0 0 1 0; % #vertices,v_1x, v_2x, v_1y, v_2y, subdomain_left, subdomain_right
10% 2 2 2 0 1 1 0;
11% 2 2 1 1 0.5 1 0;
12% 2 1 1 0.5 2 1 0;
13% 2 1 0 2 2 1 0;
14% 2 0 0 2 0 1 0]';
15
16%% square
17g=[2 0 1 0 0 1 0; % #vertices,v_1x, v_2x, v_1y, v_2y, subdomain_left, subdomain_right
18 2 1 1 0 1 1 0;
19 2 1 0 1 1 1 0;
20 2 0 0 1 0 1 0]';
21
22%[p,e,t] = initmesh(g,'hmax',0.01);
23[p,e,t] = initmesh(g,'hmax',0.5);
24pdemesh(p,e,t)
25
26%% GH
27% output from <https://de.mathworks.com/help/pde/ug/initmesh.html initmesh>
28%
29% coordinates p: [2][nnode]
30% connectivity t: [4][nelem] with t(4,:) are the subdomain numbers
31% edges e: [7][nedges] boundary edges
32% e([1,2],:) - start/end vertex of edge
33% e([3,4],:) - start/end values
34% e(5,:) - segment number
35% e([6,7],:) - left/right subdomain
36
37ascii_write_mesh( p, t, e, mfilename);
38
39
40
41% tmp=t(1:3,:)
42
function ascii_write_mesh(xc, ia, e, basename) % % Saves the 2D triangular mesh in the minimal way(only coordinates
tmp(:,:).'
function vertex connectivity
square g
Definition square.m:17
angle in trangle e
Definition square_bb_4.m:62
works correctly p(1, 15)
angle in trangle t
Definition square_bb_4.m:62