EpetraExt Package Browser (Single Doxygen Collection)
Development
|
Poisson2dOperator: A sample implementation of the Epetra_Operator class. More...
#include <Poisson2dOperator.h>
Public Attributes | |
int | nx_ |
int | ny_ |
int | myny_ |
bool | useTranspose_ |
const Epetra_Comm & | comm_ |
Epetra_Map * | map_ |
int | numImports_ |
int * | importIDs_ |
Epetra_Map * | importMap_ |
Epetra_Import * | importer_ |
Epetra_MultiVector * | importX_ |
const char * | Label_ |
long long * | importIDs_ |
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. More... | |
~Poisson2dOperator () | |
Destructor. More... | |
int | SetUseTranspose (bool useTranspose) |
If useTranspose = true, apply the transpose from now on. More... | |
int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Returns the result of a Poisson2dOperator applied to a Epetra_MultiVector X in Y. More... | |
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. More... | |
double | NormInf () const |
Returns the infinity norm of the global matrix. More... | |
const char * | Label () const |
Returns a character string describing the operator. More... | |
bool | UseTranspose () const |
Returns the current UseTranspose setting. More... | |
bool | HasNormInf () const |
Returns true if the this object can provide an approximate Inf-norm, false otherwise. More... | |
const Epetra_Comm & | Comm () const |
Returns a pointer to the Epetra_Comm communicator associated with this operator. More... | |
const Epetra_Map & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. More... | |
const Epetra_Map & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. More... | |
Epetra_CrsMatrix * | GeneratePrecMatrix () const |
Generate a tridiagonal approximation to the 5-point Poisson as an Epetra_CrsMatrix. More... | |
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. More... | |
~Poisson2dOperator () | |
Destructor. More... | |
int | SetUseTranspose (bool UseTranspose) |
If set true, transpose of this operator will be applied. More... | |
int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Returns the result of a Poisson2dOperator applied to a Epetra_MultiVector X in Y. More... | |
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. More... | |
double | NormInf () const |
Returns the infinity norm of the global matrix. More... | |
const char * | Label () const |
Returns a character string describing the operator. More... | |
bool | UseTranspose () const |
Returns the current UseTranspose setting. More... | |
bool | HasNormInf () const |
Returns true if the this object can provide an approximate Inf-norm, false otherwise. More... | |
const Epetra_Comm & | Comm () const |
Returns a pointer to the Epetra_Comm communicator associated with this operator. More... | |
const Epetra_Map & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. More... | |
const Epetra_Map & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. More... | |
Epetra_CrsMatrix * | GeneratePrecMatrix () const |
Generate a tridiagonal approximation to the 5-point Poisson as an Epetra_CrsMatrix. More... | |
Additional Inherited Members |
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 59 of file Poisson2dOperator.h.
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.
In | nx - Number of gridpoints in the x direction. |
In | ny - Number of gridpoints in the y direction. |
Definition at line 52 of file Poisson2dOperator.cpp.
Poisson2dOperator::~Poisson2dOperator | ( | ) |
Destructor.
Definition at line 107 of file Poisson2dOperator.cpp.
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.
In | nx - Number of gridpoints in the x direction. |
In | ny - Number of gridpoints in the y direction. |
Poisson2dOperator::~Poisson2dOperator | ( | ) |
Destructor.
|
inlinevirtual |
If useTranspose
= true, apply the transpose from now on.
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.
useTranspose | [in] If true, this operator from now on switches to use its transpose. Otherwise, this operator from now on does not use its transpose. |
Implements Epetra_Operator.
Definition at line 88 of file Poisson2dOperator.h.
|
virtual |
Returns the result of a Poisson2dOperator applied to a Epetra_MultiVector X in Y.
In | X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix. |
Out | Y -A Epetra_MultiVector of dimension NumVectors containing result. |
Implements Epetra_Operator.
Definition at line 115 of file Poisson2dOperator.cpp.
|
inlinevirtual |
Returns the result of a Poisson2dOperator inverse applied to an Epetra_MultiVector X in Y.
In | X - A Epetra_MultiVector of dimension NumVectors to solve for. |
Out | Y -A Epetra_MultiVector of dimension NumVectors containing result. |
Implements Epetra_Operator.
Definition at line 116 of file Poisson2dOperator.h.
|
inlinevirtual |
Returns the infinity norm of the global matrix.
Implements Epetra_Operator.
Definition at line 124 of file Poisson2dOperator.h.
|
inlinevirtual |
Returns a character string describing the operator.
Implements Epetra_Operator.
Definition at line 130 of file Poisson2dOperator.h.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 133 of file Poisson2dOperator.h.
|
inlinevirtual |
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Implements Epetra_Operator.
Definition at line 136 of file Poisson2dOperator.h.
|
inlinevirtual |
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Implements Epetra_Operator.
Definition at line 139 of file Poisson2dOperator.h.
|
inlinevirtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements Epetra_Operator.
Definition at line 142 of file Poisson2dOperator.h.
|
inlinevirtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements Epetra_Operator.
Definition at line 145 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 195 of file Poisson2dOperator.cpp.
|
inlinevirtual |
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.
In | UseTranspose -If true, multiply by the transpose of operator, otherwise just use operator. |
Implements Epetra_Operator.
Definition at line 87 of file LL/Poisson2dOperator.h.
|
virtual |
Returns the result of a Poisson2dOperator applied to a Epetra_MultiVector X in Y.
In | X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix. |
Out | Y -A Epetra_MultiVector of dimension NumVectors containing result. |
Implements Epetra_Operator.
|
inlinevirtual |
Returns the result of a Poisson2dOperator inverse applied to an Epetra_MultiVector X in Y.
In | X - A Epetra_MultiVector of dimension NumVectors to solve for. |
Out | Y -A Epetra_MultiVector of dimension NumVectors containing result. |
Implements Epetra_Operator.
Definition at line 115 of file LL/Poisson2dOperator.h.
|
inlinevirtual |
Returns the infinity norm of the global matrix.
Implements Epetra_Operator.
Definition at line 123 of file LL/Poisson2dOperator.h.
|
inlinevirtual |
Returns a character string describing the operator.
Implements Epetra_Operator.
Definition at line 129 of file LL/Poisson2dOperator.h.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.
Definition at line 132 of file LL/Poisson2dOperator.h.
|
inlinevirtual |
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Implements Epetra_Operator.
Definition at line 135 of file LL/Poisson2dOperator.h.
|
inlinevirtual |
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Implements Epetra_Operator.
Definition at line 138 of file LL/Poisson2dOperator.h.
|
inlinevirtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements Epetra_Operator.
Definition at line 141 of file LL/Poisson2dOperator.h.
|
inlinevirtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements Epetra_Operator.
Definition at line 144 of file LL/Poisson2dOperator.h.
Epetra_CrsMatrix* Poisson2dOperator::GeneratePrecMatrix | ( | ) | const |
Generate a tridiagonal approximation to the 5-point Poisson as an Epetra_CrsMatrix.
int Poisson2dOperator::nx_ |
Definition at line 155 of file Poisson2dOperator.h.
int Poisson2dOperator::ny_ |
Definition at line 155 of file Poisson2dOperator.h.
int Poisson2dOperator::myny_ |
Definition at line 155 of file Poisson2dOperator.h.
bool Poisson2dOperator::useTranspose_ |
Definition at line 156 of file Poisson2dOperator.h.
const Epetra_Comm & Poisson2dOperator::comm_ |
Definition at line 157 of file Poisson2dOperator.h.
Epetra_Map * Poisson2dOperator::map_ |
Definition at line 158 of file Poisson2dOperator.h.
int Poisson2dOperator::numImports_ |
Definition at line 159 of file Poisson2dOperator.h.
int* Poisson2dOperator::importIDs_ |
Definition at line 160 of file Poisson2dOperator.h.
Epetra_Map * Poisson2dOperator::importMap_ |
Definition at line 161 of file Poisson2dOperator.h.
Epetra_Import * Poisson2dOperator::importer_ |
Definition at line 162 of file Poisson2dOperator.h.
|
mutable |
Definition at line 163 of file Poisson2dOperator.h.
const char * Poisson2dOperator::Label_ |
Definition at line 164 of file Poisson2dOperator.h.
long long* Poisson2dOperator::importIDs_ |
Definition at line 159 of file LL/Poisson2dOperator.h.