mirror of https://gitlab.com/pamhyr/pamhyr2
doc: dev: Update graphs.
parent
a81564e582
commit
ab2e307e3d
|
|
@ -97,35 +97,68 @@ simulation results to model data.
|
||||||
#+name: graph-architecture
|
#+name: graph-architecture
|
||||||
#+header: :results drawer
|
#+header: :results drawer
|
||||||
#+header: :exports results
|
#+header: :exports results
|
||||||
#+header: :post attr_wrap(width="9cm", data=*this*, name="graph-architecture", caption="Pamhyr2 Model/View architecture scheme (inspired by Qt Model/View architecture [[https://doc.qt.io/qt-5/model-view-programming.html]])", float="t")
|
#+header: :post attr_wrap(width="12cm", data=*this*, name="graph-architecture", caption="Pamhyr2 Model/View architecture scheme (inspired by Qt Model/View architecture [[https://doc.qt.io/qt-5/model-view-programming.html]])", float="t")
|
||||||
#+begin_src dot :file "images/graph-architecture.png" :cache no
|
#+begin_src dot :file "images/graph-architecture.png" :cache no
|
||||||
digraph {
|
digraph {
|
||||||
bgcolor="transparent";
|
bgcolor="transparent";
|
||||||
node[colorscheme=set19,shape=box,style="filled",fillcolor=white];
|
node[colorscheme=set19,shape=box,style="filled",fillcolor=white];
|
||||||
|
edge[colorscheme=set19,color=0];
|
||||||
|
|
||||||
|
root[style=invis];
|
||||||
|
|
||||||
|
subgraph cluster0 {
|
||||||
|
label="File System"
|
||||||
|
style=dashed;
|
||||||
|
|
||||||
|
save[label="Pamhyr save",fillcolor="9",shape=note];
|
||||||
|
sbin[label="Solver binary",fillcolor="9",shape=note];
|
||||||
|
configfile[label="Pamhyr configuration file",fillcolor="9",shape=note];
|
||||||
|
}
|
||||||
|
|
||||||
save[label="Pamhyr save",fillcolor="9",shape=note];
|
|
||||||
model[label="Model",fillcolor="2"];
|
|
||||||
view[label="View",fillcolor="1"];
|
|
||||||
delegate[label="Delegate",fillcolor="3"];
|
|
||||||
action[label="Action",fillcolor="3"];
|
|
||||||
solver[label="Solver",fillcolor="6"];
|
|
||||||
undocommand[label="Command",fillcolor="4"];
|
|
||||||
user[label="User",shape=ellipse];
|
user[label="User",shape=ellipse];
|
||||||
|
|
||||||
model -> save[label="Save"];
|
subgraph cluster1 {
|
||||||
save -> model[label="Load"];
|
label="Pamhyr2";
|
||||||
|
|
||||||
|
config[label="Configuration",fillcolor="5"];
|
||||||
|
model[label="Model",fillcolor="2"];
|
||||||
|
view[label="View",fillcolor="1"];
|
||||||
|
delegate[label="Delegate",fillcolor="3"];
|
||||||
|
action[label="Action",fillcolor="3"];
|
||||||
|
solver[label="Solver",fillcolor="6"];
|
||||||
|
undocommand[label="Command",fillcolor="4"];
|
||||||
|
}
|
||||||
|
|
||||||
|
root -> model[style=invis];
|
||||||
|
root -> config[style=invis];
|
||||||
|
|
||||||
|
model -> save[dir=both,label="Save/Load"];
|
||||||
|
config -> configfile[dir=both,label="Save/Load"];
|
||||||
|
|
||||||
|
undocommand -> solver[style=invis];
|
||||||
|
action -> solver[style=invis];
|
||||||
|
delegate -> solver[style=invis];
|
||||||
|
|
||||||
model -> view[label="Rendering"];
|
model -> view[label="Rendering"];
|
||||||
view -> delegate[label="Rendering"];
|
view -> delegate[label="Rendering"];
|
||||||
delegate -> undocommand[label="Create"];
|
delegate -> undocommand[label="Create"];
|
||||||
action -> undocommand[label="Create"];
|
action -> undocommand[label="Create/use"];
|
||||||
action -> solver[label="Run"];
|
action -> solver[label="Run"];
|
||||||
solver -> model[label="Add results"];
|
solver -> model[dir=both,label="Export/Results",labelangle=0,labelfloat=true,constraint=true];
|
||||||
|
solver -> sbin[dir=both,label="Execute/Results"];
|
||||||
undocommand -> model[label="Modify"];
|
undocommand -> model[label="Modify"];
|
||||||
|
|
||||||
view -> user[label="Vizualize"];
|
view -> user[label="Vizualize"];
|
||||||
user -> delegate[label="Modify"];
|
user -> delegate[label="Modify"];
|
||||||
user -> action[label="Activate"];
|
user -> action[label="Triggere"];
|
||||||
|
|
||||||
|
config -> solver[label="Create",style=dashed,labelfloat=true,constraint=true];
|
||||||
|
//model -> config[style=invis];
|
||||||
|
config -> model[style=invis];
|
||||||
|
delegate -> action[style=invis];
|
||||||
|
save -> configfile[style=invis];
|
||||||
|
root -> solver[style=invis];
|
||||||
|
user -> solver[style=invis];
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -134,6 +167,12 @@ All the model source code are in the directory {{{file(src/Model)}}}
|
||||||
delegate and command are in {{{file(src/View)}}} (see section [[View]]). Solvers classes are
|
delegate and command are in {{{file(src/View)}}} (see section [[View]]). Solvers classes are
|
||||||
in {{{file(src/Solver)}}} (see section [[Solver]]).
|
in {{{file(src/Solver)}}} (see section [[Solver]]).
|
||||||
|
|
||||||
|
The following sub section show examples of main {{{pamhyr}}} internal
|
||||||
|
class for view componants, but this documentation is not exhaustive,
|
||||||
|
be free to watch existing code for more details and examples. In,
|
||||||
|
addition some features are not factorise and must be implemented from
|
||||||
|
scratch (directly with Qt for example).
|
||||||
|
|
||||||
[fn:qt-mv] The Qt Model/View documentation web page:
|
[fn:qt-mv] The Qt Model/View documentation web page:
|
||||||
https://doc.qt.io/qt-5/model-view-programming.html
|
https://doc.qt.io/qt-5/model-view-programming.html
|
||||||
|
|
||||||
|
|
@ -419,7 +458,7 @@ A abstract class PamhyrModelDict is available and provide some of
|
||||||
basic methods for object dictionary in Model. This class is like
|
basic methods for object dictionary in Model. This class is like
|
||||||
PamhyrModelList but use a dictionary instead of list.
|
PamhyrModelList but use a dictionary instead of list.
|
||||||
|
|
||||||
** TODO View
|
** View
|
||||||
|
|
||||||
Pamhyr2 use Qt as graphical user interface library with the
|
Pamhyr2 use Qt as graphical user interface library with the
|
||||||
application "Qt designer" for windows or widget creation (see [[UI file]])
|
application "Qt designer" for windows or widget creation (see [[UI file]])
|
||||||
|
|
@ -593,6 +632,8 @@ action. In PamhyrWindow (and PamhyrDialog) the undo stack is
|
||||||
automatically create if the option ="undo"= is activate at window
|
automatically create if the option ="undo"= is activate at window
|
||||||
creation, this stack is accessible at =self._undo_stack=.
|
creation, this stack is accessible at =self._undo_stack=.
|
||||||
|
|
||||||
|
#+NAME: undo-cmd-push
|
||||||
|
#+CAPTION: Example of UndoCommand push into an undo stack.
|
||||||
#+begin_src python :python python3 :results output :noweb yes
|
#+begin_src python :python python3 :results output :noweb yes
|
||||||
self._undo_stack.push(
|
self._undo_stack.push(
|
||||||
AddNodeCommand(
|
AddNodeCommand(
|
||||||
|
|
@ -633,18 +674,128 @@ data has changed.
|
||||||
|
|
||||||
** TODO Solver
|
** TODO Solver
|
||||||
|
|
||||||
|
#+name: graph-multi-solver
|
||||||
|
#+header: :results drawer
|
||||||
|
#+header: :exports results
|
||||||
|
#+header: :post attr_wrap(width="12cm", data=*this*, name="graph-multi-solver", caption="Scheme of multiple solver configured, one Rubarbe solver and two Mage solver with one on local machine and one on a distant machine accessed over ssh", float="t")
|
||||||
|
#+begin_src dot :file "images/graph-multi-solver.png" :cache no
|
||||||
|
digraph {
|
||||||
|
bgcolor="transparent";
|
||||||
|
node[colorscheme=set19,shape=box,style="filled",fillcolor=9];
|
||||||
|
edge[colorscheme=set19,color=0];
|
||||||
|
|
||||||
|
subgraph cluster00 {
|
||||||
|
label="User personal computer";
|
||||||
|
style=solid;
|
||||||
|
|
||||||
|
subgraph cluster0 {
|
||||||
|
label="Pamhyr2";
|
||||||
|
style=solid;
|
||||||
|
|
||||||
|
// subgraph cluster01 {
|
||||||
|
// label="Core";
|
||||||
|
//model[label="Model", fillcolor=2];
|
||||||
|
//view[label="View", fillcolor=1];
|
||||||
|
config[label="Configuration", fillcolor=5];
|
||||||
|
|
||||||
|
// view -> model -> view;
|
||||||
|
// }
|
||||||
|
|
||||||
|
subgraph cluster02 {
|
||||||
|
label="Solver";
|
||||||
|
style=dashed;
|
||||||
|
subgraph cluster021 {
|
||||||
|
label="Solver Classes";
|
||||||
|
classSolverM7[label="Mage7", fillcolor=6];
|
||||||
|
classSolverM8[label="Mage8", fillcolor=6];
|
||||||
|
classSolverR[label="RubarBE", fillcolor=6];
|
||||||
|
}
|
||||||
|
//classSolverX[label="Solver X Binding", fillcolor=6];
|
||||||
|
|
||||||
|
subgraph cluster022 {
|
||||||
|
label="Solver Object";
|
||||||
|
solverM[label="Mage", fillcolor=6];
|
||||||
|
solverM2[label="Mage over ssh", fillcolor=6];
|
||||||
|
solverR[label="RubarBE", fillcolor=6];
|
||||||
|
//solverX[label="Solver X", fillcolor=6];
|
||||||
|
}
|
||||||
|
|
||||||
|
classSolverM8 -> solverM [style=dashed];
|
||||||
|
classSolverM8 -> solverM2[style=dashed];
|
||||||
|
classSolverR -> solverR[style=dashed];
|
||||||
|
//classSolverX -> solverX[style=dashed];
|
||||||
|
}
|
||||||
|
|
||||||
|
//config -> solverM[style="dotted"];
|
||||||
|
//config -> solverR[style="dotted"];
|
||||||
|
//config -> solverX[style="dotted"];
|
||||||
|
|
||||||
|
//model -> solverM;
|
||||||
|
//model -> solverM2;
|
||||||
|
//model -> solverR;
|
||||||
|
//model -> solverX;
|
||||||
|
}
|
||||||
|
|
||||||
|
subgraph cluster1 {
|
||||||
|
label="File System";
|
||||||
|
style=dashed;
|
||||||
|
|
||||||
|
mage[label="Mage Binary",shape=note];
|
||||||
|
//X[label="Solver X Binary"];
|
||||||
|
rubarbe[label="RubarBE Binary",shape=note];
|
||||||
|
ssh[label="ssh",shape=note];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//config -> X[style=invis];
|
||||||
|
//model -> config[style=invis];
|
||||||
|
config -> solverM[label="",constraint=true];
|
||||||
|
//config -> solverX[label="",constraint=true];
|
||||||
|
config -> solverR[label="",constraint=true];
|
||||||
|
config -> solverM2[label="",constraint=true];
|
||||||
|
|
||||||
|
subgraph cluster2 {
|
||||||
|
label="Distant server";
|
||||||
|
style=solid;
|
||||||
|
|
||||||
|
sshd[label="sshd"];
|
||||||
|
|
||||||
|
subgraph cluster21 {
|
||||||
|
label="File System";
|
||||||
|
style=dashed;
|
||||||
|
|
||||||
|
mage2[label="Mage Binary",shape=note];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
solverM -> mage[label="", color=1];
|
||||||
|
mage -> solverM[label="", color=2];
|
||||||
|
|
||||||
|
//solverX -> X[label="", color=1];
|
||||||
|
//X -> solverX[label="", color=2];
|
||||||
|
|
||||||
|
solverR -> rubarbe[label="", color=1];
|
||||||
|
rubarbe -> solverR[label="", color=2];
|
||||||
|
|
||||||
|
solverM2 -> ssh -> sshd -> mage2[label="", color=1];
|
||||||
|
mage2 -> sshd -> ssh -> solverM2[label="", color=2];
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
#+name: graph-pipeline
|
#+name: graph-pipeline
|
||||||
#+header: :results drawer
|
#+header: :results drawer
|
||||||
#+header: :exports results
|
#+header: :exports results
|
||||||
#+header: :post attr_wrap(width="12cm", data=*this*, name="graph-pipeline", caption="Pamhyr2 solver execution pipeline architecture scheme", float="t")
|
#+header: :post attr_wrap(width="10cm", data=*this*, name="graph-pipeline", caption="Pamhyr2 solver execution pipeline architecture scheme", float="t")
|
||||||
#+begin_src dot :file "images/graph-pipeline.png" :cache no
|
#+begin_src dot :file "images/graph-pipeline.png" :cache no
|
||||||
digraph {
|
digraph {
|
||||||
bgcolor="transparent";
|
bgcolor="transparent";
|
||||||
node[colorscheme=set19,shape=box,style="filled",fillcolor=9];
|
node[colorscheme=set19,shape=box,style="filled",fillcolor=9];
|
||||||
|
edge[colorscheme=set19,color=0];
|
||||||
|
|
||||||
subgraph cluster0 {
|
subgraph cluster0 {
|
||||||
label="Pamhyr2"
|
label="Pamhyr2"
|
||||||
config[label="Config",fillcolor=5];
|
config[label="Configuration",fillcolor=5];
|
||||||
model[label="Model",fillcolor=2];
|
model[label="Model",fillcolor=2];
|
||||||
obj[label="Solver",fillcolor=6];
|
obj[label="Solver",fillcolor=6];
|
||||||
results[label="Results",fillcolor=2];
|
results[label="Results",fillcolor=2];
|
||||||
|
|
@ -658,18 +809,86 @@ data has changed.
|
||||||
obj -> model[style="dashed"];
|
obj -> model[style="dashed"];
|
||||||
|
|
||||||
subgraph cluster1{
|
subgraph cluster1{
|
||||||
label="System";
|
label="File System";
|
||||||
|
style=dashed;
|
||||||
in[label="Solver input files",shape=note];
|
in[label="Solver input files",shape=note];
|
||||||
out[label="Solver output files",shape=note];
|
out[label="Solver output files",shape=note];
|
||||||
bin[label="Solver binary",shape=note];
|
bin[label="Solver binary",shape=note];
|
||||||
}
|
}
|
||||||
|
|
||||||
obj -> in[label="Write (1)"];
|
obj -> in[label="Write (1)",color=1];
|
||||||
obj -> bin[label="Execute (2)"];
|
obj -> bin[label="Execute (2)",color=1];
|
||||||
bin -> in[label="Read (2.1)"];
|
bin -> in[label="Read (2.1)",color=1];
|
||||||
bin -> out[label="Write (2.2)"];
|
bin -> out[label="Write (2.2)",color=2];
|
||||||
obj -> results[label="Create (3)"];
|
obj -> results[label="Create (3)",color=2];
|
||||||
obj -> out[label="Read (3.1)"];
|
obj -> out[label="Read (3.1)", color=2];
|
||||||
|
view -> model[style="dashed"];
|
||||||
|
view -> results[style="dashed"];
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+name: graph-pipeline-generic
|
||||||
|
#+header: :results drawer
|
||||||
|
#+header: :exports results
|
||||||
|
#+header: :post attr_wrap(width="12cm", data=*this*, name="graph-pipeline-generic", caption="Pamhyr2 generic solver execution pipeline architecture scheme", float="t")
|
||||||
|
#+begin_src dot :file "images/graph-pipeline-generic.png" :cache no
|
||||||
|
digraph {
|
||||||
|
bgcolor="transparent";
|
||||||
|
node[colorscheme=set19,shape=box,style="filled",fillcolor=9];
|
||||||
|
edge[colorscheme=set19,color=0];
|
||||||
|
|
||||||
|
subgraph cluster0 {
|
||||||
|
label="Pamhyr2"
|
||||||
|
config[label="Configuration",fillcolor=5];
|
||||||
|
model[label="Model",fillcolor=2];
|
||||||
|
obj[label="Generic solver",fillcolor=6];
|
||||||
|
results[label="Results",fillcolor=2];
|
||||||
|
view[label="View",fillcolor=1];
|
||||||
|
|
||||||
|
results -> model[style="dashed"];
|
||||||
|
results -> obj[style="dashed"];
|
||||||
|
}
|
||||||
|
|
||||||
|
config -> obj[label=""];
|
||||||
|
obj -> model[style="dashed"];
|
||||||
|
|
||||||
|
subgraph cluster1{
|
||||||
|
label="File System";
|
||||||
|
style=dashed;
|
||||||
|
|
||||||
|
gin[label="Generic input file", shape=note,fillcolor=white];
|
||||||
|
ibin[label="Input formater", shape=note];
|
||||||
|
in[label="Solver input files",shape=note,fillcolor=white];
|
||||||
|
out[label="Solver output files",shape=note,fillcolor=white];
|
||||||
|
gout[label="Generic results file",shape=note,fillcolor=white];
|
||||||
|
obin[label="Output formater", shape=note];
|
||||||
|
bin[label="Solver binary",shape=note];
|
||||||
|
}
|
||||||
|
|
||||||
|
gin -> ibin[style=invis];
|
||||||
|
ibin -> bin -> obin[style=invis];
|
||||||
|
in -> bin[style=invis];
|
||||||
|
obin -> gout[style=invis];
|
||||||
|
|
||||||
|
// Input format
|
||||||
|
obj -> gin[label="Write (1)",color=1];
|
||||||
|
obj -> ibin[label="Execute (2)",color=1,style=dashed];
|
||||||
|
ibin -> gin[label="Read (2.1)",color=1];
|
||||||
|
ibin -> in[label="Write (2.2)",color=1];
|
||||||
|
|
||||||
|
// Solve
|
||||||
|
obj -> bin[label="Execute (3)",color=1,style=dashed];
|
||||||
|
bin -> in[label="Read (3.1)",color=1];
|
||||||
|
bin -> out[label="Write (3.2)",color=2];
|
||||||
|
|
||||||
|
// Output format
|
||||||
|
obj -> obin[label="Execute (4)",color=2,style=dashed];
|
||||||
|
obin -> out[label="Read (4.1)",color=2];
|
||||||
|
obin -> gout[label="Write (4.2)",color=2];
|
||||||
|
|
||||||
|
// Read results
|
||||||
|
obj -> results[label="Create (5)",color=2];
|
||||||
|
obj -> gout[label="Read (5.1)", color=2];
|
||||||
view -> model[style="dashed"];
|
view -> model[style="dashed"];
|
||||||
view -> results[style="dashed"];
|
view -> results[style="dashed"];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue