Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mmclab selftest script to test incomplete inputs
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
%%----------------------------------------------------------------- | ||
%% MMClab self-test script | ||
%%----------------------------------------------------------------- | ||
% | ||
% In this example, we generate various true or false input conditions | ||
% and test the robustness of the script to these conditions | ||
% | ||
|
||
dat=mmclab(); | ||
|
||
cfg=struct(); | ||
dat=mmclab(cfg); | ||
|
||
[cfg.node face cfg.elem]=meshabox([0 0 0], [10 10 10],1); | ||
dat=mmclab(cfg); | ||
|
||
cfg.elem(:,5)=1; | ||
dat=mmclab(cfg); | ||
|
||
cfg.srcpos=[5 5 0]; | ||
cfg.srcdir=[0 0 1]; | ||
cfg.nphoton=1000; | ||
cfg.prop=[0 0 1 1;0.1 1 0.2 1.3]; | ||
dat=mmclab(cfg); | ||
|
||
cfg.tstart=0; | ||
cfg.tend=1e-9; | ||
dat=mmclab(cfg); | ||
|
||
cfg.tstep=10e-9; | ||
dat=mmclab(cfg); | ||
|
||
cfg.srcpos=[-1 -1 -1]; | ||
dat=mmclab(cfg); | ||
|
||
cfg.srcparam1=[0 0 0 0]; | ||
cfg.srcparam2=[0 0 0 0]; | ||
dat=mmclab(cfg); |