1 ## Copyright (C) 2004-2008 Carlo de Falco, Massimiliano Culpo
3 ## This file is part of
5 ## FPL - Fem PLotting package for octave
7 ## FPL is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation; either version 2 of the License, or
10 ## (at your option) any later version.
12 ## FPL is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
17 ## You should have received a copy of the GNU General Public License
18 ## along with FPL; If not, see <http://www.gnu.org/licenses/>.
22 ## Carlo de Falco <cdf _AT_ users.sourceforge.net>
25 ## Bergische Universitaet Wuppertal
26 ## Fachbereich C - Mathematik und Naturwissenschaften
27 ## Arbeitsgruppe fuer Angewandte MathematD-42119 Wuppertal Gaussstr. 20
28 ## D-42119 Wuppertal, Germany
31 ## @deftypefn {Function File} {} FPL2trsptcsurf (@var{mesh1}, @
32 ## @var{color1}, @var{data1}, [@var{mesh2}, @var{color2}, @var{data2}])
34 ## Plots the transient scalar fields @var{data} defined on the triangulation
35 ## @var{mesh} using opendx. Connections are rendered as defined by
41 ## FPL2trspdesurf(mesh1,"blue",data1, mesh2,"red",data2)
44 ## @seealso{FPL2pdesurf, FPL2ptcsurf, FPL2trspdesurf}
47 function FPL2trsptcsurf(varargin)
53 seriesend = columns(varargin{ii+2});
54 dataname = mktemp("/tmp",".dx");
55 colorname = varargin{ii+1};
56 FPL2dxoutputtimeseries(dataname, varargin{ii}.p, varargin{ii}.t, \
57 varargin{ii+2}, "dataseries", 0, 1, \
59 datalist = strcat(datalist, """", dataname ,"""");
60 colorlist = strcat(colorlist, """", colorname, """");
63 scriptname = mktemp("/tmp",".net");
65 view = file_in_path(path,"FPL2trsptcsurf.net");
67 system (["cp " view " " scriptname]);
68 system (["sed -i \'s|""FILELIST""|" datalist "|g\' " scriptname]);
69 system (["sed -i \'s|""COLORLIST""|" colorlist "|g\' " scriptname]);
71 command = ["dx -noConfirmedQuit -program " scriptname " -execute -image >& /dev/null & "];
75 function filename = mktemp (direct,ext);
77 if (~exist(direct,"dir"))
78 error("Trying to save temporary file to non existing directory")
84 filename = [direct,"/FPL.",num2str(floor(rand*1e7)),ext];
85 if ~exist(filename,"file")