summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_lars_issues.mp
blob: 607ef54c9098fbeaa93efecdb8f6c190d5a818ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
input metauml;

numeric u;
u = 1.3cm;

beginfig(1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Class.ElLocSysAcc("ElementLocalSystemAcceptor")
()
("+startElementAssebly()", 
 "+assembleElementLocalMatrix(k: KeyType, mat: LocalMatrixType, a: AssembleAction)",
 "+assembleElementLocalRHS(k: KeyType, rhs: LocalRHSType, a: AssembleAction)", 
 "+endElementAssembly()");

classStereotypes.ElLocSysAcc("<<interface>>");
ClassTemplate.TEl("KeyType: typename")(ElLocSysAcc);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 Class.FaceLocSysAcc("FaceLocalSystemAcceptor")
 ()
 ("+startFaceAssebly()", 
  "+assembleFaceLocalMatrix(k1: KeyType, k2: KeyType, mat: LocalMatrixType, a: AssembleAction)",
  "+assembleFaceLocalRHS(k: KeyType, rhs: LocalRHSType, a: AssembleAction)", 
  "+endFaceAssembly()");

 classStereotypes.FaceLocSysAcc("<<interface>>");
 ClassTemplate.TFa("KeyType: typename")(FaceLocSysAcc);

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 Class.SolProvider("SolutionProvider")
 ()
 ("+startSortBack()", 
  "+getLocalSolution(k: KeyType, sol: LocalSolutionType)",
  "+endSortBack()");

 classStereotypes.SolProvider("<<interface>>");
 ClassTemplate.TSol("KeyType: typename")(SolProvider);

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 % now inherit from these for LapackMatrixSorter
 Class.LapackMS("LapackMatrixSorter")
 ("-indMan: IndexManager",
  "-A: LaGenMatDouble&",
  "-x: LaVectorDouble&",
  "-b: LaVectorDouble&"
 )
 ("+startElementAssembly()");

 ClassTemplate.TLap("KeyType: typename", "IndexManager: class")(LapackMS);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% where to draw these:
FaceLocSysAcc.nw = ElLocSysAcc.ne + (1.5u, 0);
SolProvider.nw = FaceLocSysAcc.ne + (1.5u, 0);
LapackMS.n = FaceLocSysAcc.s + (0, -3u);

drawObjects(ElLocSysAcc, TEl, FaceLocSysAcc, TFa, 
  SolProvider, TSol, LapackMS, TLap);

% 50: how much should the path raise upwards before making a horizontal turn.
link(inheritance)(pathStepY(LapackMS.n, FaceLocSysAcc.s, 50));
link(inheritance)(pathStepY(LapackMS.n, SolProvider.s, 50));
link(inheritance)(pathStepY(LapackMS.n, ElLocSysAcc.s, 50));

endfig;

beginfig(2);
  Begin.b;
  Activity.A("Eat something good", "from the kitchen");
  Activity.B("Read a book");
  End.e;

  % or other positioning code...
  setObjectJoin(pa.s = pb.n + (0,20));
  joinObjects(b, A, B, e);

  % important: first draw the activities
  drawObjects(b, A, B, e);

  % you can now draw the transitions
  clink(transition)(b, A);
  clink(transition)(A, B);
  link(transition)(pathStepX(B.e, e.e, 30));

  item(iGuard)("foo")(obj.sw = .5[b.s, A.n]);
endfig;

end;