TriUtils Development
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Trilinos_Util::VbrMatrixGallery Class Reference

#include <Trilinos_Util_CrsMatrixGallery.h>

Inheritance diagram for Trilinos_Util::VbrMatrixGallery:
Inheritance graph
[legend]
Collaboration diagram for Trilinos_Util::VbrMatrixGallery:
Collaboration graph
[legend]

Public Member Functions

 VbrMatrixGallery (const std::string name, const Epetra_Map &map)
 
 VbrMatrixGallery (const std::string name, const Epetra_Comm &Comm, bool UseLongLong=false)
 
 ~VbrMatrixGallery ()
 
const Epetra_BlockMapGetBlockMap ()
 Returns a pointer the internally stored BlockMap.
 
const Epetra_BlockMapGetBlockMapRef ()
 
Epetra_VbrMatrixGetVbrMatrix (const int NumPDEEqns)
 Returns a VbrMatrix, starting from the CsrMatrix.
 
Epetra_VbrMatrixGetVbrMatrix ()
 Returns a VbrMatrix, starting from the CsrMatrix.
 
Epetra_VbrMatrixGetVbrMatrixRef ()
 
Epetra_MultiVectorGetVbrRHS ()
 Returns a pointer to the RHS for the selected Vbr exact solution.
 
Epetra_MultiVectorGetVbrExactSolution ()
 Returns a pointer to the selected Vbr exact solution.
 
Epetra_MultiVectorGetVbrStartingSolution ()
 Returns a pointer to the starting solution for Vbr problems.
 
void CreateVbrMatrix (void)
 
template<typename int_type >
void TCreateVbrMatrix (void)
 
Epetra_LinearProblemGetVbrLinearProblem ()
 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 (std::ostream &os)
 Print out Vbr matrix and vectors.
 
void PrintVbrMatrixAndVectors ()
 
- Public Member Functions inherited from Trilinos_Util::CrsMatrixGallery
 CrsMatrixGallery (const std::string name, const Epetra_Comm &comm, bool UseLongLong=false)
 Triutils_Gallery Constructor.
 
 CrsMatrixGallery (const std::string name, const Epetra_Map &map)
 Creates an Triutils_Gallery object using a given map.
 
 ~CrsMatrixGallery ()
 Triutils_Gallery destructor.
 
int Set (const std::string parameter, const int value)
 Sets a gallery options using an interger value.
 
int Set (const std::string parameter, const std::string value)
 Sets a gallery options using a C++ string .
 
int Set (const std::string parameter, const double value)
 Sets a gallery options using an double value.
 
int Set (const std::string parameter, const Epetra_Vector &value)
 Sets a gallery options using an Epetra_Vector.
 
int Set (Trilinos_Util::CommandLineParser &CLP)
 Sets gallery options using values passed from the shell.
 
Epetra_CrsMatrixGetMatrix ()
 Returns a pointer to the CrsMatrix.
 
Epetra_CrsMatrixGetMatrixRef ()
 
Epetra_MultiVectorGetExactSolution ()
 Returns a pointer to the exact solution.
 
Epetra_MultiVectorGetStartingSolution ()
 Returns a pointer to the starting solution (typically, for HB problems).
 
Epetra_MultiVectorGetRHS ()
 Returns a pointer to the rhs corresponding to the selected exact solution.
 
const Epetra_MapGetMap ()
 Returns a pointer the internally stored Map.
 
const Epetra_MapGetMapRef ()
 
Epetra_LinearProblemGetLinearProblem ()
 Returns a pointer to Epetra_LinearProblem.
 
void ComputeResidual (double *residual)
 Computes the 2-norm of the residual.
 
void ComputeDiffBetweenStartingAndExactSolutions (double *residual)
 Computes the 2-norm of the difference between the starting solution and the exact solution.
 
void PrintMatrixAndVectors (std::ostream &os)
 Print out matrix and vectors.
 
void PrintMatrixAndVectors ()
 
void GetCartesianCoordinates (double *&x, double *&y, double *&z)
 Get pointers to double vectors containing coordinates of points.
 
int WriteMatrix (const std::string &FileName, const bool UseSparse=true)
 Print matrix on file in MATLAB format.
 

Protected Member Functions

void CreateBlockMap (void)
 
template<typename int_type >
void TCreateBlockMap (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 Member Functions inherited from Trilinos_Util::CrsMatrixGallery
void CreateMap ()
 Creates a map.
 
template<typename int_type >
void TCreateMap ()
 
void CreateMatrix ()
 Creates the CrdMatrix.
 
template<typename int_type >
void TCreateMatrix ()
 
template<typename int_type >
void TCreateExactSolution ()
 Creates the exact solution.
 
void CreateExactSolution ()
 
void CreateStartingSolution ()
 Creates the starting solution.
 
template<typename int_type >
void TCreateRHS ()
 Create the RHS corresponding to the desired exact solution.
 
void CreateRHS ()
 
template<typename int_type >
void CreateEye ()
 
template<typename int_type >
void CreateMatrixDiag ()
 
template<typename int_type >
void CreateMatrixTriDiag ()
 
template<typename int_type >
void CreateMatrixLaplace1d ()
 
template<typename int_type >
void CreateMatrixLaplace1dNeumann ()
 
template<typename int_type >
void CreateMatrixCrossStencil2d ()
 
template<typename int_type >
void CreateMatrixCrossStencil2dVector ()
 
template<typename int_type >
void CreateMatrixLaplace2d ()
 
template<typename int_type >
void CreateMatrixLaplace2d_BC ()
 
template<typename int_type >
void CreateMatrixLaplace2d_9pt ()
 
template<typename int_type >
void CreateMatrixStretched2d ()
 
template<typename int_type >
void CreateMatrixRecirc2d ()
 
template<typename int_type >
void CreateMatrixRecirc2dDivFree ()
 
template<typename int_type >
void CreateMatrixLaplace2dNeumann ()
 
template<typename int_type >
void CreateMatrixUniFlow2d ()
 
template<typename int_type >
void CreateMatrixLaplace3d ()
 
template<typename int_type >
void CreateMatrixCrossStencil3d ()
 
template<typename int_type >
void CreateMatrixCrossStencil3dVector ()
 
template<typename int_type >
void CreateMatrixLehmer ()
 
template<typename int_type >
void CreateMatrixMinij ()
 
template<typename int_type >
void CreateMatrixRis ()
 
template<typename int_type >
void CreateMatrixHilbert ()
 
template<typename int_type >
void CreateMatrixJordblock ()
 
template<typename int_type >
void CreateMatrixCauchy ()
 
template<typename int_type >
void CreateMatrixFiedler ()
 
template<typename int_type >
void CreateMatrixHanowa ()
 
template<typename int_type >
void CreateMatrixKMS ()
 
template<typename int_type >
void CreateMatrixParter ()
 
template<typename int_type >
void CreateMatrixPei ()
 
template<typename int_type >
void CreateMatrixOnes ()
 
template<typename int_type >
void CreateMatrixVander ()
 
template<typename int_type >
void TReadMatrix ()
 
void GetNeighboursCartesian2d (const int i, const int nx, const int ny, int &left, int &right, int &lower, int &upper)
 
void GetNeighboursCartesian3d (const int i, const int nx, const int ny, const int nz, int &left, int &right, int &lower, int &upper, int &below, int &above)
 
template<typename int_type >
void TGetCartesianCoordinates (double *&x, double *&y, double *&z)
 
void ZeroOutData ()
 
void SetupCartesianGrid2D ()
 
void SetupCartesianGrid3D ()
 
void ExactSolQuadXY (double x, double y, double &u)
 
void ExactSolQuadXY (double x, double y, double &u, double &ux, double &uy, double &uxx, double &uyy)
 
template<typename int_type >
int_type *& MyGlobalElementsPtr ()
 
template<typename int_type >
std::vector< int_type > & MapMapRef ()
 
template<>
long long *& MyGlobalElementsPtr ()
 
template<>
std::vector< long long > & MapMapRef ()
 
template<>
int *& MyGlobalElementsPtr ()
 
template<>
std::vector< int > & MapMapRef ()
 

Protected Attributes

Epetra_VbrMatrixVbrMatrix_
 
Epetra_MultiVectorVbrExactSolution_
 
Epetra_MultiVectorVbrStartingSolution_
 
Epetra_MultiVectorVbrRhs_
 
Epetra_BlockMapBlockMap_
 
int MaxBlkSize_
 
Epetra_LinearProblemVbrLinearProblem_
 
- Protected Attributes inherited from Trilinos_Util::CrsMatrixGallery
const Epetra_Commcomm_
 
Epetra_CrsMatrixmatrix_
 
Epetra_MultiVectorExactSolution_
 
Epetra_MultiVectorStartingSolution_
 
Epetra_MultiVectorrhs_
 
Epetra_Mapmap_
 
Epetra_LinearProblemLinearProblem_
 
std::string name_
 
long long NumGlobalElements_
 
int NumMyElements_
 
int * MyGlobalElements_int_
 
std::vector< int > MapMap_int_
 
long long * MyGlobalElements_LL_
 
std::vector< long long > MapMap_LL_
 
std::string MapType_
 
bool ContiguousMap_
 
std::string ExactSolutionType_
 
std::string StartingSolutionType_
 
std::string ExpandType_
 
std::string RhsType_
 
int nx_
 
int ny_
 
int nz_
 
int mx_
 
int my_
 
int mz_
 
double lx_
 
double ly_
 
double lz_
 
int NumPDEEqns_
 
int NumVectors_
 
Epetra_VectorVectorA_
 
Epetra_VectorVectorB_
 
Epetra_VectorVectorC_
 
Epetra_VectorVectorD_
 
Epetra_VectorVectorE_
 
Epetra_VectorVectorF_
 
Epetra_VectorVectorG_
 
double a_
 
double b_
 
double c_
 
double d_
 
double e_
 
double f_
 
double g_
 
double alpha_
 
double beta_
 
double gamma_
 
double delta_
 
double conv_
 
double diff_
 
double source_
 
double epsilon_
 
std::string FileName_
 
std::string ErrorMsg
 
std::string OutputMsg
 
bool verbose_
 
bool UseLongLong_
 

Constructor & Destructor Documentation

◆ VbrMatrixGallery() [1/2]

Trilinos_Util::VbrMatrixGallery::VbrMatrixGallery ( const std::string name,
const Epetra_Map & map )
inline

◆ VbrMatrixGallery() [2/2]

Trilinos_Util::VbrMatrixGallery::VbrMatrixGallery ( const std::string name,
const Epetra_Comm & Comm,
bool UseLongLong = false )
inline

◆ ~VbrMatrixGallery()

Trilinos_Util::VbrMatrixGallery::~VbrMatrixGallery ( )

Member Function Documentation

◆ ComputeDiffBetweenStartingAndExactSolutionsVbr()

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 Epetra_MultiVector::Norm2(), and Epetra_MultiVector::Update().

◆ ComputeResidualVbr()

void Trilinos_Util::VbrMatrixGallery::ComputeResidualVbr ( double * residual)

Computes the 2-norm of the residual for the VBR problem.

References Epetra_MultiVector::Norm2(), and Epetra_MultiVector::Update().

◆ CreateBlockMap()

void Trilinos_Util::VbrMatrixGallery::CreateBlockMap ( void )
protected

◆ CreateVbrExactSolution()

void Trilinos_Util::VbrMatrixGallery::CreateVbrExactSolution ( void )
protected

Creates the exact solution for a Epetra_VbrMatrix.

◆ CreateVbrMatrix()

void Trilinos_Util::VbrMatrixGallery::CreateVbrMatrix ( void )

◆ CreateVbrRHS()

void Trilinos_Util::VbrMatrixGallery::CreateVbrRHS ( void )
protected

Create the RHS corresponding to the desired exact solution for the Vbr problem.

◆ CreateVbrStartingSolution()

void Trilinos_Util::VbrMatrixGallery::CreateVbrStartingSolution ( void )
protected

Creates the starting solution for Vbr.

◆ GetBlockMap()

const Epetra_BlockMap * Trilinos_Util::VbrMatrixGallery::GetBlockMap ( void )

Returns a pointer the internally stored BlockMap.

◆ GetBlockMapRef()

const Epetra_BlockMap & Trilinos_Util::VbrMatrixGallery::GetBlockMapRef ( void )

◆ GetVbrExactSolution()

Epetra_MultiVector * Trilinos_Util::VbrMatrixGallery::GetVbrExactSolution ( void )

Returns a pointer to the selected Vbr exact solution.

◆ GetVbrLinearProblem()

Epetra_LinearProblem * Trilinos_Util::VbrMatrixGallery::GetVbrLinearProblem ( void )

Returns a pointer to Epetra_LinearProblem for VBR.

◆ GetVbrMatrix() [1/2]

Epetra_VbrMatrix * Trilinos_Util::VbrMatrixGallery::GetVbrMatrix ( void )

Returns a VbrMatrix, starting from the CsrMatrix.

◆ GetVbrMatrix() [2/2]

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)).

