Thyra Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
createTridiagEpetraLinearOp.cpp File Reference
#include "createTridiagEpetraLinearOp.hpp"
#include "Thyra_EpetraLinearOp.hpp"
#include "Epetra_Map.h"
#include "Epetra_CrsMatrix.h"
#include "Epetra_SerialComm.h"
Include dependency graph for createTridiagEpetraLinearOp.cpp:

Go to the source code of this file.

Functions

Teuchos::RCP< Epetra_Operator > createTridiagEpetraLinearOp (const int globalDim, const double diagScale, const bool verbose, std::ostream &out)
 This function generates a tridiagonal linear operator using Epetra. More...
 

Function Documentation

Teuchos::RCP<Epetra_Operator> createTridiagEpetraLinearOp ( const int  globalDim,
const double  diagScale,
const bool  verbose,
std::ostream &  out 
)

This function generates a tridiagonal linear operator using Epetra.

Specifically, this function returns a smart pointer to the matrix:

\[ A= \left[\begin{array}{rrrrrrrrrr} 2 a & -1 \\ -1 & 2 a & -1 \\ & \ddots & \ddots & \ddots \\ & & -1 & 2 a & -1 \\ & & & -1 & 2 a \end{array}\right] \]

where diagScale is $a$ and globalDim is the glboal dimension of the matrix.

Definition at line 53 of file createTridiagEpetraLinearOp.cpp.

References Copy, rcp(), Teuchos::rcp(), and TEUCHOS_TEST_FOR_EXCEPT.

Referenced by main().