mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-29 19:10:42 +01:00
doc: dev: Add archi and model graph.
This commit is contained in:
1 parent
a733e148e2
commit
ed006fe1c3
4 files changed
+157
-2
No files matched your search
+130
-2
@@ -28,6 +28,20 @@
|
||||
#+OPTIONS: toc:t
|
||||
#+LANGUAGE: UKenglish
|
||||
|
||||
#+NAME: attr_wrap
|
||||
#+HEADER: :var width="\\textwidth"
|
||||
#+HEADER: :var caption=""
|
||||
#+HEADER: :var smallcaption=""
|
||||
#+HEADER: :var name=""
|
||||
#+HEADER: :var data=""
|
||||
#+HEADER: :var float="nil"
|
||||
#+BEGIN_SRC sh :results output :exports none
|
||||
echo "#+CAPTION[$smallcaption]: $caption"
|
||||
echo "#+NAME: $name"
|
||||
echo "#+ATTR_LATEX: :width $width :float $float"
|
||||
echo "$data"
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_abstract
|
||||
This document is for the use of developers. It describes the project
|
||||
architecture, the tools available to assist development and
|
||||
@@ -60,9 +74,123 @@ https://doc.qt.io/qt-5/model-view-programming.html (last access
|
||||
2023-09-15)
|
||||
|
||||
* TODO Architecture
|
||||
|
||||
Pamhyr2 architecture is based on Qt Model/View programming[fn:qt-mv] architecture.
|
||||
|
||||
#+name: graph-architecture
|
||||
#+header: :results drawer
|
||||
#+header: :exports results
|
||||
#+header: :post attr_wrap(width="7cm", 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
|
||||
digraph {
|
||||
node[colorscheme=set19,shape=box,style="filled",fillcolor=white];
|
||||
|
||||
save[label="Pamhyr save",fillcolor="9",shape=note];
|
||||
model[label="Model",fillcolor="2"];
|
||||
view[label="View",fillcolor="1"];
|
||||
delegate[label="Delegate",fillcolor="3"];
|
||||
undocommand[label="UndoCommand",fillcolor="4"];
|
||||
user[label="User",shape=ellipse];
|
||||
|
||||
model -> save[label="Save"];
|
||||
save -> model[label="Load"];
|
||||
|
||||
model -> view[label="Rendering"];
|
||||
view -> delegate[label="Rendering"];
|
||||
delegate -> undocommand[label="Create"];
|
||||
undocommand -> model[label="Modify"]
|
||||
|
||||
view -> user[label="Vizualize"];
|
||||
user -> delegate[label="Modify"];
|
||||
}
|
||||
#+end_src
|
||||
|
||||
#+name: graph-model
|
||||
#+header: :results drawer
|
||||
#+header: :exports results
|
||||
#+header: :post attr_wrap(width="16cm", data=*this*, name="graph-model", caption="Pamhyr2 Model architecture scheme", float="t")
|
||||
#+begin_src dot :file "images/graph-model.png" :cache no
|
||||
digraph {
|
||||
node[colorscheme=set19,shape=box,style="filled",fillcolor="2"];
|
||||
|
||||
study[label="Study"];
|
||||
river[label="River"];
|
||||
|
||||
subgraph cluster00 {
|
||||
label="Network"
|
||||
rnode[label="RiverNode"];
|
||||
redge[label="RiverReach"];
|
||||
}
|
||||
|
||||
frictionlist[label="FrictionList"];
|
||||
|
||||
subgraph cluster01 {
|
||||
label="Stricklers";
|
||||
stricklers[label="Stricklers"];
|
||||
stricklerslist[label="StricklersList"];
|
||||
}
|
||||
subgraph cluster02 {
|
||||
label="BoundaryCondition";
|
||||
boundaryconditionlist[label="BoundaryConditionList"];
|
||||
boundarycondition[label="BoundaryCondition"];
|
||||
}
|
||||
subgraph cluster03 {
|
||||
label="LateralContribution";
|
||||
lateralcontributionlist[label="LateralContributionList"];
|
||||
lateralcontribution[label="LateralContribution"];
|
||||
}
|
||||
subgraph cluster04 {
|
||||
label="InitialConditions";
|
||||
initialconditionsdict[label="InitialConditionsDict"];
|
||||
initialconditions[label="InitialConditions"];
|
||||
}
|
||||
|
||||
solverparameterslist[label="SolverParametersList"];
|
||||
|
||||
subgraph cluster05 {
|
||||
label="Sediment";
|
||||
sedimentlayerlist[label="SedimentLayerList"];
|
||||
sedimentlayer[label="SedimentLayer"];
|
||||
layer[label="Layer"];
|
||||
}
|
||||
|
||||
subgraph cluster06 {
|
||||
label="Greometry"
|
||||
georeach[label="Reach"];
|
||||
geocrosssection[label="Cross-section"];
|
||||
geopoint[label="Point"];
|
||||
}
|
||||
|
||||
study -> river;
|
||||
river -> rnode;
|
||||
river -> redge;
|
||||
redge -> rnode;
|
||||
river -> boundaryconditionlist -> boundarycondition -> rnode;
|
||||
river -> lateralcontributionlist -> lateralcontribution -> redge;
|
||||
river -> initialconditionsdict -> initialconditions;
|
||||
initialconditions -> redge;
|
||||
river -> stricklerslist -> stricklers;
|
||||
river -> solverparameterslist;
|
||||
river -> sedimentlayerlist -> sedimentlayer -> layer;
|
||||
redge -> frictionlist -> stricklers;
|
||||
redge -> georeach -> geocrosssection -> geopoint;
|
||||
geocrosssection -> sedimentlayer;
|
||||
geopoint -> sedimentlayer;
|
||||
|
||||
}
|
||||
#+end_src
|
||||
|
||||
[fn:qt-mv] The Qt Model/View documentation web page:
|
||||
https://doc.qt.io/qt-5/model-view-programming.html
|
||||
|
||||
** TODO Model
|
||||
** TODO Solver
|
||||
** TODO View
|
||||
*** TODO UI file
|
||||
*** TODO Window class
|
||||
** TODO UndoCommand
|
||||
** TODO Table
|
||||
** TODO Plot
|
||||
** TODO Solver
|
||||
** TODO Unit tests
|
||||
** TODO The debug mode
|
||||
* TODO Build the project
|
||||
@@ -188,7 +316,7 @@ print(f"Document build on system: {os.name}")
|
||||
#+RESULTS:
|
||||
: Document build on system: posix
|
||||
|
||||
*** Latex
|
||||
*** LaTeX
|
||||
|
||||
If we export the file to PDF, org-mode use {{{latex}}}. So we can add
|
||||
some piece of {{{latex}}} into the document[fn:: See {{{latex}}} part
|
||||
|
||||
Whitespace-only changes.
Reference in new issue
Block a user