source: MML/trunk/at/simulator/element/drift.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 647 bytes
Line 
1function z = drift(fname,L,method)
2%DRIFT('FAMILYNAME',Length [m],'METHOD')
3%       creates a new family in the FAMLIST - a structure with fields
4%               FamName                 family name
5%               Length                  length[m]
6%               PassMethod              name of the function on disk to use for tracking
7% returns assigned address in the FAMLIST that is uniquely identifies
8% the family
9
10ElemData.FamName = fname;  % add check for identical family names
11ElemData.Length = L;
12ElemData.PassMethod=method;
13
14global FAMLIST
15z = length(FAMLIST)+1; % number of declare families including this one
16FAMLIST{z}.FamName = fname;
17FAMLIST{z}.NumKids = 0;
18FAMLIST{z}.KidsList= [];
19FAMLIST{z}.ElemData= ElemData;
20
21
Note: See TracBrowser for help on using the repository browser.