]> git.unchartedbackwaters.co.uk Git - francis/psl_presentation_20130225.git/commitdiff
Initial work on PSL slides.
authorFrancis Russell <francis@unchartedbackwaters.co.uk>
Wed, 13 Feb 2013 15:45:01 +0000 (15:45 +0000)
committerFrancis Russell <francis@unchartedbackwaters.co.uk>
Wed, 13 Feb 2013 15:45:01 +0000 (15:45 +0000)
.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]
code/laplacian.ufl [new file with mode: 0644]
presentation.tex [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..411f539
--- /dev/null
@@ -0,0 +1,13 @@
+#Vim swap
+.*.swp
+
+#Generated
+/pygments.sty
+/*.aux
+/*.log
+/*.nav
+/*.out
+/*.pdf
+/*.snm
+/*.toc
+/code/*.tex
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..5d5d199
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,56 @@
+IMAGE_FILES=$(wildcard images/*)
+
+SVG_FOLDER=images-svg
+SVG_SOURCES=$(wildcard $(SVG_FOLDER)/*.svg)
+SVG_OUTPUTS=${patsubst %.svg,%.pdf,$(SVG_SOURCES)}
+
+CODE_FOLDER=code
+CODE_F90_TEX_FILES=${patsubst %.F90,%.tex,$(wildcard $(CODE_FOLDER)/*.F90)}
+CODE_UFL_TEX_FILES=${patsubst %.ufl,%.tex,$(wildcard $(CODE_FOLDER)/*.ufl)}
+CODE_TEX_FILES=$(CODE_F90_TEX_FILES) $(CODE_UFL_TEX_FILES)
+
+
+PDFLATEX_OUTPUT_LOG=pdflatex_output.log
+
+all: presentation.pdf
+
+display: presentation.pdf
+       xpdf presentation.pdf
+
+display-4up: presentation-4up.pdf
+       xpdf presentation-4up.pdf
+
+4up: presentation-4up.pdf
+
+presentation-4up.pdf: presentation.pdf
+       pdfnup --nup 2x2 --a4paper --scale 0.95 --frame true presentation.pdf -o presentation-4up.pdf
+
+presentation.pdf: $(IMAGE_FILES) $(SVG_OUTPUTS) $(CODE_TEX_FILES) $(wildcard *.tex *.sty) pygments.sty
+       pdflatex -draftmode presentation &&\
+       while(pdflatex presentation | tee $(PDFLATEX_OUTPUT_LOG) && grep "Rerun to get cross-references right" $(PDFLATEX_OUTPUT_LOG)); do true; done &&\
+       rm -f $(PDFLATEX_OUTPUT_LOG)
+
+clean:
+       rm -f *.aux *.log *.out *.pdf *.bbl *.blg *.toc *.lot *.lof *.nav *.snm \
+        $(SVG_FOLDER)/*.pdf \
+        $(BASIS_FUNCTIONS_FOLDER)/*.pdf \
+        $(BASIS_FUNCTIONS_BUILD_STAMP) \
+        $(CODE_TEX_FILES) \
+        pygments.sty
+
+upload: presentation.pdf
+       rsync -C --progress presentation.pdf shell3.doc.ic.ac.uk:~/public_html/psl_onetep_presentation.pdf
+
+%.pdf: %.svg
+       inkscape -D -A $@ $<
+
+pygments.sty:
+       pygmentize -S friendly -f latex > $@
+
+%.tex: %.F90
+       pygmentize -f latex -l fortran -o $@ $<
+
+%.tex: %.ufl
+       pygmentize -f latex -l python -o $@ $<
+
+.PHONY: all display clean upload 4up display-4up
diff --git a/code/laplacian.ufl b/code/laplacian.ufl
new file mode 100644 (file)
index 0000000..62120d5
--- /dev/null
@@ -0,0 +1,6 @@
+element = FiniteElement("Lagrange", triangle, 2)
+
+v = TestFunction(element)
+u = TrialFunction(element)
+
+a = dot(grad(v), grad(u))*dx
diff --git a/presentation.tex b/presentation.tex
new file mode 100644 (file)
index 0000000..d056f77
--- /dev/null
@@ -0,0 +1,106 @@
+% vim:tw=80
+
+\documentclass{beamer}
+\usetheme{Madrid}
+\usepackage{graphicx}
+\usepackage{verbatim}
+\usepackage{fancyvrb}
+\usepackage{ucs}
+\usepackage{alltt}
+\usepackage[utf8x]{inputenc}
+
+\input{pygments.sty}
+
+\title[PSL Meeting]{PSL Meeting Presentation}
+\subtitle{Domain Specific Languages for Quantum Chemistry}
+
+\author[F. Russell]{Francis Russell \\ Joint work with Chris-Kriton Skylaris \& Karl Wilkinson}
+\date{25/02/2013}
+\institute[ICL \& Soton]{Imperial College London \& Southampton University}
+
+\begin{document}
+
+\frame{\titlepage}
+
+\frame{
+
+\frametitle{DSLs for Computational Science}
+
+\itemize{
+
+\item A formal, machine-interpretable notation for specifying a problem
+using a domain-oriented syntax.
+
+\item Allow scientists to concentrate on the problems they're solving rather
+than the implementation.
+
+\item Reduce time and effort taken to go from decision to compute some value to
+having efficient code that implements it.
+
+\item Allow computer scientists to work on optimised implementations without
+having to understand the subtleties mathematics.
+
+\item Target code to multiple platforms/architectures/instruction sets via
+changes to the code generator rather than the high-level description.
+
+}
+
+}
+
+\frame{
+
+\frametitle{The Domain of Variability}
+
+\itemize{
+
+\item The primary value of DSLs is their machine readability, making it
+possible to apply automated tools to them (typically a DSL compiler).
+
+\item In order for a DSL to provide benefit, it is important to
+understand the associated \emph{domains of variability}.
+
+\item Variability in the problem description should be expressible in
+the DSL, making it practical to use a DSL based code generator across
+multple problems.
+
+\item Variability in the implementation can be explored via alternative
+strategies for code generation implemented inside a DSL compiler.
+
+}
+
+}
+
+\frame{
+
+\frametitle{Input variability in UFL (Unified Form Language)}
+
+\begin{itemize}
+
+\item The Unified Form Language (UFL) is a DSL for specifying finite element
+variational forms developed by the FEniCS project.
+
+\item Mathematically, we might write the finite element variational form for the 
+Laplacian as follows:
+
+\begin{equation*}
+a(u,v) = \int_\Omega \nabla u(x) \cdot \nabla v(x)\,dx
+\end{equation*}
+
+\item In UFL (specifying physical discretisation) we would write:
+
+\input{code/laplacian}
+
+\end{itemize}
+
+}
+
+\frame{
+
+\frametitle{Implementation variablity in FFC}
+
+}
+
+
+
+
+\end{document}