mirror of https://gitlab.com/pamhyr/pamhyr2
doc: dev: Add archi and model graph.
parent
a733e148e2
commit
ed006fe1c3
|
|
@ -28,6 +28,20 @@
|
||||||
#+OPTIONS: toc:t
|
#+OPTIONS: toc:t
|
||||||
#+LANGUAGE: UKenglish
|
#+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
|
#+BEGIN_abstract
|
||||||
This document is for the use of developers. It describes the project
|
This document is for the use of developers. It describes the project
|
||||||
architecture, the tools available to assist development and
|
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)
|
2023-09-15)
|
||||||
|
|
||||||
* TODO Architecture
|
* 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 Model
|
||||||
** TODO Solver
|
|
||||||
** TODO View
|
** TODO View
|
||||||
|
*** TODO UI file
|
||||||
|
*** TODO Window class
|
||||||
|
** TODO UndoCommand
|
||||||
|
** TODO Table
|
||||||
|
** TODO Plot
|
||||||
|
** TODO Solver
|
||||||
** TODO Unit tests
|
** TODO Unit tests
|
||||||
** TODO The debug mode
|
** TODO The debug mode
|
||||||
* TODO Build the project
|
* TODO Build the project
|
||||||
|
|
@ -188,7 +316,7 @@ print(f"Document build on system: {os.name}")
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
: Document build on system: posix
|
: Document build on system: posix
|
||||||
|
|
||||||
*** Latex
|
*** LaTeX
|
||||||
|
|
||||||
If we export the file to PDF, org-mode use {{{latex}}}. So we can add
|
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
|
some piece of {{{latex}}} into the document[fn:: See {{{latex}}} part
|
||||||
|
|
|
||||||
|
|
@ -34,3 +34,18 @@
|
||||||
# Biblio
|
# Biblio
|
||||||
#+MACRO: cite [cite:$1]
|
#+MACRO: cite [cite:$1]
|
||||||
#+MACRO: biblio \bibliography{documentation}
|
#+MACRO: biblio \bibliography{documentation}
|
||||||
|
|
||||||
|
# Wrapper
|
||||||
|
#+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
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,18 @@
|
||||||
(setq org-confirm-babel-evaluate nil)
|
(setq org-confirm-babel-evaluate nil)
|
||||||
(setq org-latex-caption-above nil)
|
(setq org-latex-caption-above nil)
|
||||||
|
|
||||||
|
(org-babel-do-load-languages
|
||||||
|
'org-babel-load-languages
|
||||||
|
(add-to-list 'org-babel-load-languages '(shell . t)))
|
||||||
|
|
||||||
|
(org-babel-do-load-languages
|
||||||
|
'org-babel-load-languages
|
||||||
|
(add-to-list 'org-babel-load-languages '(dot . t)))
|
||||||
|
|
||||||
|
(org-babel-do-load-languages
|
||||||
|
'org-babel-load-languages
|
||||||
|
(add-to-list 'org-babel-load-languages '(python . t)))
|
||||||
|
|
||||||
(add-to-list 'org-latex-packages-alist '("" "minted"))
|
(add-to-list 'org-latex-packages-alist '("" "minted"))
|
||||||
(setq org-latex-listings 'minted)
|
(setq org-latex-listings 'minted)
|
||||||
(setq org-src-fontify-natively t)
|
(setq org-src-fontify-natively t)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue