My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TrilinosHandsOnTutorial  
Trilinos Hands-on Tutorial Page
Featured, Phase-Deploy
Updated Nov 16, 2011 by jim.will...@gmail.com

Trilinos Hands-on Tutorial

First things first:

  • The Trilinos Project relies heavily upon its website (click on logo above).
  • For future reference, a lot of information can be found on the Trilinos "Getting Started" page.
  • Trilinos has a Tutorial document that you can find here.
  • The 2010 Trilinos User Group meeting included a video-recorded tutorial that uses the website. Part 1 is here. Part 2 is here.
  • Much of the rest of 2010 TUG is also available by video here.
  • A more focused manycore tutorial starts here.

Let's dive in, you have two options:

  • In addition to the C++ interfaces, a Matrix Portal interface and a Python interface are also available.
  • Access to this site is password protected. Login information will be given during live tutorials as needed.
  • Reminder: Use Ctrl+A to highlight all the example code, Ctrl+C to copy it, and Ctrl+V to paste it in the WebTrilinos window.
  • Download and build the examples on your machine
    1. Download Trilinos
    2. Download and install CMake (if not already done).
      • The latest CMake release can be downloaded from here.
    3. Download and install Clapack (if you don't have LAPACK and BLAS already).
      • Get Clapack from here.
      • Use CMake to build Clapack.
    4. Build and install Trilinos.
      • An example script is here.
      • You can find other scripts in the Trilinos distribution Trilinos/sample_scripts directory.
      • You can also use the CMake gui, or the text-gui ccmake.
    5. Get Makefile from here.
      • Learn about the Makefile and the Makefile.export system here.
      • You can find the Makefile.export.package_name files once you have built and installed Trilinos.
      • They will be in the include directory of your installation directory.
      • Example: TrilinosInstall/include/Makefile.export.Epetra.
    6. Customize the Makefile to your situation (the example Makefile uses only the Epetra package, but Makefile.export.package_name files are available for all packages).
    7. Add Example code into a file called main.cpp and build away!

Now for some examples:

  1. Start with some tools using the Teuchos package.
  2. Write a program using the Epetra package.
  3. Generate a linear system using the Galeri package.
  4. Create an algebraic preconditioner using the Ifpack package.
  5. Solve a linear system using the Ifpack and AztecOO packages.
  6. Solve a linear system using the ML and AztecOO packages.
  7. Solve a linear system using the Ifpack and Belos packages.
  8. Compute some eigenpairs using the Anasazi package.
  9. Solve a nonlinear system using the NOX package.
  10. Tpetra is the new manycore-aware linear algebra stack.
  11. PyTrilinos tutorial materials.

Other examples

Some examples don't work with the web tutorial, since they read from files. You can try them out by downloading Trilinos and looking in the examples in the source tree. For example, the Intrepid discretizations package has examples in the packages/trilinoscouplings/examples/scaling/ directory. The following might be of interest:

  • example_CurlLSFEM.cpp: driver for solving div-curl first order system in 3D with tangential boundary condition using curl-conforming elements
  • example_DivLSFEM.cpp: driver for the same system with normal boundary condition and div-conforming elements
  • example_Poisson.cpp: solving the Poisson equation using a Galerkin finite element method

For Belos' Recycling GMRES (GCRODR) solver, there are examples in packages/belos/epetra/example/GCRODR/PrecGCRODREpetraExFile.cpp and GCRODREpetraExFile.cpp. These examples use the sherman5.hb matrix, which is included in the /packages/belos/epetra/example/GCRODR directory with the Trilinos distribution.

Learning more:


Sign in to add a comment
Powered by Google Project Hosting