506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
|
port_list = comp_ports(comp.type, comp.n_bonds)
endif
## but do what with it?
counter = 0;
n_ports = size(port_list,1)
if ((n_ports == 1) | ...
(strcmp(comp.type, "zero")) | (strcmp(comp.type, "one")))
## no ordering necessary
for [bond, bond_name] = comp
if (index(bond_name, "bond") == 1)
for [sub_bond, sub_bond_name] = bond
if (index(sub_bond_name, "subbond") == 1)
components(comp.index, ++counter) = sub_bond.index
endif
|
<
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
|
port_list = comp_ports(comp.type, comp.n_bonds)
endif
## but do what with it?
counter = 0;
n_ports = size(port_list,1)
if (strcmp(comp.type, "zero")) | (strcmp(comp.type, "one"))
for port = 1 : n_ports
component_type = comp.type
the_port_list = port_list
the_port = port
label = port_list(port,:)
if (index (label, "[") == 1)
label = mtt_strip_name(label)
endif
label = deblank(label)
for [bond, bond_name] = comp
if (index(bond_name, "bond") == 1)
for [sub_bond, sub_bond_name] = bond
if (index(sub_bond_name, "subbond") == 1)
sub_bond_label = sub_bond.label
if (index (sub_bond_label, "[") == 1)
sub_bond_label = mtt_strip_name(sub_bond_label)
endif
sub_bond_label = deblank(sub_bond_label)
if (strcmp(sub_bond_label, label) | strcmp (sub_bond_label,"in"))
components(comp.index, ++counter) = sub_bond.index
endif
endif
endfor
endif
endfor
endfor
elseif (n_ports == 1)
## no ordering necessary
for [bond, bond_name] = comp
if (index(bond_name, "bond") == 1)
for [sub_bond, sub_bond_name] = bond
if (index(sub_bond_name, "subbond") == 1)
components(comp.index, ++counter) = sub_bond.index
endif
|