Debian Codegraph @

texmf-dist/doc/metapost/metauml/manual/fig/test_lars_issues.mp

raw
1 input metauml;
2
3 numeric u;
4 u = 1.3cm;
5
6 beginfig(1);
7
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9
10 Class.ElLocSysAcc("ElementLocalSystemAcceptor")
11 ()
12 ("+startElementAssebly()",
13 "+assembleElementLocalMatrix(k: KeyType, mat: LocalMatrixType, a: AssembleAction)",
14 "+assembleElementLocalRHS(k: KeyType, rhs: LocalRHSType, a: AssembleAction)",
15 "+endElementAssembly()");
16
17 classStereotypes.ElLocSysAcc("<<interface>>");
18 ClassTemplate.TEl("KeyType: typename")(ElLocSysAcc);
19
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
22 Class.FaceLocSysAcc("FaceLocalSystemAcceptor")
23 ()
24 ("+startFaceAssebly()",
25 "+assembleFaceLocalMatrix(k1: KeyType, k2: KeyType, mat: LocalMatrixType, a: AssembleAction)",
26 "+assembleFaceLocalRHS(k: KeyType, rhs: LocalRHSType, a: AssembleAction)",
27 "+endFaceAssembly()");
28
29 classStereotypes.FaceLocSysAcc("<<interface>>");
30 ClassTemplate.TFa("KeyType: typename")(FaceLocSysAcc);
31
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33
34 Class.SolProvider("SolutionProvider")
35 ()
36 ("+startSortBack()",
37 "+getLocalSolution(k: KeyType, sol: LocalSolutionType)",
38 "+endSortBack()");
39
40 classStereotypes.SolProvider("<<interface>>");
41 ClassTemplate.TSol("KeyType: typename")(SolProvider);
42
43 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44
45 % now inherit from these for LapackMatrixSorter
46 Class.LapackMS("LapackMatrixSorter")
47 ("-indMan: IndexManager",
48 "-A: LaGenMatDouble&",
49 "-x: LaVectorDouble&",
50 "-b: LaVectorDouble&"
51 )
52 ("+startElementAssembly()");
53
54 ClassTemplate.TLap("KeyType: typename", "IndexManager: class")(LapackMS);
55
56 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57
58 % where to draw these:
59 FaceLocSysAcc.nw = ElLocSysAcc.ne + (1.5u, 0);
60 SolProvider.nw = FaceLocSysAcc.ne + (1.5u, 0);
61 LapackMS.n = FaceLocSysAcc.s + (0, -3u);
62
63 drawObjects(ElLocSysAcc, TEl, FaceLocSysAcc, TFa,
64 SolProvider, TSol, LapackMS, TLap);
65
66 % 50: how much should the path raise upwards before making a horizontal turn.
67 link(inheritance)(pathStepY(LapackMS.n, FaceLocSysAcc.s, 50));
68 link(inheritance)(pathStepY(LapackMS.n, SolProvider.s, 50));
69 link(inheritance)(pathStepY(LapackMS.n, ElLocSysAcc.s, 50));
70
71 endfig;
72
73 beginfig(2);
74 Begin.b;
75 Activity.A("Activity A", "on line two");
76 Activity.B("Activity B");
77 End.e;
78
79 % or other positioning code...
80 setObjectJoin(pa.s = pb.n + (0,20));
81 joinObjects(b, A, B, e);
82
83 % important: first draw the activities
84 drawObjects(b, A, B, e);
85
86 % you can now draw the transitions
87 clink(transition)(b, A);
88 clink(transition)(A, B);
89 link(transition)(pathStepX(B.e, e.e, 30));
90
91 item(iGuard)("guard")(obj.sw = .5[b.s, A.n]);
92 endfig;
93
94 end;