This commit is contained in:
dino.celebic 2026-01-27 20:35:12 +01:00
commit ae0e19baf9
2 changed files with 31 additions and 1 deletions

View file

@ -164,8 +164,9 @@ int main(int argc, char **argv )
for (int i = 0; i < numberOfVertices; ++i) for (int i = 0; i < numberOfVertices; ++i)
{ {
int nodeIndex = wetNodes[i]; int nodeIndex = wetNodes[i];
uv[nodeIndex] = temperature[i]; uv[nodeIndex] = temperature[i] - 273.15;
} }
mesh_c.Visualize(uv);
// ----- solve time step ----- // ----- solve time step -----

View file

@ -0,0 +1,29 @@
%% Visualize results
%
% flatpak run org.octave.Octave <filename>
% or
% octave --no-window-system --no-gui -qf <filename>
%
% or
% matlab -nosplash < <filename>
clear all
clc
%%
fname = 'uv.txt';
[xc,ia,v] = ascii_read_meshvector(fname);
%h = trisurf(ia, xc(:,1), xc(:,2), v);
figure;
h = patch('Faces', ia, 'Vertices', xc, 'FaceVertexCData', v, ...
'FaceColor', 'interp', 'EdgeColor', 'k');
axis equal tight;
colorbar;
colormap(jet);
% caxis([18 85]);
title('Heat distribution');
waitfor(h) % wait for closing the figure