Debian Codegraph @

packages/rol/example/PDE-OPT/0ld/elasticitySIMP_topologyOptimization/plotnodaldensity.m

raw
1 adj = load('cell_to_node_quad.txt') + 1; %% load node adjacency table, increment by 1 for 1-based indexing
2 nodes = load('nodes.txt'); %% load node coordinates
3
4 data_obj = importdata('density_nodal.txt', ' ', 2); %% we need to skip the first two lines
5 dens = data_obj.data;
6 figure
7 trisurf(adj, nodes(:,1), nodes(:,2), dens);
8 shading interp;
9 view(2);
10 axis tight;
11 xlabel('x');
12 ylabel('y');
13 title('Nodal density');