TriUtils Development
Loading...
Searching...
No Matches
Trilinos_Util::CrsMatrixGallery Class Reference

#include <Trilinos_Util_CrsMatrixGallery.h>

Inheritance diagram for Trilinos_Util::CrsMatrixGallery:
Collaboration diagram for Trilinos_Util::CrsMatrixGallery:

Public Member Functions

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

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_

Friends

std::ostream & operator<< (std::ostream &os, const Trilinos_Util::CrsMatrixGallery &G)
 Print out detailed information about the problem at hand.

Constructor & Destructor Documentation

◆ CrsMatrixGallery() [1/2]

Trilinos_Util::CrsMatrixGallery::CrsMatrixGallery ( const std::string name,
const Epetra_Comm & comm,
bool UseLongLong = false )

Triutils_Gallery Constructor.

Creates a Triutils_Gallery instance.

The first parameter is the name of the matrix. We refer to the Trilinos Tutorial for a detailed description of available matrices.

Note
The matrix name can be empty (""), and set later using, for example, Set("matrix_name","laplace_2d");

An example of program using this class is reported below.

int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc,&argv);
Epetra_MpiComm Comm (MPI_COMM_WORLD);
#else
#endif
// create an Epetra matrix reading an H/B matrix
Trilinos_Util_CrsMatrixGallery Gallery("hb", Comm);
// set the name of the matrix
Gallery.Set("matrix name", "bcsstk14.rsa");
Epetra_Vector * ExactSolution;
Epetra_Vector * StartingSolution;
// at this point the matrix is read from file
A = Gallery.GetMatrix();
ExactSolution = Gallery.GetExactSolution();
// at this point the RHS is allocated and filled
RHS = Gallery.GetRHS();
StartingSolution = Gallery.GetStartingSolution();
// create linear problem
Epetra_LinearProblem Problem(A,StartingSolution,RHS);
// create AztecOO instance
AztecOO Solver(Problem);
Solver.SetAztecOption( AZ_precond, AZ_dom_decomp );
Solver.Iterate(1000,1E-9);
// compute residual
double residual;
Gallery.ComputeResidual(&residual);
if( Comm.MyPID()==0 ) cout << "||b-Ax||_2 = " << residual << endl;
Gallery.ComputeDiffBetweenStartingAndExactSolutions(&residual);
if( Comm.MyPID()==0 ) cout << "||x_exact - x||_2 = " << residual << endl;
#ifdef HAVE_MPI
MPI_Finalize() ;
#endif
return 0 ;
}
int MyPID() const

Class CommandLineParser can be used as well. In this case, one may decide to use the following:

// set a problem with no matrix name
// read parameters and settings from the shell line
G.Set(CLP);
// continue with your code...
Trilinos_Util::CommandLineParser: A class for managing the input arguments and variables.
Definition Trilinos_Util_CommandLineParser.h:232
Definition Trilinos_Util_CrsMatrixGallery.h:67
Parameters
Incomm - Epetra communicator

Referenced by Trilinos_Util::VbrMatrixGallery::VbrMatrixGallery(), and Trilinos_Util::VbrMatrixGallery::VbrMatrixGallery().

◆ CrsMatrixGallery() [2/2]

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

Creates an Triutils_Gallery object using a given map.

Create a Triutils_Gallery object using an Epetra_Map. Problem size must match the elements in map.

Parameters
Inname - definition of the problem to be created.
Inmap - Epetra_Map

◆ ~CrsMatrixGallery()

Trilinos_Util::CrsMatrixGallery::~CrsMatrixGallery ( void )

Member Function Documentation

◆ ComputeDiffBetweenStartingAndExactSolutions()

void Trilinos_Util::CrsMatrixGallery::ComputeDiffBetweenStartingAndExactSolutions ( double * residual)

Computes the 2-norm of the difference between the starting solution and the exact solution.

References CreateRHS(), ExactSolution_, map_, Epetra_MultiVector::Norm2(), NumVectors_, rhs_, StartingSolution_, and Epetra_MultiVector::Update().

◆ ComputeResidual()

void Trilinos_Util::CrsMatrixGallery::ComputeResidual ( double * residual)

◆ CreateExactSolution()

void Trilinos_Util::CrsMatrixGallery::CreateExactSolution ( void )
protected

◆ CreateEye()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateEye ( void )
protected

References a_, CreateMatrixDiag(), OutputMsg, and verbose_.

Referenced by TCreateMatrix().

◆ CreateMap()

void Trilinos_Util::CrsMatrixGallery::CreateMap ( void )
protected

Creates a map.

Creates an Epetra_Map. Before calling this function, the problem size must have been specified.

CreateMap() allows some different maps. The type of map is set using Set("map",value). Value is a string, defined as:

  • linear: Creates a linear map. Elements are divided into continuous chunks among the processors.
  • box: used for problems defined on cartesian grids over a square. The nodes is subdivided into mx x my subdomains. mx and my are specified via Set("mx",IntValue) and Set("my",IntValue).
  • interlaces: elements are subdivided so that element i is assigned to process iNumProcs.
  • random: assign each node to a random process
  • greedy: (only for HB matrices) implements a greedy algorithm to decompose the graph of the HB matrix among the processes

References TCreateMap(), and UseLongLong_.

Referenced by CreateStartingSolution(), GetMap(), GetMapRef(), Trilinos_Util::VbrMatrixGallery::TCreateBlockMap(), TCreateExactSolution(), TCreateMatrix(), TCreateRHS(), TGetCartesianCoordinates(), and TReadMatrix().

◆ CreateMatrix()

void Trilinos_Util::CrsMatrixGallery::CreateMatrix ( void )
protected

◆ CreateMatrixCauchy()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixCauchy ( void )
protected

◆ CreateMatrixCrossStencil2d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixCrossStencil2d ( void )
protected

◆ CreateMatrixCrossStencil2dVector()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixCrossStencil2dVector ( void )
protected

◆ CreateMatrixCrossStencil3d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixCrossStencil3d ( void )
protected

◆ CreateMatrixCrossStencil3dVector()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixCrossStencil3dVector ( void )
protected

◆ CreateMatrixDiag()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixDiag ( void )
protected

◆ CreateMatrixFiedler()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixFiedler ( void )
protected

◆ CreateMatrixHanowa()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixHanowa ( void )
protected

◆ CreateMatrixHilbert()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixHilbert ( void )
protected

◆ CreateMatrixJordblock()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixJordblock ( void )
protected

◆ CreateMatrixKMS()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixKMS ( void )
protected

◆ CreateMatrixLaplace1d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLaplace1d ( void )
protected

References a_, b_, c_, CreateMatrixTriDiag(), OutputMsg, and verbose_.

Referenced by TCreateMatrix().

◆ CreateMatrixLaplace1dNeumann()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLaplace1dNeumann ( void )
protected

◆ CreateMatrixLaplace2d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLaplace2d ( void )
protected

◆ CreateMatrixLaplace2d_9pt()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLaplace2d_9pt ( void )
protected

◆ CreateMatrixLaplace2d_BC()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLaplace2d_BC ( void )
protected

◆ CreateMatrixLaplace2dNeumann()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLaplace2dNeumann ( void )
protected

◆ CreateMatrixLaplace3d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLaplace3d ( void )
protected

References a_, b_, c_, CreateMatrixCrossStencil3d(), d_, e_, f_, g_, OutputMsg, and verbose_.

Referenced by TCreateMatrix().

◆ CreateMatrixLehmer()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixLehmer ( void )
protected

◆ CreateMatrixMinij()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixMinij ( void )
protected

◆ CreateMatrixOnes()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixOnes ( void )
protected

◆ CreateMatrixParter()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixParter ( void )
protected

◆ CreateMatrixPei()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixPei ( void )
protected

◆ CreateMatrixRecirc2d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixRecirc2d ( void )
protected

◆ CreateMatrixRecirc2dDivFree()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixRecirc2dDivFree ( void )
protected

◆ CreateMatrixRis()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixRis ( void )
protected

◆ CreateMatrixStretched2d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixStretched2d ( void )
protected