◆ GetVbrMatrixRef()

Epetra_VbrMatrix & Trilinos_Util::VbrMatrixGallery::GetVbrMatrixRef ( void )

◆ GetVbrRHS()

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.

◆ GetVbrStartingSolution()

Epetra_MultiVector * Trilinos_Util::VbrMatrixGallery::GetVbrStartingSolution ( void )

Returns a pointer to the starting solution for Vbr problems.

◆ PrintVbrMatrixAndVectors() [1/2]

void Trilinos_Util::VbrMatrixGallery::PrintVbrMatrixAndVectors ( )

◆ PrintVbrMatrixAndVectors() [2/2]

void Trilinos_Util::VbrMatrixGallery::PrintVbrMatrixAndVectors ( std::ostream & os)

Print out Vbr matrix and vectors.

◆ TCreateBlockMap()

template<typename int_type >
void Trilinos_Util::VbrMatrixGallery::TCreateBlockMap ( void )
protected

◆ TCreateVbrMatrix()

template<typename int_type >
void Trilinos_Util::VbrMatrixGallery::TCreateVbrMatrix ( void )

Member Data Documentation

◆ BlockMap_

Epetra_BlockMap* Trilinos_Util::VbrMatrixGallery::BlockMap_
protected

◆ MaxBlkSize_

int Trilinos_Util::VbrMatrixGallery::MaxBlkSize_
protected

◆ VbrExactSolution_

Epetra_MultiVector* Trilinos_Util::VbrMatrixGallery::VbrExactSolution_
protected

◆ VbrLinearProblem_

Epetra_LinearProblem* Trilinos_Util::VbrMatrixGallery::VbrLinearProblem_
protected

◆ VbrMatrix_

Epetra_VbrMatrix* Trilinos_Util::VbrMatrixGallery::VbrMatrix_
protected

◆ VbrRhs_

Epetra_MultiVector* Trilinos_Util::VbrMatrixGallery::VbrRhs_
protected

◆ VbrStartingSolution_

Epetra_MultiVector* Trilinos_Util::VbrMatrixGallery::VbrStartingSolution_
protected

The documentation for this class was generated from the following files: