diff --git a/.gitignore b/.gitignore index 55e8173a..c3f8797e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.pyc *.json -*.pdf .cache diff --git a/docs/developer.rst b/docs/developer.rst new file mode 100644 index 00000000..a0ac167c --- /dev/null +++ b/docs/developer.rst @@ -0,0 +1,18 @@ +Developer documentation +======================= + +This page provides an introduction into the internal workings of +Devito and is aimed at new developers and people who want to +contribute to the project. We will give a brief glimpse under the hood +to provide some context for the various design and implementation +choices. + +If you are only interested in learning how to use Devito, please start +with the :doc:`tutorials and examples `. + +*Please note that this page is currently still under ongoing development.* + +Core data structures +-------------------- + +.. image:: figures/data_structures.png diff --git a/docs/figures/data_structures.pdf b/docs/figures/data_structures.pdf new file mode 100644 index 00000000..44ea6ea9 Binary files /dev/null and b/docs/figures/data_structures.pdf differ diff --git a/docs/figures/data_structures.png b/docs/figures/data_structures.png new file mode 100644 index 00000000..95d49100 Binary files /dev/null and b/docs/figures/data_structures.png differ diff --git a/docs/figures/data_structures.tex b/docs/figures/data_structures.tex new file mode 100644 index 00000000..cb716e09 --- /dev/null +++ b/docs/figures/data_structures.tex @@ -0,0 +1,71 @@ +\documentclass{standalone} + +\usepackage{tikz} +\usepackage{pgfplots} +\usetikzlibrary{arrows,chains,positioning,fit,backgrounds,calc,shapes, + shadows,scopes,decorations.markings,plotmarks} + +\begin{document} + + +\tikzset{ + line/.style={ + draw, very thick, dashed + }, + box/.style={ + draw, thick, rectangle, rounded corners, + font=\sffamily\large, + minimum height=2em, minimum width=8em, + }, + internal/.style={ + box, fill=black!5, + }, + external/.style={ + box, fill=black!25, + } +} + +\begin{tikzpicture}[font=\sf\small, node distance=4em] + + \node (abstract) [internal] {AbstractSymbol}; + \node (sym_data) [internal, below left=of abstract] {SymbolicData}; + \node (sym_func) [internal, below right=of abstract] {SymbolicFunction}; + + \node (scalar) [internal, below left=of sym_data.south] {Scalar}; + \node (array) [internal, below right=of sym_data.south] {Array}; + + \node (constant) [external, below left=of sym_func.south] {Constant}; + \node (tensor_f) [internal, below right=of sym_func.south] {TensorFunction}; + + \node (function) [external, below left=of tensor_f] {Function}; + \node (time_func) [external, below=2.8em of tensor_f] {TimeFunction}; + \node (composite) [internal, below right=of tensor_f] {CompositeFunction}; + \node (sparse_f) [external, below=2.8em of composite] {SparseFunction}; + + %% Connector lines + \draw[line] (abstract.south) -- ([shift={(0.,-.5)}] abstract.south) -- + ([shift={(0.,.5)}] sym_data.north) -- (sym_data.north); + \draw[line] ([shift={(0.,-.5)}] abstract.south) -- + ([shift={(0.,.5)}] sym_func.north) -- (sym_func.north); + + \draw[line] (sym_data.south) -- ([shift={(0.,-.5)}] sym_data.south) -- + ([shift={(0.,.5)}] scalar.north) -- (scalar.north); + \draw[line] ([shift={(0.,-.5)}] sym_data.south) -- + ([shift={(0.,.5)}] array.north) -- (array.north); + + \draw[line] (sym_func.south) -- ([shift={(0.,-.5)}] sym_func.south) -- + ([shift={(0.,.5)}] constant.north) -- (constant.north); + \draw[line] ([shift={(0.,-.5)}] sym_func.south) -- + ([shift={(0.,.5)}] tensor_f.north) -- (tensor_f.north); + + \draw[line] (tensor_f.south) -- ([shift={(0.,-.5)}] tensor_f.south) -- + ([shift={(0.,.5)}] function.north) -- (function.north); + \draw[line] ([shift={(0.,-.5)}] tensor_f.south) -- (time_func.north); + \draw[line] ([shift={(0.,-.5)}] tensor_f.south) -- + ([shift={(0.,.5)}] composite.north) -- (composite.north); + \draw[line] (composite.south) -- (sparse_f.north); + +\end{tikzpicture} + +\end{document} + diff --git a/docs/index.rst b/docs/index.rst index e6ff19a4..c66550e6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -33,6 +33,7 @@ You can find the API Documentation :doc:`here `. Download Tutorials + Developer Documentation Example Documentation API Documentation