◆ CreateMatrixTriDiag()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixTriDiag ( void )
protected

◆ CreateMatrixUniFlow2d()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixUniFlow2d ( void )
protected

◆ CreateMatrixVander()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::CreateMatrixVander ( void )
protected

◆ CreateRHS()

void Trilinos_Util::CrsMatrixGallery::CreateRHS ( void )
protected

◆ CreateStartingSolution()

void Trilinos_Util::CrsMatrixGallery::CreateStartingSolution ( void )
protected

◆ ExactSolQuadXY() [1/2]

void Trilinos_Util::CrsMatrixGallery::ExactSolQuadXY ( double x,
double y,
double & u )
protected

Referenced by TCreateExactSolution(), and TCreateRHS().

◆ ExactSolQuadXY() [2/2]

void Trilinos_Util::CrsMatrixGallery::ExactSolQuadXY ( double x,
double y,
double & u,
double & ux,
double & uy,
double & uxx,
double & uyy )
protected

◆ GetCartesianCoordinates()

void Trilinos_Util::CrsMatrixGallery::GetCartesianCoordinates ( double *& x,
double *& y,
double *& z )

Get pointers to double vectors containing coordinates of points.

References TGetCartesianCoordinates(), and UseLongLong_.

◆ GetExactSolution()

Epetra_MultiVector * Trilinos_Util::CrsMatrixGallery::GetExactSolution ( void )

Returns a pointer to the exact solution.

Returns a pointer to the exact solution.

Some choices are available to define the exact solution, using Set("exact solution", value). value can be:

  • constant: the exact solution vector is made up of 1's.
  • random: a random solution vector
  • linear: value at node i is defined as alpha*i. The double value alpha can be set via Set("alpha",DoubleVal).

References CreateExactSolution(), and ExactSolution_.

◆ GetLinearProblem()

Epetra_LinearProblem * Trilinos_Util::CrsMatrixGallery::GetLinearProblem ( void )

◆ GetMap()

const Epetra_Map * Trilinos_Util::CrsMatrixGallery::GetMap ( void )

Returns a pointer the internally stored Map.

References CreateMap(), and map_.

◆ GetMapRef()

const Epetra_Map & Trilinos_Util::CrsMatrixGallery::GetMapRef ( void )

References CreateMap(), and map_.

◆ GetMatrix()

Epetra_CrsMatrix * Trilinos_Util::CrsMatrixGallery::GetMatrix ( void )

Returns a pointer to the CrsMatrix.

References CreateMatrix(), and matrix_.

Referenced by GetLinearProblem().

◆ GetMatrixRef()

Epetra_CrsMatrix & Trilinos_Util::CrsMatrixGallery::GetMatrixRef ( void )

References CreateMatrix(), and matrix_.

◆ GetNeighboursCartesian2d()

void Trilinos_Util::CrsMatrixGallery::GetNeighboursCartesian2d ( const int i,
const int nx,
const int ny,
int & left,
int & right,
int & lower,
int & upper )
protected

◆ GetNeighboursCartesian3d()

void Trilinos_Util::CrsMatrixGallery::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 )
protected

◆ GetRHS()

Epetra_MultiVector * Trilinos_Util::CrsMatrixGallery::GetRHS ( void )

Returns a pointer to the rhs corresponding to the selected exact solution.

References CreateRHS(), and rhs_.

Referenced by GetLinearProblem().

◆ GetStartingSolution()

Epetra_MultiVector * Trilinos_Util::CrsMatrixGallery::GetStartingSolution ( void )

Returns a pointer to the starting solution (typically, for HB problems).

Returns a pointer to the starting solution. This is typically used while reading a HB problem. However, the user can set a starting solution using Set("starting solution", "value"). Value can be

  • zero
  • random

References CreateStartingSolution(), and StartingSolution_.

Referenced by GetLinearProblem().

◆ MapMapRef() [1/3]

template<>
std::vector< int > & Trilinos_Util::CrsMatrixGallery::MapMapRef ( )
inlineprotected

References MyGlobalElements_int_.

◆ MapMapRef() [2/3]

template<>
std::vector< long long > & Trilinos_Util::CrsMatrixGallery::MapMapRef ( )
inlineprotected

