Poisson2dOperator Class Reference

Poisson2dOperator: A sample implementation of the Epetra_Operator class. More...

#include <Poisson2dOperator.h>

Inheritance diagram for Poisson2dOperator:

[legend]
List of all members.

Constructors.

 Poisson2dOperator (int nx, int ny, const Epetra_Comm &comm)
 Builds a 2 dimensional Poisson operator for a nx by ny grid, assuming zero Dirichlet BCs.

Destructor.

 ~Poisson2dOperator ()
 Destructor.

Atribute set methods.

int SetUseTranspose (bool UseTranspose)
 If set true, transpose of this operator will be applied.

Mathematical functions.

int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Poisson2dOperator applied to a Epetra_MultiVector X in Y.
int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Poisson2dOperator inverse applied to an Epetra_MultiVector X in Y.
double NormInf () const
 Returns the infinity norm of the global matrix.

Atribute access functions

const char * Label () const
 Returns a character string describing the operator.
bool UseTranspose () const
 Returns the current UseTranspose setting.
bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise.
const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator.
const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this operator.
const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator.

Approximate matrix generators

Epetra_CrsMatrixGeneratePrecMatrix () const
 Generate a tridiagonal approximation to the 5-point Poisson as an Epetra_CrsMatrix.

Public Attributes

int nx_
int ny_
int myny_
bool useTranspose_
const Epetra_Commcomm_
Epetra_Mapmap_
int numImports_
int * importIDs_
Epetra_MapimportMap_
Epetra_Importimporter_
Epetra_MultiVectorimportX_
char * Label_

Detailed Description

Poisson2dOperator: A sample implementation of the Epetra_Operator class.

The Poisson2dOperator class is a class that implements Epetra_Operator for a 5-point Poisson stencil operator.

Definition at line 46 of file Poisson2dOperator.h.


Constructor & Destructor Documentation

Poisson2dOperator::Poisson2dOperator int  nx,
int  ny,
const Epetra_Comm comm
 

Builds a 2 dimensional Poisson operator for a nx by ny grid, assuming zero Dirichlet BCs.

Build a 2 D Poisson operator. Split the y-dimension across the processor space.

Parameters:
In nx - Number of gridpoints in the x direction.
In ny - Number of gridpoints in the y direction.

Definition at line 39 of file Poisson2dOperator.cpp.

Poisson2dOperator::~Poisson2dOperator  ) 
 

Destructor.

Definition at line 94 of file Poisson2dOperator.cpp.


Member Function Documentation

int Poisson2dOperator::SetUseTranspose bool  UseTranspose  )  [inline, virtual]
 

If set true, transpose of this operator will be applied.

This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of -1.

Parameters:
In UseTranspose -If true, multiply by the transpose of operator, otherwise just use operator.
Returns:
Integer error code, set to 0 if successful. Set to -1 if this implementation does not support transpose.

Implements Epetra_Operator.

Definition at line 74 of file Poisson2dOperator.h.

int Poisson2dOperator::Apply const Epetra_MultiVector X,
Epetra_MultiVector Y
const [virtual]
 

Returns the result of a Poisson2dOperator applied to a Epetra_MultiVector X in Y.

Parameters:
In X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix.
Out Y -A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.

Implements Epetra_Operator.

Definition at line 102 of file Poisson2dOperator.cpp.

int Poisson2dOperator::ApplyInverse const Epetra_MultiVector X,
Epetra_MultiVector Y
const [inline, virtual]
 

Returns the result of a Poisson2dOperator inverse applied to an Epetra_MultiVector X in Y.

Parameters:
In X - A Epetra_MultiVector of dimension NumVectors to solve for.
Out Y -A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.
Warning:
In order to work with AztecOO, any implementation of this method must support the case where X and Y are the same object.

Implements Epetra_Operator.

Definition at line 102 of file Poisson2dOperator.h.

double Poisson2dOperator::NormInf  )  const [inline, virtual]
 

Returns the infinity norm of the global matrix.

Implements Epetra_Operator.

Definition at line 110 of file Poisson2dOperator.h.

const char* Poisson2dOperator::Label  )  const [inline, virtual]
 

Returns a character string describing the operator.

Implements Epetra_Operator.

Definition at line 116 of file Poisson2dOperator.h.

bool Poisson2dOperator::UseTranspose  )  const [inline, virtual]
 

Returns the current UseTranspose setting.

Implements Epetra_Operator.

Definition at line 119 of file Poisson2dOperator.h.

bool Poisson2dOperator::HasNormInf  )  const [inline, virtual]
 

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements Epetra_Operator.

Definition at line 122 of file Poisson2dOperator.h.

const Epetra_Comm& Poisson2dOperator::Comm  )  const [inline, virtual]
 

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Implements Epetra_Operator.

Definition at line 125 of file Poisson2dOperator.h.

const Epetra_Map& Poisson2dOperator::OperatorDomainMap  )  const [inline, virtual]
 

Returns the Epetra_Map object associated with the domain of this operator.

Implements Epetra_Operator.

Definition at line 128 of file Poisson2dOperator.h.

const Epetra_Map& Poisson2dOperator::OperatorRangeMap  )  const [inline, virtual]
 

Returns the Epetra_Map object associated with the range of this operator.

Implements Epetra_Operator.

Definition at line 131 of file Poisson2dOperator.h.

Epetra_CrsMatrix * Poisson2dOperator::GeneratePrecMatrix  )  const
 

Generate a tridiagonal approximation to the 5-point Poisson as an Epetra_CrsMatrix.

Definition at line 182 of file Poisson2dOperator.cpp.


Member Data Documentation

int Poisson2dOperator::nx_
 

Definition at line 141 of file Poisson2dOperator.h.

int Poisson2dOperator::ny_
 

Definition at line 141 of file Poisson2dOperator.h.

int Poisson2dOperator::myny_
 

Definition at line 141 of file Poisson2dOperator.h.

bool Poisson2dOperator::useTranspose_
 

Definition at line 142 of file Poisson2dOperator.h.

const Epetra_Comm& Poisson2dOperator::comm_
 

Definition at line 143 of file Poisson2dOperator.h.

Epetra_Map* Poisson2dOperator::map_
 

Definition at line 144 of file Poisson2dOperator.h.

int Poisson2dOperator::numImports_
 

Definition at line 145 of file Poisson2dOperator.h.

int* Poisson2dOperator::importIDs_
 

Definition at line 146 of file Poisson2dOperator.h.

Epetra_Map* Poisson2dOperator::importMap_
 

Definition at line 147 of file Poisson2dOperator.h.

Epetra_Import* Poisson2dOperator::importer_
 

Definition at line 148 of file Poisson2dOperator.h.

Epetra_MultiVector* Poisson2dOperator::importX_ [mutable]
 

Definition at line 149 of file Poisson2dOperator.h.

char* Poisson2dOperator::Label_
 

Definition at line 150 of file Poisson2dOperator.h.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:32:05 2008 for EpetraExt Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1