make testsuite compatible to sse-engine
parent
3cb9189f90
commit
7e2bdc67e2
|
@ -4,7 +4,7 @@ physical_constants;
|
|||
|
||||
|
||||
ENABLE_PLOTS = 1;
|
||||
CLEANUP = 0; % if enabled and result is PASS, remove simulation folder
|
||||
CLEANUP = 1; % if enabled and result is PASS, remove simulation folder
|
||||
STOP_IF_FAILED = 1; % if enabled and result is FAILED, stop with error
|
||||
|
||||
% LIMITS
|
||||
|
@ -24,6 +24,7 @@ f_stop = 1e9;
|
|||
Sim_Path = 'tmp';
|
||||
Sim_CSX = 'coax.xml';
|
||||
|
||||
[status,message,messageid]=rmdir(Sim_Path,'s');
|
||||
[status,message,messageid]=mkdir(Sim_Path);
|
||||
|
||||
%setup FDTD parameter
|
||||
|
@ -37,6 +38,7 @@ CSX = InitCSX();
|
|||
mesh.x = -2.5*mesh_res(1)-coax_rad_aa : mesh_res(1) : coax_rad_aa+2.5*mesh_res(1);
|
||||
mesh.y = mesh.x;
|
||||
mesh.z = 0 : mesh_res(3) : length;
|
||||
mesh.z = linspace(0,length,numel(mesh.z) + 4-mod(numel(mesh.z),4)); % make it compatible with sse-engine
|
||||
CSX = DefineRectGrid(CSX, 1e-3,mesh);
|
||||
|
||||
%create copper
|
||||
|
@ -67,14 +69,14 @@ weight{3} = 0;
|
|||
CSX = SetExcitationWeight(CSX, 'excite', weight );
|
||||
CSX = AddCylindricalShell(CSX,'excite',0 ,start,stop,0.5*(coax_rad_i+coax_rad_ai),(coax_rad_ai-coax_rad_i));
|
||||
|
||||
%dump
|
||||
CSX = AddDump(CSX,'Et_',0,2);
|
||||
start = [mesh.x(1) , 0 , mesh.z(1)];
|
||||
stop = [mesh.x(end) , 0 , mesh.z(end)];
|
||||
CSX = AddBox(CSX,'Et_',0 , start,stop);
|
||||
|
||||
CSX = AddDump(CSX,'Ht_',1,2);
|
||||
CSX = AddBox(CSX,'Ht_',0,start,stop);
|
||||
% %dump
|
||||
% CSX = AddDump(CSX,'Et_',0,2);
|
||||
% start = [mesh.x(1) , 0 , mesh.z(1)];
|
||||
% stop = [mesh.x(end) , 0 , mesh.z(end)];
|
||||
% CSX = AddBox(CSX,'Et_',0 , start,stop);
|
||||
%
|
||||
% CSX = AddDump(CSX,'Ht_',1,2);
|
||||
% CSX = AddBox(CSX,'Ht_',0,start,stop);
|
||||
|
||||
%voltage calc
|
||||
CSX = AddProbe(CSX,'ut1',0);
|
||||
|
@ -145,7 +147,7 @@ end
|
|||
|
||||
|
||||
if pass && CLEANUP
|
||||
rmdir( [Sim_Path '/' Sim_CSX], 's' );
|
||||
rmdir( Sim_Path, 's' );
|
||||
end
|
||||
if ~pass && STOP_IF_FAILED
|
||||
error 'test failed';
|
||||
|
|
|
@ -4,7 +4,7 @@ physical_constants;
|
|||
|
||||
|
||||
ENABLE_PLOTS = 1;
|
||||
CLEANUP = 0; % if enabled and result is PASS, remove simulation folder
|
||||
CLEANUP = 1; % if enabled and result is PASS, remove simulation folder
|
||||
STOP_IF_FAILED = 1; % if enabled and result is FAILED, stop with error
|
||||
|
||||
% LIMITS - inside
|
||||
|
@ -34,6 +34,7 @@ f_stop = 10e9;
|
|||
Sim_Path = 'tmp';
|
||||
Sim_CSX = 'cavity.xml';
|
||||
|
||||
[status,message,messageid]=rmdir(Sim_Path,'s');
|
||||
[status,message,messageid]=mkdir(Sim_Path);
|
||||
|
||||
%setup FDTD parameter
|
||||
|
@ -44,10 +45,13 @@ FDTD = SetBoundaryCond(FDTD,BC);
|
|||
|
||||
%setup CSXCAD geometry
|
||||
CSX = InitCSX();
|
||||
grid_res = 2e-3;
|
||||
mesh.x = 0:grid_res:a; %linspace(0,a,25);
|
||||
mesh.y = 0:grid_res:b; %linspace(0,b,25);
|
||||
mesh.z = 0:grid_res:d; %linspace(0,d,25);
|
||||
% grid_res = 2e-3;
|
||||
% mesh.x = 0:grid_res:a; %linspace(0,a,25);
|
||||
% mesh.y = 0:grid_res:b; %linspace(0,b,25);
|
||||
% mesh.z = 0:grid_res:d; %linspace(0,d,25);
|
||||
mesh.x = linspace(0,a,26);
|
||||
mesh.y = linspace(0,b,11);
|
||||
mesh.z = linspace(0,d,32);
|
||||
CSX = DefineRectGrid(CSX, 1,mesh);
|
||||
|
||||
% excitation
|
||||
|
@ -205,7 +209,7 @@ end
|
|||
|
||||
|
||||
if pass && CLEANUP
|
||||
rmdir( [Sim_Path '/' Sim_CSX], 's' );
|
||||
rmdir( Sim_Path, 's' );
|
||||
end
|
||||
if ~pass && STOP_IF_FAILED
|
||||
error 'test failed';
|
||||
|
|
|
@ -3,8 +3,10 @@ function invoke_openEMS( opts )
|
|||
if nargin < 1
|
||||
opts = '';
|
||||
end
|
||||
% openEMS_opts = [openEMS_opts ' --disable-dumps'];
|
||||
% openEMS_opts = [openEMS_opts ' --debug-material'];
|
||||
% opts = [opts ' --disable-dumps'];
|
||||
% opts = [opts ' --debug-material'];
|
||||
% opts = [opts ' --engine=multithreaded'];
|
||||
% opts = [opts ' --engine=sse'];
|
||||
|
||||
filename = mfilename('fullpath');
|
||||
dir = fileparts( filename );
|
||||
|
|
Loading…
Reference in New Issue