References MyGlobalElements_LL_.

◆ MapMapRef() [3/3]

template<typename int_type>
std::vector< int_type > & Trilinos_Util::CrsMatrixGallery::MapMapRef ( )
protected

Referenced by TCreateMap().

◆ MyGlobalElementsPtr() [1/3]

template<>
int *& Trilinos_Util::CrsMatrixGallery::MyGlobalElementsPtr ( )
inlineprotected

◆ MyGlobalElementsPtr() [2/3]

template<>
long long *& Trilinos_Util::CrsMatrixGallery::MyGlobalElementsPtr ( )
inlineprotected

◆ MyGlobalElementsPtr() [3/3]

◆ PrintMatrixAndVectors() [1/2]

void Trilinos_Util::CrsMatrixGallery::PrintMatrixAndVectors ( )

◆ PrintMatrixAndVectors() [2/2]

void Trilinos_Util::CrsMatrixGallery::PrintMatrixAndVectors ( std::ostream & os)

Print out matrix and vectors.

Referenced by PrintMatrixAndVectors().

◆ Set() [1/5]

int Trilinos_Util::CrsMatrixGallery::Set ( const std::string parameter,
const double value )

Sets a gallery options using an double value.

◆ Set() [2/5]

int Trilinos_Util::CrsMatrixGallery::Set ( const std::string parameter,
const Epetra_Vector & value )

Sets a gallery options using an Epetra_Vector.

Sets a gallery options using an Epetra_Vector. The Epetra_Vector is copied into internal structures, and freed by the destructor.

◆ Set() [3/5]

int Trilinos_Util::CrsMatrixGallery::Set ( const std::string parameter,
const int value )

Sets a gallery options using an interger value.

Referenced by Set().

◆ Set() [4/5]

int Trilinos_Util::CrsMatrixGallery::Set ( const std::string parameter,
const std::string value )

Sets a gallery options using a C++ string .

◆ Set() [5/5]

int Trilinos_Util::CrsMatrixGallery::Set ( Trilinos_Util::CommandLineParser & CLP)

Sets gallery options using values passed from the shell.

References Trilinos_Util_Map::Get(), Trilinos_Util_Map::Has(), and Set().

◆ SetupCartesianGrid2D()

◆ SetupCartesianGrid3D()

void Trilinos_Util::CrsMatrixGallery::SetupCartesianGrid3D ( )
protected

◆ TCreateExactSolution()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::TCreateExactSolution ( void )
protected

◆ TCreateMap()

◆ TCreateMatrix()

◆ TCreateRHS()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::TCreateRHS ( void )
protected

◆ TGetCartesianCoordinates()

template<typename int_type>
void Trilinos_Util::CrsMatrixGallery::TGetCartesianCoordinates ( double *& x,
double *& y,
double *& z )
protected

References CreateMap(), ErrorMsg, lx_, ly_, lz_, map_, matrix_, name_, nx_, ny_, and nz_.

Referenced by GetCartesianCoordinates().

◆ TReadMatrix()

◆ WriteMatrix()

int Trilinos_Util::CrsMatrixGallery::WriteMatrix ( const std::string & FileName,
const bool UseSparse = true )

Print matrix on file in MATLAB format.

References comm_, CreateMatrix(), and matrix_.

◆ ZeroOutData()

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Trilinos_Util::CrsMatrixGallery & G )
friend

Print out detailed information about the problem at hand.

Member Data Documentation

◆ a_

◆ alpha_

double Trilinos_Util::CrsMatrixGallery::alpha_
protected

◆ b_

◆ beta_

double Trilinos_Util::CrsMatrixGallery::beta_
protected

Referenced by ZeroOutData().

◆ c_

◆ comm_

◆ ContiguousMap_

bool Trilinos_Util::CrsMatrixGallery::ContiguousMap_
protected

Referenced by TCreateMap(), and ZeroOutData().

◆ conv_

double Trilinos_Util::CrsMatrixGallery::conv_
protected

◆ d_

double Trilinos_Util::CrsMatrixGallery::d_
protected

◆ delta_

