nix
This commit is contained in:
parent
c2d50185cc
commit
ae0e19baf9
2 changed files with 31 additions and 1 deletions
|
|
@ -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 -----
|
||||||
|
|
|
||||||
29
solid-cpp/visualize_results.m
Normal file
29
solid-cpp/visualize_results.m
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue