2010-06-21 10:17:19 +00:00
|
|
|
function invoke_openEMS( opts , logfile)
|
2010-06-09 07:22:54 +00:00
|
|
|
% function invoke_openEMS( opts )
|
|
|
|
%
|
|
|
|
% internal method to invoke openEMS, use RunOpenEMS instead
|
|
|
|
%
|
|
|
|
% See also RunOpenEMS
|
|
|
|
%
|
|
|
|
% openEMS matlab interface
|
|
|
|
% -----------------------
|
|
|
|
% author: Sebastian Held
|
2010-05-03 20:09:40 +00:00
|
|
|
|
|
|
|
if nargin < 1
|
|
|
|
error 'specify the xml file to simulate'
|
|
|
|
end
|
|
|
|
|
|
|
|
% opts = [opts ' --disable-dumps'];
|
|
|
|
% opts = [opts ' --debug-material'];
|
|
|
|
% opts = [opts ' --debug-boxes'];
|
|
|
|
% opts = [opts ' --engine=sse'];
|
|
|
|
% opts = [opts ' --engine=multithreaded'];
|
|
|
|
|
|
|
|
filename = mfilename('fullpath');
|
|
|
|
dir = fileparts( filename );
|
|
|
|
openEMS_Path = [dir filesep '..' filesep];
|
|
|
|
|
|
|
|
if isunix
|
|
|
|
openEMS_Path = [openEMS_Path 'openEMS.sh'];
|
|
|
|
else
|
|
|
|
openEMS_Path = [openEMS_Path 'openEMS'];
|
|
|
|
end
|
|
|
|
|
|
|
|
command = [openEMS_Path ' ' opts];
|
2010-06-21 10:17:19 +00:00
|
|
|
|
|
|
|
if (isunix && nargin>1)
|
|
|
|
command = [command ' 2>&1 | tee ' logfile];
|
|
|
|
end
|
|
|
|
|
2010-05-03 20:09:40 +00:00
|
|
|
disp( ['invoking openEMS simulator: ' command] );
|
|
|
|
system(command);
|