double Trilinos_Util::CrsMatrixGallery::delta_
protected

Referenced by ZeroOutData().

◆ diff_

double Trilinos_Util::CrsMatrixGallery::diff_
protected

◆ e_

double Trilinos_Util::CrsMatrixGallery::e_
protected

◆ epsilon_

double Trilinos_Util::CrsMatrixGallery::epsilon_
protected

◆ ErrorMsg

◆ ExactSolution_

◆ ExactSolutionType_

std::string Trilinos_Util::CrsMatrixGallery::ExactSolutionType_
protected

◆ ExpandType_

std::string Trilinos_Util::CrsMatrixGallery::ExpandType_
protected

◆ f_

double Trilinos_Util::CrsMatrixGallery::f_
protected

◆ FileName_

std::string Trilinos_Util::CrsMatrixGallery::FileName_
protected

Referenced by TReadMatrix().

◆ g_

double Trilinos_Util::CrsMatrixGallery::g_
protected

◆ gamma_

double Trilinos_Util::CrsMatrixGallery::gamma_
protected

Referenced by ZeroOutData().

◆ LinearProblem_

Epetra_LinearProblem* Trilinos_Util::CrsMatrixGallery::LinearProblem_
protected

◆ lx_

◆ ly_

◆ lz_

double Trilinos_Util::CrsMatrixGallery::lz_
protected

◆ map_

◆ MapMap_int_

std::vector<int> Trilinos_Util::CrsMatrixGallery::MapMap_int_
protected

◆ MapMap_LL_

std::vector<long long> Trilinos_Util::CrsMatrixGallery::MapMap_LL_
protected

◆ MapType_

std::string Trilinos_Util::CrsMatrixGallery::MapType_
protected

◆ matrix_

◆ mx_

int Trilinos_Util::CrsMatrixGallery::mx_
protected

Referenced by TCreateMap(), and ZeroOutData().

◆ my_

int Trilinos_Util::CrsMatrixGallery::my_
protected

Referenced by TCreateMap().

◆ MyGlobalElements_int_

int* Trilinos_Util::CrsMatrixGallery::MyGlobalElements_int_
protected

Referenced by MapMapRef().

◆ MyGlobalElements_LL_

long long* Trilinos_Util::CrsMatrixGallery::MyGlobalElements_LL_
protected

Referenced by MapMapRef().

◆ mz_

int Trilinos_Util::CrsMatrixGallery::mz_
protected

Referenced by TCreateMap(), and ZeroOutData().

◆ name_

std::string Trilinos_Util::CrsMatrixGallery::name_
protected

◆ NumGlobalElements_

◆ NumMyElements_

◆ NumPDEEqns_

◆ NumVectors_

◆ nx_

◆ ny_

◆ nz_

◆ OutputMsg

◆ rhs_

◆ RhsType_

std::string Trilinos_Util::CrsMatrixGallery::RhsType_
protected

Referenced by TCreateRHS(), and ZeroOutData().

◆ source_

double Trilinos_Util::CrsMatrixGallery::source_
protected

Referenced by ZeroOutData().

◆ StartingSolution_

◆ StartingSolutionType_

std::string Trilinos_Util::CrsMatrixGallery::StartingSolutionType_
protected

◆ UseLongLong_

◆ VectorA_

◆ VectorB_

Epetra_Vector * Trilinos_Util::CrsMatrixGallery::VectorB_
protected

◆ VectorC_

Epetra_Vector * Trilinos_Util::CrsMatrixGallery::VectorC_
protected

◆ VectorD_

Epetra_Vector * Trilinos_Util::CrsMatrixGallery::VectorD_
protected

◆ VectorE_

Epetra_Vector * Trilinos_Util::CrsMatrixGallery::VectorE_
protected

◆ VectorF_

Epetra_Vector * Trilinos_Util::CrsMatrixGallery::VectorF_
protected

Referenced by ZeroOutData(), and ~CrsMatrixGallery().

◆ VectorG_

Epetra_Vector * Trilinos_Util::CrsMatrixGallery::VectorG_
protected

Referenced by ZeroOutData(), and ~CrsMatrixGallery().

◆ verbose_


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