#include <Trilinos_Util_CrsMatrixGallery.h>
Public Member Functions | |
VbrMatrixGallery (const string name, const Epetra_Map &map) | |
VbrMatrixGallery (const string name, const Epetra_Comm &Comm) | |
~VbrMatrixGallery () | |
const Epetra_BlockMap * | GetBlockMap () |
Returns a pointer the internally stored BlockMap. | |
const Epetra_BlockMap & | GetBlockMapRef () |
Epetra_VbrMatrix * | GetVbrMatrix (const int NumPDEEqns) |
Returns a VbrMatrix, starting from the CsrMatrix. | |
Epetra_VbrMatrix * | GetVbrMatrix () |
Returns a VbrMatrix, starting from the CsrMatrix. | |
Epetra_VbrMatrix & | GetVbrMatrixRef () |
Epetra_MultiVector * | GetVbrRHS () |
Returns a pointer to the RHS for the selected Vbr exact solution. | |
Epetra_MultiVector * | GetVbrExactSolution () |
Returns a pointer to the selected Vbr exact solution. | |
Epetra_MultiVector * | GetVbrStartingSolution () |
Returns a pointer to the starting solution for Vbr problems. | |
void | CreateVbrMatrix (void) |
Epetra_LinearProblem * | GetVbrLinearProblem () |
Returns a pointer to Epetra_LinearProblem for VBR. | |
void | ComputeResidualVbr (double *residual) |
Computes the 2-norm of the residual for the VBR problem. | |
void | ComputeDiffBetweenStartingAndExactSolutionsVbr (double *residual) |
Computes the 2-norm of the difference between the starting solution and the exact solution for the VBR problem. | |
void | PrintVbrMatrixAndVectors (ostream &os) |
Print out Vbr matrix and vectors. | |
void | PrintVbrMatrixAndVectors () |
Protected Member Functions | |
void | CreateBlockMap (void) |
void | CreateVbrExactSolution (void) |
Creates the exact solution for a Epetra_VbrMatrix. | |
void | CreateVbrStartingSolution () |
Creates the starting solution for Vbr. | |
void | CreateVbrRHS () |
Create the RHS corresponding to the desired exact solution for the Vbr problem. | |
Protected Attributes | |
Epetra_VbrMatrix * | VbrMatrix_ |
Epetra_MultiVector * | VbrExactSolution_ |
Epetra_MultiVector * | VbrStartingSolution_ |
Epetra_MultiVector * | VbrRhs_ |
Epetra_BlockMap * | BlockMap_ |
int | MaxBlkSize_ |
Epetra_LinearProblem * | VbrLinearProblem_ |
Trilinos_Util::VbrMatrixGallery::VbrMatrixGallery | ( | const string | name, | |
const Epetra_Map & | map | |||
) | [inline] |
Trilinos_Util::VbrMatrixGallery::VbrMatrixGallery | ( | const string | name, | |
const Epetra_Comm & | Comm | |||
) | [inline] |
Trilinos_Util::VbrMatrixGallery::~VbrMatrixGallery | ( | ) |
References BlockMap_, VbrExactSolution_, VbrLinearProblem_, VbrMatrix_, VbrRhs_, and VbrStartingSolution_.
void Trilinos_Util::VbrMatrixGallery::ComputeDiffBetweenStartingAndExactSolutionsVbr | ( | double * | residual | ) |
Computes the 2-norm of the difference between the starting solution and the exact solution for the VBR problem.
References BlockMap_, CreateVbrRHS(), Trilinos_Util::CrsMatrixGallery::NumVectors_, VbrExactSolution_, VbrRhs_, and VbrStartingSolution_.
void Trilinos_Util::VbrMatrixGallery::ComputeResidualVbr | ( | double * | residual | ) |
Computes the 2-norm of the residual for the VBR problem.
References BlockMap_, CreateVbrRHS(), Trilinos_Util::CrsMatrixGallery::NumVectors_, VbrMatrix_, VbrRhs_, and VbrStartingSolution_.
void Trilinos_Util::VbrMatrixGallery::CreateBlockMap | ( | void | ) | [protected] |
References BlockMap_, Trilinos_Util::CrsMatrixGallery::comm_, Trilinos_Util::CrsMatrixGallery::CreateMap(), Trilinos_Util::CrsMatrixGallery::ErrorMsg, Trilinos_Util::CrsMatrixGallery::map_, MaxBlkSize_, Trilinos_Util::CrsMatrixGallery::MyGlobalElements_, Trilinos_Util::CrsMatrixGallery::NumGlobalElements_, Trilinos_Util::CrsMatrixGallery::NumMyElements_, Trilinos_Util::CrsMatrixGallery::NumPDEEqns_, Trilinos_Util::CrsMatrixGallery::OutputMsg, and Trilinos_Util::CrsMatrixGallery::verbose_.
Referenced by CreateVbrExactSolution(), CreateVbrMatrix(), CreateVbrRHS(), CreateVbrStartingSolution(), GetBlockMap(), and GetBlockMapRef().
void Trilinos_Util::VbrMatrixGallery::CreateVbrExactSolution | ( | void | ) | [protected] |
Creates the exact solution for a Epetra_VbrMatrix.
References BlockMap_, CreateBlockMap(), Trilinos_Util::CrsMatrixGallery::CreateExactSolution(), Trilinos_Util::CrsMatrixGallery::ExactSolution_, Trilinos_Util::CrsMatrixGallery::NumMyElements_, Trilinos_Util::CrsMatrixGallery::NumPDEEqns_, Trilinos_Util::CrsMatrixGallery::NumVectors_, Trilinos_Util::CrsMatrixGallery::OutputMsg, VbrExactSolution_, and Trilinos_Util::CrsMatrixGallery::verbose_.
Referenced by CreateVbrRHS(), and GetVbrExactSolution().
void Trilinos_Util::VbrMatrixGallery::CreateVbrMatrix | ( | void | ) |
References BlockMap_, Copy, CreateBlockMap(), Trilinos_Util::CrsMatrixGallery::CreateMatrix(), Trilinos_Util::CrsMatrixGallery::ErrorMsg, Trilinos_Util::CrsMatrixGallery::ExpandType_, Trilinos_Util::CrsMatrixGallery::matrix_, MaxBlkSize_, Trilinos_Util::CrsMatrixGallery::MyGlobalElements_, Trilinos_Util::CrsMatrixGallery::NumMyElements_, Trilinos_Util::CrsMatrixGallery::NumPDEEqns_, Trilinos_Util::CrsMatrixGallery::OutputMsg, VbrMatrix_, and Trilinos_Util::CrsMatrixGallery::verbose_.
Referenced by CreateVbrRHS(), GetVbrMatrix(), and GetVbrMatrixRef().
void Trilinos_Util::VbrMatrixGallery::CreateVbrRHS | ( | void | ) | [protected] |
Create the RHS corresponding to the desired exact solution for the Vbr problem.
References BlockMap_, CreateBlockMap(), Trilinos_Util::CrsMatrixGallery::CreateRHS(), CreateVbrExactSolution(), CreateVbrMatrix(), Trilinos_Util::CrsMatrixGallery::NumVectors_, Trilinos_Util::CrsMatrixGallery::OutputMsg, Trilinos_Util::CrsMatrixGallery::rhs_, VbrExactSolution_, VbrMatrix_, VbrRhs_, and Trilinos_Util::CrsMatrixGallery::verbose_.
Referenced by ComputeDiffBetweenStartingAndExactSolutionsVbr(), ComputeResidualVbr(), and GetVbrRHS().
void Trilinos_Util::VbrMatrixGallery::CreateVbrStartingSolution | ( | void | ) | [protected] |
Creates the starting solution for Vbr.
References BlockMap_, CreateBlockMap(), Trilinos_Util::CrsMatrixGallery::CreateStartingSolution(), Trilinos_Util::CrsMatrixGallery::NumMyElements_, Trilinos_Util::CrsMatrixGallery::NumPDEEqns_, Trilinos_Util::CrsMatrixGallery::NumVectors_, Trilinos_Util::CrsMatrixGallery::OutputMsg, Trilinos_Util::CrsMatrixGallery::StartingSolution_, VbrStartingSolution_, and Trilinos_Util::CrsMatrixGallery::verbose_.
Referenced by GetVbrStartingSolution().
const Epetra_BlockMap * Trilinos_Util::VbrMatrixGallery::GetBlockMap | ( | void | ) |
const Epetra_BlockMap & Trilinos_Util::VbrMatrixGallery::GetBlockMapRef | ( | void | ) |
References BlockMap_, and CreateBlockMap().
Epetra_MultiVector * Trilinos_Util::VbrMatrixGallery::GetVbrExactSolution | ( | void | ) |
Returns a pointer to the selected Vbr exact solution.
References CreateVbrExactSolution(), and VbrExactSolution_.
Epetra_LinearProblem * Trilinos_Util::VbrMatrixGallery::GetVbrLinearProblem | ( | void | ) |
Returns a pointer to Epetra_LinearProblem for VBR.
References GetVbrMatrix(), GetVbrRHS(), GetVbrStartingSolution(), and VbrLinearProblem_.
Epetra_VbrMatrix * Trilinos_Util::VbrMatrixGallery::GetVbrMatrix | ( | void | ) |
Returns a VbrMatrix, starting from the CsrMatrix.
References CreateVbrMatrix(), and VbrMatrix_.
Referenced by GetVbrLinearProblem(), and GetVbrMatrix().
Epetra_VbrMatrix * Trilinos_Util::VbrMatrixGallery::GetVbrMatrix | ( | const int | NumPDEEqns | ) |
Returns a VbrMatrix, starting from the CsrMatrix.
Returns a VbrMatrix, starting from the CsrMatrix. This vbr matrix is formally equivalent to the CrsMatrix returned by GetMatrix(). However, each node of the CrsMatrix is replicated num_PDE_eqns times (this value is passed in input, or set via Set("num pde eqns",IntValue)).
References BlockMap_, GetVbrMatrix(), and Trilinos_Util::CrsMatrixGallery::NumPDEEqns_.
Epetra_VbrMatrix & Trilinos_Util::VbrMatrixGallery::GetVbrMatrixRef | ( | void | ) |
References CreateVbrMatrix(), and VbrMatrix_.
Epetra_MultiVector * Trilinos_Util::VbrMatrixGallery::GetVbrRHS | ( | void | ) |
Returns a pointer to the RHS for the selected Vbr exact solution.
Returns a pointer to the RHS corresponding to the selected exact solution to the linear systems defined by the Epetra_VbrMatrix.
References CreateVbrRHS(), and VbrRhs_.
Referenced by GetVbrLinearProblem().
Epetra_MultiVector * Trilinos_Util::VbrMatrixGallery::GetVbrStartingSolution | ( | void | ) |
Returns a pointer to the starting solution for Vbr problems.
References CreateVbrStartingSolution(), and VbrStartingSolution_.
Referenced by GetVbrLinearProblem().
void Trilinos_Util::VbrMatrixGallery::PrintVbrMatrixAndVectors | ( | ) |
void Trilinos_Util::VbrMatrixGallery::PrintVbrMatrixAndVectors | ( | ostream & | os | ) |
Print out Vbr matrix and vectors.
References Trilinos_Util::CrsMatrixGallery::comm_, VbrMatrix_, and VbrRhs_.
Epetra_BlockMap* Trilinos_Util::VbrMatrixGallery::BlockMap_ [protected] |
int Trilinos_Util::VbrMatrixGallery::MaxBlkSize_ [protected] |
Referenced by CreateBlockMap(), and CreateVbrMatrix().
Epetra_MultiVector* Trilinos_Util::VbrMatrixGallery::VbrExactSolution_ [protected] |
Epetra_LinearProblem* Trilinos_Util::VbrMatrixGallery::VbrLinearProblem_ [protected] |
Referenced by GetVbrLinearProblem(), and ~VbrMatrixGallery().
Epetra_VbrMatrix* Trilinos_Util::VbrMatrixGallery::VbrMatrix_ [protected] |
Epetra_MultiVector* Trilinos_Util::VbrMatrixGallery::VbrRhs_ [protected] |
Epetra_MultiVector* Trilinos_Util::VbrMatrixGallery::VbrStartingSolution_ [protected] |