Commits

Lisandro Dalcin  committed bf154a2

Add more slides

  • Participants
  • Parent commits 1501485

Comments (0)

Files changed (9)

File hpclatam2011.tex

   Parallel Distributed Computing using Python
 }
 \author[L. Dalcin]
-{
-  {Lisandro~Dalcin}\\
+{\
+  \textbf{Lisandro~Dalcin}\\
   \url{dalcinl@gmail.com}\\
+  {$ $}\\
+  Joint work with\\
+  \textbf{Pablo Kler~~} \and \textbf{Rodrigo Paz~} \\
+  \textbf{Mario Storti} \and \textbf{Jorge D'Elía}
 }
 \institute[CIMEC]{
   Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)\\
   Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)\\
-  Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
+  Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)\\
+  \url{http://www.cimec.org.ar}
 }
 \date[2011-09-01]
 {
 \begin{frame}
   \frametitle{\textbf{[petsc4py]} Interoperability -- \textbf{SWIG} }
   \small
-  \inputminted{c}{petsc4py-swig.i}
+  \inputminted{c++}{petsc4py-swig.i}
 \end{frame}
 
 \begin{frame}
-  \frametitle{\textbf{[petsc4py]} Interoperability -- \textbf{F2Py} }
-  \scriptsize
-  \inputminted{fortran}{petsc4py-f2py.pyf}
+  \frametitle{\textbf{[petsc4py]} Interoperability -- \textbf{SWIG} }
+  \small
+  \inputminted{python}{petsc4py-snes.py}
 \end{frame}
 
 \section{Applications}
 
 \begin{frame}
+  \frametitle{Microfluidics ($\mu$-TAS)}
+  \begin{center}
+    \includegraphics[width=0.8\textwidth]{microcfd-chip.png}
+  \end{center}
 \end{frame}
 
-%\section{Closing}
+\begin{frame}
+  \frametitle{Microfluidics ($\mu$-TAS)}
+  \begin{center}
+    \includegraphics[width=\textwidth]{microcfd-net.png}
+  \end{center}
+\end{frame}
+
+\begin{frame}
+  \frametitle{}
+  \begin{center}
+    \includegraphics[width=\textwidth]{microcfd-loop.png}
+  \end{center}
+\end{frame}
+
+\begin{frame}
+  \frametitle{}
+  \begin{center}
+    \includegraphics[width=\textwidth]{microcfd-sol1.png}
+  \end{center}
+\end{frame}
+
+\begin{frame}
+  \frametitle{}
+  \begin{center}
+    \includegraphics[width=\textwidth]{microcfd-sol2.png}
+  \end{center}
+\end{frame}
 
 \end{document}
 

File microcfd-chip.png

Added
New image

File microcfd-loop.png

Added
New image

File microcfd-net.png

Added
New image

File microcfd-sol1.png

Added
New image

File microcfd-sol2.png

Added
New image

File petsc4py-f2py.pyf

-python module MyPDE
-interface
-
-   subroutine FormInitGuess(dm, x, params, ierr)
-     integer,      intent(in)  :: dm, x
-     real(kind=8), intent(in)  :: params(3)
-     integer,      intent(out) :: ierr
-   end subroutine FormInitGuess
-
-   subroutine FormFunction(dm, x, F, params, ierr)
-     integer,      intent(in)  :: dm, x, F
-     real(kind=8), intent(in)  :: params(3)
-     integer,      intent(out) :: ierr
-   end subroutine FormFunction
-
-   subroutine FormJacobian(dm, x, J, params, ierr)
-     integer,      intent(in)  :: dm, x, J
-     real(kind=8), intent(in)  :: params(3)
-     integer,      intent(out) :: ierr
-   end subroutine FormJacobian
-   
-end interface
-end python module MyPDE

File petsc4py-snes.py

+from petsc4py import PETSc
+import MyApp
+
+comm = PETSc.COMM_WORLD
+app = MyApp.Nonlinear(comm, "example.dat")
+
+X = app.crateVec()
+F = app.crateVec()
+J = app.crateMat()
+
+snes = PETSc.SNES().create(comm)
+snes.setFunction(app.evalFunction, F)
+snes.setFunction(app.evalJacobian, J)
+
+snes.solve(None, X)

File petsc4py-swig.i

-%module MyPDE
+%module MyApp
+
 %include petsc4py/petsc4py.i
 %{
-#include "MyPDE.h"
+#include "MyApp.h"
 %}
 
-typedef struct Params {
-  double alpha;
-  double beta;
-  double gamma;
-} Params;
-
-PetscErrorCode FormInitGuess(DM dm, Vec x, Params *p);
-PetscErrorCode FormFunction(DM dm, Vec x, Vec F, Params *p);
-PetscErrorCode FormJacobian(DM dm, Vec x, Mat J, Params *p);
+class NonlinearApp {
+  Nonlinear(MPI_Comm comm,
+            const char datafile[]);
+  Vec  createVec();
+  Vec  createMat();
+  void evalFunction(SNES snes, Vec X, Vec F);
+  bool evalJacobian(SNES snes, Vec X, Mat J, Mat P);
+};