TrilinosCouplings  Development
 All Classes Namespaces Files Functions Pages
Functions
IntrepidPoisson_Pamgen_Tpetra_main.cpp File Reference

Example: Discretize Poisson's equation with Dirichlet boundary conditions on a hexahedral mesh using nodal (Hgrad) elements. The system is assembled into Tpetra data structures, and optionally solved. More...

#include "Teuchos_oblackholestream.hpp"
#include "Teuchos_TimeMonitor.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
#include "Teuchos_StandardCatchMacros.hpp"
#include "TrilinosCouplings_config.h"
#include "TrilinosCouplings_TpetraIntrepidPoissonExample.hpp"
#include "TrilinosCouplings_IntrepidPoissonExampleHelpers.hpp"
#include "Tpetra_Core.hpp"
#include "MatrixMarket_Tpetra.hpp"
Include dependency graph for IntrepidPoisson_Pamgen_Tpetra_main.cpp:

Functions

int main (int argc, char *argv[])
 

Detailed Description

Example: Discretize Poisson's equation with Dirichlet boundary conditions on a hexahedral mesh using nodal (Hgrad) elements. The system is assembled into Tpetra data structures, and optionally solved.

   This example uses the following Trilinos packages:
 Poisson system:

        div A grad u = f in Omega
                   u = g on Gamma

  where
         A is a material tensor (typically symmetric positive definite)
         f is a given source term

 Corresponding discrete linear system for nodal coefficients(x):

             Kx = b

        K - HGrad stiffness matrix
        b - right hand side vector
Author
Created by P. Bochev, D. Ridzal, K. Peterson, D. Hensinger, C. Siefert. Converted to Tpetra by I. Kalashnikova (ikala.nosp@m.sh@s.nosp@m.andia.nosp@m..gov). Modified by Mark Hoemmen (mhoem.nosp@m.me@s.nosp@m.andia.nosp@m..gov) and a bunch of other people.
Remarks
Use the "--help" command-line argument for usage info.
Example driver has an option to use an input file (XML serialization of a Teuchos::ParameterList) containing a Pamgen mesh description. A version, Poisson.xml, is included in the same directory as this driver. If not included, this program will use a default mesh description.
The exact solution (u) and material tensor (A) are set in the functions "exactSolution" and "materialTensor" and may be modified by the user. We compute the source term f from u using Sacado automatic differentiation, so that u really is the exact solution. The current implementation of exactSolution() has notes to guide your choice of solution. For example, you might want to pick a solution in the finite element space, so that the discrete solution is exact if the solution of the linear system is exact (modulo rounding error when constructing the linear system).