EpetraExt Namespace Reference

EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix. More...

Classes

class  BlockCrsMatrix
class  BlockMultiVector
class  BlockUtility
class  BlockVector
class  MultiComm
class  MultiMpiComm
class  MultiPointModelEvaluator
class  MultiSerialComm
class  LinearProblem_BlockJacobi
class  CrsGraph_BTF
 Block Triangular Factorization (Reordering) of Epetra_CrsGraph. More...
class  CrsMatrix_BTF
class  LinearProblem_BTF
class  CrsGraph_MapColoring
 Map Coloring of independent columns in a Graph. More...
class  CrsGraph_MapColoringIndex
 Generates a std::vector of Epetra_IntVector's to be used to map perturbation contributions to a CrsGraph/CrsMatrix from a perturbed vector. More...
class  Directory
 Distributed Directory Tool. More...
class  Hash
class  Hash< std::string >
class  Migrate
 Data Migration Utility used by EpetraExt::Directory. More...
class  Migrate1
struct  PackTraits
 Traits for packing and unpacking of data into char buffers for communication. More...
struct  PackTraits< std::string >
 Full specialization of PackTraits for std::string. More...
struct  PackTraits< std::vector< T > >
 Partial specialization of PackTraits for std::vector<> containing a primitive type. More...
class  MatrixMatrix
 Collection of matrix-matrix operations. More...
class  CrsMatrixStruct
class  CrsWrapper
class  CrsWrapper_Epetra_CrsMatrix
class  CrsWrapper_GraphBuilder
class  ProductOperator
 Implements Epetra_Operator as a product of one or more Epetra_Operator objects. More...
class  Epetra_Timed_Operator
 Class allows for timing the action and inverse action of an Epetra_Opetator. More...
class  DistArray
 DistArray<T>: A class to store row-oriented multivectors of type T. More...
class  Exception
class  HDF5
 class HDF5: A class for storing Epetra objects in parallel binary files More...
class  Handle
class  Epetra_Vector_Handle
class  XMLReader
 class XMLReader: A class for reading Epetra objects stored in XML files. More...
class  XMLWriter
 class XMLWriter: A class for writing Trilinos objects to XML files. More...
class  EpetraExt_MatlabEngine
 A class which provides data and command access to Matlab from Epetra. More...
class  ModelEvaluator
 Base interface for evaluating a stateless "model". More...
class  InArgsGetterSetter_x_dot
 Class that gets and sets x_dot in an InArgs object. More...
class  InArgsGetterSetter_x
 Class that gets and sets x in an InArgs object. More...
class  InArgsGetterSetter_p
 Class that gets and sets p(l) in an InArgs object. More...
class  OutArgsGetterSetter_f
 Class that gets and sets f in an OutArgs object. More...
class  OutArgsGetterSetter_g
 Class that gets and sets g(j) in an OutArgs object. More...
class  CrsGraph_AMD
 EpetraExt::CrsGraph_AMD: A transform for Approximate Minimum Degree Reordering using Tim Daley's AMD Algorithm. More...
class  BlockAdjacencyGraph
class  LinearProblem_CrsSingletonFilter
 Epetra_CrsSingletonFilter: A class for explicitly eliminating matrix rows and columns. More...
class  CrsMatrix_Dirichlet
 Given an input Epetra_LinearProblem, apply given dirichlet conditions. More...
class  Vector_Dirichlet
 Given an input Epetra_Vector, apply given dirichlet conditions. More...
class  LinearProblem_GraphTrans
 EpetraExt::LinearProblem_GraphTrans: Adaptation of a Epetra_CrsGraph Transform to a Epetra_LinearProblem Transform. More...
class  LinearProblem_MatrixTrans
 Adaptation of an Epetra_CrsMatrix Transform to a Epetra_LinearProblem Transform. More...
class  CrsGraph_Overlap
 Given an input Epetra_CrsGraph, a "overlapped" Epetra_CrsGraph is generated including rows associated with off processor contributions. More...
class  Permutation
 Permutation stores and describes a permutation matrix P. More...
struct  Perm_traits
 Define some traits to make it easier to deal with template-parameters which are objects to be permuted. More...
struct  Perm_traits< Epetra_CrsMatrix >
 A specialization of Perm_traits for the specific type Epetra_CrsMatrix. More...
struct  Perm_traits< Epetra_CrsGraph >
 A specialization of Perm_traits for the specific type Epetra_CrsGraph. More...
struct  Perm_traits< Epetra_MultiVector >
 A specialization of Perm_traits for the specific type Epetra_MultiVector. More...
class  CrsMatrix_Reindex
 Given an Epetra_CrsMatrix, a "reindexed" version is returned based on the new row map. More...
class  LinearProblem_Reindex
 Given and input Epetra_LinearProblem, a "reindexed" version will be returned using the given NewRowMap. More...
class  MultiVector_Reindex
 Given an input Epetra_MultiVector, a "reindexed" view is returned. More...
class  LinearProblem_Scale
 Given an input Epetra_LinearProblem, recursive, left and right scaling are performed. More...
class  CrsMatrix_SolverMap
 Given an input Epetra_CrsMatrix, the column map is checked for missing indices associated with the local rows. More...
class  LinearProblem_SolverMap
 Constructs a LinearProblem with a "fixed" Column Map for the CrsMatrix. More...
class  LinearProblem_StaticCondensation
class  CrsMatrix_SubCopy
 Generates a sub-block view of a Epetra_CrsMatrix. More...
struct  CrsGraph_SymmRCM
 Generates the symmetric RCM reordered version of a Epetra_CrsGraph. More...
class  Transform
 Base Class for all Epetra Transform Operators. More...
class  StructuralTransform
class  SameTypeTransform
class  StructuralSameTypeTransform
class  InPlaceTransform
class  ViewTransform
class  Transform_Composite
 Composition Class for Epetra Transform SameType Operators. More...
class  CrsGraph_Transpose
 Transform to generate the explicit transpose of a Epetra_CrsGraph. More...
class  RowMatrix_Transpose
 Transform to form the explicit transpose of a Epetra_RowMatrix. More...
class  CrsGraph_View
 Generates a sub-block view of a Epetra_CrsGraph. More...
class  CrsMatrix_View
 Generates a sub-block view of a Epetra_CrsMatrix. More...
class  MultiVector_View
 Generates a sub-block view of a Epetra_MultiVector. More...
class  Zoltan_CrsGraph
 Generates an Epetra_CrsGraph based on the repartitioning algorithms of Zoltan. More...
class  ZoltanMpiComm
 EpetraExt::ZoltanMpiComm: The Epetra MPI Communication Class. More...
class  ZoltanMpiCommData
 EpetraExt::ZoltanMpiCommData: The Epetra Mpi Communication Data Class. More...
class  ZoltanMpiDistributor
 EpetraExt::ZoltanMpiDistributor: The Zoltanized Epetra MPI implementation of the Epetra_Distributor Gather/Scatter Setup Class. More...
class  ZoltanQuery
 Query helper object to be used form Zoltan partitioning/ordering. More...
class  DiagonalQuadraticResponseOnlyModelEvaluator
 A simple quadratic parallel response-only model evaluator. More...
class  DiagonalTransientModel
 Simple transient diagonal model for an implicit or explicit ODE. More...

Functions

template<typename T , typename U >
void SortContainer2 (T &firstContainer, U &secondContainer)
 Sorts a given container: deal with a problem with some STL impl.
template<typename T >
bool IsSorted (T &container)
 Checks if data in a container is sorted.
double sparsedot (double *u, int *u_ind, int u_len, double *v, int *v_ind, int v_len)
 Method for internal use.
int mult_A_B (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, CrsWrapper &C)
int mult_A_Btrans (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, CrsWrapper &C)
int mult_Atrans_B (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, CrsWrapper &C)
int mult_Atrans_Btrans (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, CrsWrapper &C)
int import_and_extract_views (const Epetra_CrsMatrix &M, const Epetra_Map &targetMap, CrsMatrixStruct &Mview)
int distribute_list (const Epetra_Comm &Comm, int lenSendList, const int *sendList, int &maxSendLen, int *&recvList)
Epetra_Mapcreate_map_from_imported_rows (const Epetra_Map *map, int totalNumSend, int *sendRows, int numProcs, int *numSendPerProc)
int form_map_union (const Epetra_Map *map1, const Epetra_Map *map2, const Epetra_Map *&mapunion)
Epetra_Mapfind_rows_containing_cols (const Epetra_CrsMatrix &M, const Epetra_Map *colmap)
int dumpCrsMatrixStruct (const CrsMatrixStruct &M)
void insert_matrix_locations (CrsWrapper_GraphBuilder &graphbuilder, Epetra_CrsMatrix &C)
std::string EpetraExt_Version ()
int MatrixMarketFileToMap (const char *filename, const Epetra_Comm &comm, Epetra_Map *&map)
 Constructs an Epetra_BlockMap object from a Matrix Market format file.
int MatrixMarketFileToBlockMap (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&blockMap)
 Constructs an Epetra_BlockMap object from a Matrix Market format file.
int MatrixMarketFileToRowMap (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&rowmap)
int MatrixMarketFileToBlockMaps (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&rowmap, Epetra_BlockMap *&colmap, Epetra_BlockMap *&rangemap, Epetra_BlockMap *&domainmap)
 Constructs row,col,range and domain maps from a matrix-market matrix file.
int BlockMapToMatrixMarketFile (const char *filename, const Epetra_BlockMap &blockMap, const char *mapName=0, const char *mapDescription=0, bool writeHeader=true)
 Writes an Epetra_BlockMap or Epetra_Map object to a Matrix Market format file.
int BlockMapToHandle (FILE *handle, const Epetra_BlockMap &map)
int writeBlockMap (FILE *handle, int length, const int *v1, const int *v2, bool doSizes)
int BlockMapToHandle (std::FILE *handle, const Epetra_BlockMap &blockMap)
 Writes an Epetra_BlockMap or Epetra_Map object to a file handle.
int writeBlockMap (std::FILE *handle, int length, const int *v1, const int *v2, bool doSizes)
static void sort_three (int *list, int *parlista, double *parlistb, int start, int end)
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A)
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A, const bool transpose)
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A, const bool transpose=0, const bool verbose=0)
 Constructs an Epetra_CrsMatrix object from a Matrix Market format file, simplest version: requires matrix to be square, distributes rows evenly across processors.
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Map &rowMap, const Epetra_Map &rangeMap, const Epetra_Map &domainMap, Epetra_CrsMatrix *&A, const bool transpose=0, const bool verbose=0)
 Constructs an Epetra_CrsMatrix object from a Matrix Market format file, row, range and domain map specified; typically used for rectangular matrices.
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Map &rowMap, Epetra_CrsMatrix *&A, const bool transpose=0, const bool verbose=0)
 Constructs an Epetra_CrsMatrix object from a Matrix Market format file, only row map specified; allows user defined distribution of matrix rows, requires square matrix.
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Map &rowMap, const Epetra_Map &colMap, Epetra_CrsMatrix *&A, const bool transpose=0, const bool verbose=0)
 Constructs an Epetra_CrsMatrix object from a Matrix Market format file, both row and column map specified; this version is seldom used unless you want explicit control over column map.
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Map &rowMap, const Epetra_Map &colMap, const Epetra_Map &rangeMap, const Epetra_Map &domainMap, Epetra_CrsMatrix *&A, const bool transpose=0, const bool verbose=0)
 Constructs an Epetra_CrsMatrix object from a Matrix Market format file, row, column, range and domain map specified; this version is seldom required unless you want explicit control over column map.
int MatrixMarketFileToCrsMatrixHandle (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A, const Epetra_Map *rowMap, const Epetra_Map *colMap, const Epetra_Map *rangeMap, const Epetra_Map *domainMap, const bool transpose, const bool verbose)
static void quickpart_list_inc_int (int *list, int *parlista, double *parlistb, int start, int end, int *equal, int *larger)
int MatlabFileToCrsMatrix (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A)
 Constructs an Epetra_CrsMatrix object from a Matlab format file, distributes rows evenly across processors.
int HypreFileToCrsMatrix (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A)
 Constructs an Epetra_CrsMatrix object from a Hypre Matrix Print command, the row map is specified.
int mm_read_unsymmetric_sparse (const char *fname, int *M_, int *N_, int *nz_, double **val_, int **I_, int **J_)
int mm_is_valid (MM_typecode matcode)
int mm_read_banner (FILE *f, MM_typecode *matcode)
int mm_write_mtx_crd_size (FILE *f, int M, int N, int nz)
int mm_read_mtx_crd_size (FILE *f, int *M, int *N, int *nz)
int mm_read_mtx_array_size (FILE *f, int *M, int *N)
int mm_write_mtx_array_size (FILE *f, int M, int N)
int mm_read_mtx_crd_data (FILE *f, int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
int mm_read_mtx_crd_entry (FILE *f, int *I, int *J, double *real, double *imag, MM_typecode matcode)
int mm_read_mtx_crd (char *fname, int *M, int *N, int *nz, int **I, int **J, double **val, MM_typecode *matcode)
int mm_write_banner (FILE *f, MM_typecode matcode)
int mm_write_mtx_crd (char fname[], int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
void mm_typecode_to_str (MM_typecode matcode, char *buffer)
int MatrixMarketFileToMultiVector (const char *filename, const Epetra_BlockMap &map, Epetra_MultiVector *&A)
 Constructs an Epetra_MultiVector object from a Matrix Market format file.
int MultiVectorToMatlabFile (const char *filename, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object to a file that is compatible with Matlab.
int MultiVectorToMatrixMarketFile (const char *filename, const Epetra_MultiVector &A, const char *matrixName=0, const char *matrixDescription=0, bool writeHeader=true)
 Writes an Epetra_MultiVector object to a Matrix Market format file.
int MultiVectorToMatlabHandle (FILE *handle, const Epetra_MultiVector &A)
int MultiVectorToMatrixMarketHandle (FILE *handle, const Epetra_MultiVector &A)
int MultiVectorToHandle (FILE *handle, const Epetra_MultiVector &A, bool mmFormat)
int writeMultiVector (FILE *handle, const Epetra_MultiVector &A, bool mmFormat)
int MultiVectorToMatrixMarketHandle (std::FILE *handle, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object that is compatible with Matrix Market array format to a file handle.
int MultiVectorToMatlabHandle (std::FILE *handle, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object that is compatible with Matlab to a file handle.
int MultiVectorToHandle (std::FILE *handle, const Epetra_MultiVector &A, bool mmFormat)
int writeMultiVector (std::FILE *handle, const Epetra_MultiVector &A, bool mmFormat)
int OperatorToMatlabFile (const char *filename, const Epetra_Operator &A)
 Writes an Epetra_Operator object to a file that is compatible with Matlab.
int OperatorToMatrixMarketFile (const char *filename, const Epetra_Operator &A, const char *matrixName=0, const char *matrixDescription=0, bool writeHeader=true)
 Writes an Epetra_Operator object to a Matrix Market format file, forming the coefficients by applying the operator to the e_j vectors.
int OperatorToHandle (FILE *handle, const Epetra_Operator &A)
int writeOperatorStrip (FILE *handle, const Epetra_MultiVector &y, const Epetra_Map &rootDomainMap, const Epetra_Map &rootRangeMap, int startColumn)
int get_nz (const Epetra_Operator &A, int &nz)
int OperatorToHandle (std::FILE *handle, const Epetra_Operator &A)
 Writes an Epetra_Operator object to a format file that is compatible with Matlab.
int writeOperatorStrip (std::FILE *handle, const Epetra_MultiVector &y, const Epetra_Map &rootDomainMap, const Epetra_Map &rootRangeMap, int startColumn)
void readEpetraLinearSystem (const std::string &fileName, const Epetra_Comm &comm, Teuchos::RefCountPtr< Epetra_CrsMatrix > *A=NULL, Teuchos::RefCountPtr< Epetra_Map > *map=NULL, Teuchos::RefCountPtr< Epetra_Vector > *x=NULL, Teuchos::RefCountPtr< Epetra_Vector > *b=NULL, Teuchos::RefCountPtr< Epetra_Vector > *xExact=NULL)
 Read in an Epetra linear system from a file.
int RowMatrixToMatlabFile (const char *filename, const Epetra_RowMatrix &A)
 Writes an Epetra_RowMatrix object to a file that is compatible with Matlab.
int RowMatrixToMatrixMarketFile (const char *filename, const Epetra_RowMatrix &A, const char *matrixName=0, const char *matrixDescription=0, bool writeHeader=true)
 Writes an Epetra_RowMatrix object to a Matrix Market format file.
int RowMatrixToHandle (FILE *handle, const Epetra_RowMatrix &A)
int writeRowMatrix (FILE *handle, const Epetra_RowMatrix &A)
int RowMatrixToHandle (std::FILE *handle, const Epetra_RowMatrix &A)
 Writes an Epetra_RowMatrix object to a format file that is compatible with Matlab.
int writeRowMatrix (std::FILE *handle, const Epetra_RowMatrix &A)
std::string toString (const int &x)
std::string toString (const unsigned int &x)
std::string toString (const double &x)
int MatrixMarketFileToVector (const char *filename, const Epetra_BlockMap &map, Epetra_Vector *&A)
 Constructs an Epetra_Vector object from a Matrix Market format file.
int VectorToMatlabFile (const char *filename, const Epetra_Vector &A)
 Writes an Epetra_Vector object to a file that is compatible with Matlab.
int VectorToMatrixMarketFile (const char *filename, const Epetra_Vector &A, const char *matrixName=0, const char *matrixDescription=0, bool writeHeader=true)
 Writes an Epetra_Vector object to a Matrix Market format file.
int VectorToHandle (FILE *handle, const Epetra_Vector &A)
int writeVector (FILE *handle, const Epetra_Vector &A)
int VectorToHandle (std::FILE *handle, const Epetra_Vector &A)
 Writes an Epetra_Vector object to a format file that is compatible with Matlab.
int writeVector (std::FILE *handle, const Epetra_Vector &A)
std::string toString (ModelEvaluator::EDerivativeMultiVectorOrientation orientation)
 
std::string toString (ModelEvaluator::EInArgsMembers inArg)
 
std::string toString (ModelEvaluator::EOutArgsMembers outArg)
 
Teuchos::RefCountPtr
< Epetra_Operator
getLinearOp (const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName)
 
Teuchos::RefCountPtr
< Epetra_MultiVector
getMultiVector (const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
Teuchos::RefCountPtr
< Epetra_Operator
get_DfDp_op (const int l, const ModelEvaluator::OutArgs &outArgs)
 
Teuchos::RefCountPtr
< Epetra_MultiVector
get_DfDp_mv (const int l, const ModelEvaluator::OutArgs &outArgs)
 
Teuchos::RefCountPtr
< Epetra_MultiVector
get_DgDx_dot_mv (const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
Teuchos::RefCountPtr
< Epetra_MultiVector
get_DgDx_mv (const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
Teuchos::RefCountPtr
< Epetra_MultiVector
get_DgDp_mv (const int j, const int l, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
void gatherModelNominalValues (const ModelEvaluator &model, ModelEvaluator::InArgs *nominalValues)
 Gather the nominal values from a model evaluator.
void gatherModelBounds (const ModelEvaluator &model, ModelEvaluator::InArgs *lowerBounds, ModelEvaluator::InArgs *upperBounds)
 Gather the lower and upper bounds from a model evaluator.
void scaleModelVars (const ModelEvaluator::InArgs &origVars, const ModelEvaluator::InArgs &varScalings, ModelEvaluator::InArgs *scaledVars, Teuchos::FancyOStream *out=0, Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_LOW)
 Scale the original unscaled variables into the scaled variables.
void scaleModelBounds (const ModelEvaluator::InArgs &origLowerBounds, const ModelEvaluator::InArgs &origUpperBounds, const double infBnd, const ModelEvaluator::InArgs &varScalings, ModelEvaluator::InArgs *scaledLowerBounds, ModelEvaluator::InArgs *scaledUpperBounds, Teuchos::FancyOStream *out=0, Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_LOW)
 Scale the lower and upper model variable bounds.
void unscaleModelVars (const ModelEvaluator::InArgs &scaledVars, const ModelEvaluator::InArgs &varScalings, ModelEvaluator::InArgs *origVars, Teuchos::FancyOStream *out=0, Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_LOW)
 Unscale the scaled variables.
void scaleModelFuncs (const ModelEvaluator::OutArgs &origFuncs, const ModelEvaluator::InArgs &varScalings, const ModelEvaluator::OutArgs &funcScalings, ModelEvaluator::OutArgs *scaledFuncs, bool *allFuncsWhereScaled, Teuchos::FancyOStream *out=0, Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_LOW)
 Scale the output functions and their derivative objects.
Teuchos::RefCountPtr< const
Epetra_Vector
createInverseModelScalingVector (Teuchos::RefCountPtr< const Epetra_Vector > const &scalingVector)
 Create an inverse scaling vector.
void scaleModelVarsGivenInverseScaling (const Epetra_Vector &origVars, const Epetra_Vector &invVarScaling, Epetra_Vector *scaledVars)
 Scale a vector given its inverse scaling vector.
void scaleModelVarBoundsGivenInverseScaling (const Epetra_Vector &origLowerBounds, const Epetra_Vector &origUpperBounds, const double infBnd, const Epetra_Vector &invVarScaling, Epetra_Vector *scaledLowerBounds, Epetra_Vector *scaledUpperBounds)
 Scale the model variable bounds.
void unscaleModelVarsGivenInverseScaling (const Epetra_Vector &origVars, const Epetra_Vector &invVarScaling, Epetra_Vector *scaledVars)
 Unscale a vector given its inverse scaling vector.
void scaleModelFuncGivenForwardScaling (const Epetra_Vector &fwdFuncScaling, Epetra_Vector *funcs)
 Scale (in place) an output function vector given its forward scaling vector.
void scaleModelFuncFirstDerivOp (const Epetra_Vector *invVarScaling, const Epetra_Vector *fwdFuncScaling, Epetra_Operator *funcDerivOp, bool *didScaling)
 Scale (in place) an output first-order function derivative object represented as an Epetra_Operator given its function and variable scaling.
void scaleModelFuncFirstDeriv (const ModelEvaluator::Derivative &origFuncDeriv, const Epetra_Vector *invVarScaling, const Epetra_Vector *fwdFuncScaling, ModelEvaluator::Derivative *scaledFuncDeriv, bool *didScaling)
 Scale (in place) an output first-order function derivative object given its function and variable scaling.
int compare_ints (const void *a, const void *b)
 Given an Epetra_CrsGraph that has block structure, an adjacency graph is constructed representing the block connectivity of the original graph.
int ceil31log2 (int n)

Detailed Description

EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.

The EpetraExt namespace contains a variety of useful functions and class that extend Epetra capabilities.

EpetraExt::MultiSerialComm is a class for keeping track of two levels of parallelism.

Epetra-based Model Evaluator subclass for Charon!

EpetraExt::MultiMpiComm is a class for keeping track of two levels of parallelism.

EpetraExt::MultiComm is an abstract class for keeping track of two levels of parallelism.

EpetraExt::BlockVector: A class for constructing a distributed block vector.

EpetraExt::BlockUtility: A class of utilities for constructing block data structs.

EpetraExt::BlockMultiVector: A class for constructing a distributed block multivector.

The EpetraExt::BlockCrsMatrix allows construction of a block matrix made up of Epetra_CrsMatrix blocks as well as access to the full systems as a Epetra_CrsMatrix. It derives from and extends the Epetra_CrsMatrix class

Constructing EpetraExt::BlockCrsMatrix objects

The EpetraExt::BlockMultiVector allows construction of a block multivector made up of Epetra_MultiVector blocks as well as access to the full systems as a Epetra_MultiVector. It derives from and extends the Epetra_MultiVector class

Constructing EpetraExt::BlockMultiVector objects

The EpetraExt::BlockVector allows construction of a block vector made up of Epetra_Vector blocks as well as access to the full systems as a Epetra_Vector. It derives from and extends the Epetra_Vector class

Constructing EpetraExt::BlockVector objects

The class is an Epetra_Comm for the global problem and contains another Eptra_Comm of the split problem. Each processor is part of the global problem, and part of a sub-domain.

EpetraExt::MultComm: The class is an Epetra_Comm for the global problem and contains another Epetra_Comm of the split problem. Each processor is part of the global communicator, and a sub-domain communicator.

Constructing EpetraExt::MultComm objects

The class is an Epetra_MpiComm for the global problem and contains another Eptra_MpiComm of the split problem. Each processor is part of the global problem, and part of a sub-domain.

EpetraExt::MultMpiComm: The class is an Epetra_MpiComm for the global problem and contains another Epetra_MpiComm of the split problem. Each processor is part of the global communicator, and a sub-domain communicator.

Constructing EpetraExt::MultMpiComm objects

This class will support a wide number of different types of abstract problem types that will allow NOX, LOCA, Rythmos, Aristos, and MOOCHO to solve different types of problems with Charon.

ToDo: Finish documentation!

The class is an Epetra_SerialComm for the global problem and contains another Eptra_SerialComm of the split problem. Each processor is part of the global problem, and part of a sub-domain.

EpetraExt::MultSerialComm: The class is an Epetra_SerialComm for the global problem and contains another Epetra_SerialComm of the split problem. Each processor is part of the global communicator, and a sub-domain communicator.

Constructing EpetraExt::MultSerialComm objects

All EpetraExt capabilities are available from the EpetraExt package in Trilinos.


Function Documentation

template<typename T , typename U >
void EpetraExt::SortContainer2 ( T &  firstContainer,
U &  secondContainer 
) [inline]

Sorts a given container: deal with a problem with some STL impl.

's

Definition at line 158 of file EpetraExt_Directory.h.

template<typename T >
bool EpetraExt::IsSorted ( T &  container  )  [inline]

Checks if data in a container is sorted.

Definition at line 189 of file EpetraExt_Directory.h.

double EpetraExt::sparsedot ( double *  u,
int *  u_ind,
int  u_len,
double *  v,
int *  v_ind,
int  v_len 
)

Method for internal use.

.. sparsedot forms a dot-product between two sparsely-populated 'vectors'. Important assumption: assumes the indices in u_ind and v_ind are sorted.

int EpetraExt::mult_A_B ( CrsMatrixStruct &  Aview,
CrsMatrixStruct &  Bview,
CrsWrapper &  C 
)

Definition at line 84 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::mult_A_Btrans ( CrsMatrixStruct &  Aview,
CrsMatrixStruct &  Bview,
CrsWrapper &  C 
)

Definition at line 196 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::mult_Atrans_B ( CrsMatrixStruct &  Aview,
CrsMatrixStruct &  Bview,
CrsWrapper &  C 
)

Definition at line 396 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::mult_Atrans_Btrans ( CrsMatrixStruct &  Aview,
CrsMatrixStruct &  Bview,
CrsWrapper &  C 
)

Definition at line 531 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::import_and_extract_views ( const Epetra_CrsMatrix M,
const Epetra_Map targetMap,
CrsMatrixStruct &  Mview 
)

Definition at line 671 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::distribute_list ( const Epetra_Comm Comm,
int  lenSendList,
const int *  sendList,
int &  maxSendLen,
int *&  recvList 
)

Definition at line 786 of file EpetraExt_MatrixMatrix.cpp.

Epetra_Map* EpetraExt::create_map_from_imported_rows ( const Epetra_Map map,
int  totalNumSend,
int *  sendRows,
int  numProcs,
int *  numSendPerProc 
)

Definition at line 807 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::form_map_union ( const Epetra_Map map1,
const Epetra_Map map2,
const Epetra_Map *&  mapunion 
)

Definition at line 855 of file EpetraExt_MatrixMatrix.cpp.

Epetra_Map* EpetraExt::find_rows_containing_cols ( const Epetra_CrsMatrix M,
const Epetra_Map colmap 
)

Definition at line 916 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::dumpCrsMatrixStruct ( const CrsMatrixStruct &  M  ) 
void EpetraExt::insert_matrix_locations ( CrsWrapper_GraphBuilder &  graphbuilder,
Epetra_CrsMatrix C 
)
std::string EpetraExt::EpetraExt_Version (  ) 

Definition at line 35 of file EpetraExt_Version.h.

int EpetraExt::MatrixMarketFileToMap ( const char *  filename,
const Epetra_Comm comm,
Epetra_Map *&  map 
)

Constructs an Epetra_BlockMap object from a Matrix Market format file.

This function constructs an Epetra_BlockMap or Epetra_Map object by reading a Matrix Market file. If the file was created using the EpetraExt::BlockMapOut functions, special information was encoded in the comment field of this map that allows for identical reproduction of the map, including distribution across processors and element size information. If the same of processors is being used to create the object as were used to write it, the object will be an exact reproduction of the original. Otherwise, a uniform distribution of the GIDs will be created.

The first column of the input file will must be the list of GIDs in the map. If the block map has non-uniform sizes, a second column must contain the element sizes.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the map GIDs. A second column may be present if the BlockMap has nonuniform sizes.
comm (In) An Epetra_Comm object describing the parallel machine.
map (Out) An Epetra_Map object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system, -2 if file contained nontrivial Epetra_BlockMap, 1 if number of processors differs from file creator.
int EpetraExt::MatrixMarketFileToBlockMap ( const char *  filename,
const Epetra_Comm comm,
Epetra_BlockMap *&  blockMap 
)

Constructs an Epetra_BlockMap object from a Matrix Market format file.

This function constructs an Epetra_BlockMap or Epetra_Map object by reading a Matrix Market file. If the file was created using the EpetraExt::BlockMapOut functions, special information was encoded in the comment field of this map that allows for identical reproduction of the map, including distribution across processors and element size information. If the same of processors is being used to create the object as were used to write it, the object will be an exact reproduction of the original. Otherwise, a uniform distribution of the GIDs will be created.

The first column of the input file will must be the list of GIDs in the map. If the block map has non-uniform sizes, a second column must contain the element sizes.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the map GIDs. A second column may be present if the BlockMap has nonuniform sizes.
comm (In) An Epetra_Comm object describing the parallel machine.
blockMap (Out) An Epetra_BlockMap object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system, returns 1 if number of processors differs from file creator.
int EpetraExt::MatrixMarketFileToRowMap ( const char *  filename,
const Epetra_Comm comm,
Epetra_BlockMap *&  rowmap 
)

Definition at line 156 of file EpetraExt_BlockMapIn.cpp.

int EpetraExt::MatrixMarketFileToBlockMaps ( const char *  filename,
const Epetra_Comm comm,
Epetra_BlockMap *&  rowmap,
Epetra_BlockMap *&  colmap,
Epetra_BlockMap *&  rangemap,
Epetra_BlockMap *&  domainmap 
)

Constructs row,col,range and domain maps from a matrix-market matrix file.

int EpetraExt::BlockMapToMatrixMarketFile ( const char *  filename,
const Epetra_BlockMap blockMap,
const char *  mapName = 0,
const char *  mapDescription = 0,
bool  writeHeader = true 
)

Writes an Epetra_BlockMap or Epetra_Map object to a Matrix Market format file.

This function takes an Epetra_BlockMap or Epetra_Map object and writes it to the specified file. The map can be distributed or serial. The user can provide a strings containing the object name, a description, and specify that header information should or should not be printed to the file.

Special information is encoded in the comment field of this map that allows for identical reproduction of the map, including distribution across processors and element size information.

The first column of the output file will be the list of GIDs in the map. If the block map has non-uniform sizes, a second column will be generated containing the element sizes.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the map GIDs. A second column may be present if the BlockMap has nonuniform sizes.
blockMap (In) An Epetra_BlockMap Object containing the user map to be dumped to file.
mapName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label().
mapDescription (In) A C-style string pointer to a map description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the map entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::BlockMapToHandle ( FILE *  handle,
const Epetra_BlockMap map 
)

Definition at line 111 of file EpetraExt_BlockMapOut.cpp.

int EpetraExt::writeBlockMap ( FILE *  handle,
int  length,
const int *  v1,
const int *  v2,
bool  doSizes 
)

Definition at line 173 of file EpetraExt_BlockMapOut.cpp.

int EpetraExt::BlockMapToHandle ( std::FILE *  handle,
const Epetra_BlockMap blockMap 
)

Writes an Epetra_BlockMap or Epetra_Map object to a file handle.

This function takes an Epetra_BlockMap or Epetra_Map object and writes it to the specified file handle.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each multivector row.
blockMap (In) An Epetra_BlockMap object containing the user object to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::writeBlockMap ( std::FILE *  handle,
int  length,
const int *  v1,
const int *  v2,
bool  doSizes 
)
static void EpetraExt::sort_three ( int *  list,
int *  parlista,
double *  parlistb,
int  start,
int  end 
) [static]

Definition at line 455 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrix ( const char *  filename,
const Epetra_Comm comm,
Epetra_CrsMatrix *&  A 
)

Definition at line 63 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrix ( const char *  filename,
const Epetra_Comm comm,
Epetra_CrsMatrix *&  A,
const bool  transpose 
)

Definition at line 71 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrix ( const char *  filename,
const Epetra_Comm comm,
Epetra_CrsMatrix *&  A,
const bool  transpose = 0,
const bool  verbose = 0 
)

Constructs an Epetra_CrsMatrix object from a Matrix Market format file, simplest version: requires matrix to be square, distributes rows evenly across processors.

This function constructs an Epetra_CrsMatrix object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market coordinate format.
comm (In) An Epetra_Comm object.
transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A. (default = 0).
verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout. (default = 0).
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)
int EpetraExt::MatrixMarketFileToCrsMatrix ( const char *  filename,
const Epetra_Map rowMap,
const Epetra_Map rangeMap,
const Epetra_Map domainMap,
Epetra_CrsMatrix *&  A,
const bool  transpose = 0,
const bool  verbose = 0 
)

Constructs an Epetra_CrsMatrix object from a Matrix Market format file, row, range and domain map specified; typically used for rectangular matrices.

Reads an Epetra_CrsMatrix object from a matrix-market file, but uses the specified maps for constructing and 'FillComplete()'ing the matrix. Successfully creates rectangular matrices.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market coordinate format.
rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
rangeMap (In) An Epetra_Map object describing the distribution of range vectors that will be used with this matrix, must be 1-to-1.
domainMap (In) An Epetra_Map object describing the distribution of domain vectors that will be used with this matrix, must be 1-to-1.
transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A. (default = 0).
verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout. (default = 0).
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system. (See the Matrix Market home page for details.)
int EpetraExt::MatrixMarketFileToCrsMatrix ( const char *  filename,
const Epetra_Map rowMap,
Epetra_CrsMatrix *&  A,
const bool  transpose = 0,
const bool  verbose = 0 
)

Constructs an Epetra_CrsMatrix object from a Matrix Market format file, only row map specified; allows user defined distribution of matrix rows, requires square matrix.

This function constructs an Epetra_CrsMatrix object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market coordinate format.
rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A. (default = 0).
verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout. (default = 0).
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)
int EpetraExt::MatrixMarketFileToCrsMatrix ( const char *  filename,
const Epetra_Map rowMap,
const Epetra_Map colMap,
Epetra_CrsMatrix *&  A,
const bool  transpose = 0,
const bool  verbose = 0 
)

Constructs an Epetra_CrsMatrix object from a Matrix Market format file, both row and column map specified; this version is seldom used unless you want explicit control over column map.

This function constructs an Epetra_CrsMatrix object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market coordinate format.
rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
colMap (In) An Epetra_Map object describing the desired column distribution of the matrix.
transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A. (default = 0).
verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout. (default = 0).
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)
int EpetraExt::MatrixMarketFileToCrsMatrix ( const char *  filename,
const Epetra_Map rowMap,
const Epetra_Map colMap,
const Epetra_Map rangeMap,
const Epetra_Map domainMap,
Epetra_CrsMatrix *&  A,
const bool  transpose = 0,
const bool  verbose = 0 
)

Constructs an Epetra_CrsMatrix object from a Matrix Market format file, row, column, range and domain map specified; this version is seldom required unless you want explicit control over column map.

Reads an Epetra_CrsMatrix object from a matrix-market file, but uses the specified maps for constructing and 'FillComplete()'ing the matrix. Successfully creates rectangular matrices.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market coordinate format.
rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
colMap (In) An Epetra_Map object describing the desired column distribution of the matrix.
rangeMap (In) An Epetra_Map object describing the distribution of range vectors that will be used with this matrix, must be 1-to-1.
domainMap (In) An Epetra_Map object describing the distribution of domain vectors that will be used with this matrix, must be 1-to-1.
transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A. (default = 0).
verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout. (default = 0).
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system. (See the Matrix Market home page for details.)
int EpetraExt::MatrixMarketFileToCrsMatrixHandle ( const char *  filename,
const Epetra_Comm comm,
Epetra_CrsMatrix *&  A,
const Epetra_Map rowMap,
const Epetra_Map colMap,
const Epetra_Map rangeMap,
const Epetra_Map domainMap,
const bool  transpose,
const bool  verbose 
)
static void EpetraExt::quickpart_list_inc_int ( int *  list,
int *  parlista,
double *  parlistb,
int  start,
int  end,
int *  equal,
int *  larger 
) [static]

Definition at line 417 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatlabFileToCrsMatrix ( const char *  filename,
const Epetra_Comm comm,
Epetra_CrsMatrix *&  A 
)

Constructs an Epetra_CrsMatrix object from a Matlab format file, distributes rows evenly across processors.

This function constructs an Epetra_CrsMatrix object by reading a Matlab (i,j,value) format file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matlab coordinate format.
comm (In) An Epetra_Comm object. The matrix will have its rows distributed evenly by row-count across the parallel machine.
A (Out) An Epetra_CrsMatrix object constructed from file contents. The input matrix can be any dimension, square or rectangular.
Warning:
User must delete matrix A!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.

Notes:

  1. The file will be read twice: first to get the maximum row and column dimensions. Next to insert values.
  2. The global row and column dimensions will be determined by the maximum row and column index, respectively, contained in the file. If some rows or columns are empty they will still be present in the matrix.

The format expected for the input file is a list of nonzero entries with one entry per row. Each row will have the row index, column index and value listed with space in between each item. The number of lines in the file should be exactly the number of entries of the matrix. For example, consider the following matrix where only the nonzero values are stored:

\[ \left[\begin{array}{cccc} 5 & 7 & 0 & 0 \\ 3 & 2 & 0 & 1 \\ 0 & 0 & 0 & 4 \\ \end{array}\right]. \]

A Matlab format file for this matrix would be:

1 1 5.0
1 2 7.0
2 1 3.0
2 2 2.0
2 4 1.0
4 4 4.0

Note that the entries can be listed in any order and that the matrix does not need to be square. Values in the first and second columns must be integer values and in those in the third column must be floating point format.

(See the Matlab home page for details.)
int EpetraExt::HypreFileToCrsMatrix ( const char *  filename,
const Epetra_Comm comm,
Epetra_CrsMatrix *&  A 
)

Constructs an Epetra_CrsMatrix object from a Hypre Matrix Print command, the row map is specified.

Reads an Epetra_CrsMatrix object from a Hypre Matrix Printout, the matrix should be square.

Parameters:
filename (In) A filename not including the processor id extension, including path if desired.
comm (In) An Epetra_Comm object describing the communication among processors.
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::mm_read_unsymmetric_sparse ( const char *  fname,
int *  M_,
int *  N_,
int *  nz_,
double **  val_,
int **  I_,
int **  J_ 
)
int EpetraExt::mm_is_valid ( MM_typecode  matcode  ) 
int EpetraExt::mm_read_banner ( FILE *  f,
MM_typecode matcode 
)
int EpetraExt::mm_write_mtx_crd_size ( FILE *  f,
int  M,
int  N,
int  nz 
)
int EpetraExt::mm_read_mtx_crd_size ( FILE *  f,
int *  M,
int *  N,
int *  nz 
)
int EpetraExt::mm_read_mtx_array_size ( FILE *  f,
int *  M,
int *  N 
)
int EpetraExt::mm_write_mtx_array_size ( FILE *  f,
int  M,
int  N 
)
int EpetraExt::mm_read_mtx_crd_data ( FILE *  f,
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)
int EpetraExt::mm_read_mtx_crd_entry ( FILE *  f,
int *  I,
int *  J,
double *  real,
double *  imag,
MM_typecode  matcode 
)
int EpetraExt::mm_read_mtx_crd ( char *  fname,
int *  M,
int *  N,
int *  nz,
int **  I,
int **  J,
double **  val,
MM_typecode matcode 
)

Definition at line 339 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_write_banner ( FILE *  f,
MM_typecode  matcode 
)
int EpetraExt::mm_write_mtx_crd ( char  fname[],
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)
void EpetraExt::mm_typecode_to_str ( MM_typecode  matcode,
char *  buffer 
)
int EpetraExt::MatrixMarketFileToMultiVector ( const char *  filename,
const Epetra_BlockMap map,
Epetra_MultiVector *&  A 
)

Constructs an Epetra_MultiVector object from a Matrix Market format file.

This function constructs an Epetra_MultiVector object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The multivector to be read should be in this file in Matrix Market array format.
map (In) An Epetra_Map or Epetra_BlockMap object describing the desired distribution of the multivector.
A (Out) An Epetra_MultiVector object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::MultiVectorToMatlabFile ( const char *  filename,
const Epetra_MultiVector A 
)

Writes an Epetra_MultiVector object to a file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_MultiVector interface and writes it to the specified file. The matrix can be distributed or serial. This function is a convenience wrapper around MultiVectorToMatrixMarketFile. The following Matlab commands can be used to read the resulting file and convert to it to a Matlab sparse matrix:

  1. load filename;

For example:

  1. load A.dat;

The above produces a dense matrix A with each vector in the multivector as a column in A.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contain a row for each row of the multivector.
A (In) An Epetra_MultiVector Object containing the user matrix to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::MultiVectorToMatrixMarketFile ( const char *  filename,
const Epetra_MultiVector A,
const char *  matrixName = 0,
const char *  matrixDescription = 0,
bool  writeHeader = true 
)

Writes an Epetra_MultiVector object to a Matrix Market format file.

This function takes an Epetra_MultiVector object and writes it to the specified file. The multivector can be distributed or serial. The user can provide a strings containing the object name, a description, and specify that header information should or should not be printed to the file.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the matrix coefficients. The file will contain a row for each entry. All entries for a column are listed before going to the next column.
A (In) An Epetra_MultiVector Object containing the user matrix to be dumped to file.
matrixName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label().
matrixDescription (In) A C-style string pointer to a matrix description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the matrix entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::MultiVectorToMatlabHandle ( FILE *  handle,
const Epetra_MultiVector A 
)

Definition at line 94 of file EpetraExt_MultiVectorOut.cpp.

int EpetraExt::MultiVectorToMatrixMarketHandle ( FILE *  handle,
const Epetra_MultiVector A 
)

Definition at line 97 of file EpetraExt_MultiVectorOut.cpp.

int EpetraExt::MultiVectorToHandle ( FILE *  handle,
const Epetra_MultiVector A,
bool  mmFormat 
)

Definition at line 100 of file EpetraExt_MultiVectorOut.cpp.

int EpetraExt::writeMultiVector ( FILE *  handle,
const Epetra_MultiVector A,
bool  mmFormat 
)

Definition at line 167 of file EpetraExt_MultiVectorOut.cpp.

int EpetraExt::MultiVectorToMatrixMarketHandle ( std::FILE *  handle,
const Epetra_MultiVector A 
)

Writes an Epetra_MultiVector object that is compatible with Matrix Market array format to a file handle.

This function takes an Epetra_MultiVector and writes it to the specified file handle.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each multivector row.
A (In) An Epetra_MultiVector Object containing the user object to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::MultiVectorToMatlabHandle ( std::FILE *  handle,
const Epetra_MultiVector A 
)

Writes an Epetra_MultiVector object that is compatible with Matlab to a file handle.

This function takes an Epetra_MultiVector and writes it to the specified file handle.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each multivector row.
A (In) An Epetra_MultiVector Object containing the user object to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::MultiVectorToHandle ( std::FILE *  handle,
const Epetra_MultiVector A,
bool  mmFormat 
)
int EpetraExt::writeMultiVector ( std::FILE *  handle,
const Epetra_MultiVector A,
bool  mmFormat 
)
int EpetraExt::OperatorToMatlabFile ( const char *  filename,
const Epetra_Operator A 
)

Writes an Epetra_Operator object to a file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_Operator interface and writes it to the specified file. The matrix can be distributed or serial. This function is a convenience wrapper around OperatorToMatrixMarketFile. The following Matlab commands can be used to read the resulting file and convert to it to a Matlab sparse matrix:

  1. load filename;
  2. matrix_name = spconvert(filename_root);

For example:

  1. load A.dat;
  2. A = spconvert(filename_root);

The above produces a sparse matrix A.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Operator Object containing the implicit user matrix to be dumped to file. Any object that implements the Epetra_Operator interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface, as is AztecOO_Operator, all Ifpack and ML preconditioners.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::OperatorToMatrixMarketFile ( const char *  filename,
const Epetra_Operator A,
const char *  matrixName = 0,
const char *  matrixDescription = 0,
bool  writeHeader = true 
)

Writes an Epetra_Operator object to a Matrix Market format file, forming the coefficients by applying the operator to the e_j vectors.

This function takes any linear operator that implements the Epetra_Operator interface and writes it to the specified file. The operator can be distributed or serial. The user can provide a strings containing the matrix name, a matrix description, and specify that header information should or should not be printed to the file.

The coeffients are formed by applying the operator to the canonical vectors

\[ e_j = (0, \ldots, 0, 1, 0, \ldots, 0) \]

where the value 1 appears in the the jth entry. The number of canonical vectors used is determined by the size of the OperatorDomainMap() and the lengths by the size of OperatorRangeMap().

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the matrix coefficients. The file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Operator Object containing the implicit user matrix to be dumped to file. Any object that implements the Epetra_Operator interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface, as is AztecOO_Operator, all Ifpack and ML preconditioners.
matrixName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label().
matrixDescription (In) A C-style string pointer to a matrix description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the matrix entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::OperatorToHandle ( FILE *  handle,
const Epetra_Operator A 
)

Definition at line 98 of file EpetraExt_OperatorOut.cpp.

int EpetraExt::writeOperatorStrip ( FILE *  handle,
const Epetra_MultiVector y,
const Epetra_Map rootDomainMap,
const Epetra_Map rootRangeMap,
int  startColumn 
)

Definition at line 161 of file EpetraExt_OperatorOut.cpp.

int EpetraExt::get_nz ( const Epetra_Operator A,
int &  nz 
)
int EpetraExt::OperatorToHandle ( std::FILE *  handle,
const Epetra_Operator A 
)

Writes an Epetra_Operator object to a format file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_Operator interface and writes it to the specified file handle. The matrix can be distributed or serial. This function is a convenience wrapper around OperatorToMatrixMarketFile.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Operator Object containing the user matrix to be dumped to file. Any object that implements the Epetra_Operator interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface, as is AztecOO_Operator, all Ifpack and ML preconditioners.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::writeOperatorStrip ( std::FILE *  handle,
const Epetra_MultiVector y,
const Epetra_Map rootDomainMap,
const Epetra_Map rootRangeMap,
int  startColumn 
)
void EpetraExt::readEpetraLinearSystem ( const std::string &  fileName,
const Epetra_Comm comm,
Teuchos::RefCountPtr< Epetra_CrsMatrix > *  A = NULL,
Teuchos::RefCountPtr< Epetra_Map > *  map = NULL,
Teuchos::RefCountPtr< Epetra_Vector > *  x = NULL,
Teuchos::RefCountPtr< Epetra_Vector > *  b = NULL,
Teuchos::RefCountPtr< Epetra_Vector > *  xExact = NULL 
)

Read in an Epetra linear system from a file.

Parameters:
fileName [in] Name of the file to read in the linear system (see file formats below).
comm [in] The communicator
map [out] The createe map. map==NULL is allowed on input in which case this will not be returned.
A [out] The created matrix. A==NULL is allowed on input in which case this will not be returned.
x [out] The created LHS vector. x==NULL is allowed on input in which case this will not be returned.
b [out] The created RHS vector. b==NULL is allowed on input in which case this will not be returned.
xExact [out] The created exact LHS vector (if known). xExact==NULL is allowed on input in which case this will not be returned.

This function reads from a number file formats (*.triU, *.triS, *.mtx, *.hb)

ToDo: Finish documentation!

ToDo: Put this in EpetraExt after the release is finished.

Definition at line 32 of file EpetraExt_readEpetraLinearSystem.cpp.

int EpetraExt::RowMatrixToMatlabFile ( const char *  filename,
const Epetra_RowMatrix A 
)

Writes an Epetra_RowMatrix object to a file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_RowMatrix interface and writes it to the specified file. The matrix can be distributed or serial. This function is a convenience wrapper around RowMatrixToMatrixMarketFile. The following Matlab commands can be used to read the resulting file and convert to it to a Matlab sparse matrix:

  1. load filename;
  2. matrix_name = spconvert(filename_root);

For example:

  1. load A.dat;
  2. A = spconvert(filename_root);

The above produces a sparse matrix A.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_RowMatrix Object containing the user matrix to be dumped to file. Any object that implements the Epetra_RowMatrix interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::RowMatrixToMatrixMarketFile ( const char *  filename,
const Epetra_RowMatrix A,
const char *  matrixName = 0,
const char *  matrixDescription = 0,
bool  writeHeader = true 
)

Writes an Epetra_RowMatrix object to a Matrix Market format file.

This function takes any matrix that implements the Epetra_RowMatrix interface and writes it to the specified file. The matrix can be distributed or serial. The user can provide a strings containing the matrix name, a matrix description, and specify that header information should or should not be printed to the file.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the matrix coefficients. The file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_RowMatrix Object containing the user matrix to be dumped to file. Any object that implements the Epetra_RowMatrix interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
matrixName (In) A C-style std::string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label() if the matrix is one of the four types: Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix.
matrixDescription (In) A C-style std::string pointer to a matrix description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the matrix entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::RowMatrixToHandle ( FILE *  handle,
const Epetra_RowMatrix A 
)

Definition at line 86 of file EpetraExt_RowMatrixOut.cpp.

int EpetraExt::writeRowMatrix ( FILE *  handle,
const Epetra_RowMatrix A 
)

Definition at line 141 of file EpetraExt_RowMatrixOut.cpp.

int EpetraExt::RowMatrixToHandle ( std::FILE *  handle,
const Epetra_RowMatrix A 
)

Writes an Epetra_RowMatrix object to a format file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_RowMatrix interface and writes it to the specified file handle. The matrix can be distributed or serial. This function is a convenience wrapper around RowMatrixToMatrixMarketFile.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_RowMatrix Object containing the user matrix to be dumped to file. Any object that implements the Epetra_RowMatrix interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::writeRowMatrix ( std::FILE *  handle,
const Epetra_RowMatrix A 
)
std::string EpetraExt::toString ( const int &  x  ) 

Definition at line 5 of file EpetraExt_Utils.cpp.

std::string EpetraExt::toString ( const unsigned int &  x  ) 

Definition at line 13 of file EpetraExt_Utils.cpp.

std::string EpetraExt::toString ( const double &  x  ) 

Definition at line 20 of file EpetraExt_Utils.cpp.

int EpetraExt::MatrixMarketFileToVector ( const char *  filename,
const Epetra_BlockMap map,
Epetra_Vector *&  A 
)

Constructs an Epetra_Vector object from a Matrix Market format file.

This function constructs an Epetra_Vector object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market array format.
map (In) An Epetra_Map or Epetra_BlockMap object describing the desired distribution of the vector.
A (Out) An Epetra_Vector object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::VectorToMatlabFile ( const char *  filename,
const Epetra_Vector A 
)

Writes an Epetra_Vector object to a file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_Vector interface and writes it to the specified file. The matrix can be distributed or serial. This function is a convenience wrapper around VectorToMatrixMarketFile. The following Matlab commands can be used to read the resulting file and convert to it to a Matlab sparse matrix:

  1. load filename;
  2. matrix_name = spconvert(filename_root);

For example:

  1. load A.dat;
  2. A = spconvert(filename_root);

The above produces a sparse matrix A.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Vector Object containing the user matrix to be dumped to file. Any object that implements the Epetra_Vector interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::VectorToMatrixMarketFile ( const char *  filename,
const Epetra_Vector A,
const char *  matrixName = 0,
const char *  matrixDescription = 0,
bool  writeHeader = true 
)

Writes an Epetra_Vector object to a Matrix Market format file.

This function takes any matrix that implements the Epetra_Vector interface and writes it to the specified file. The matrix can be distributed or serial. The user can provide a strings containing the matrix name, a matrix description, and specify that header information should or should not be printed to the file.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the matrix coefficients. The file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Vector Object containing the user matrix to be dumped to file. Any object that implements the Epetra_Vector interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
matrixName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label() if the matrix is one of the four types: Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix.
matrixDescription (In) A C-style string pointer to a matrix description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the matrix entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::VectorToHandle ( FILE *  handle,
const Epetra_Vector A 
)

Definition at line 55 of file EpetraExt_VectorOut.cpp.

int EpetraExt::writeVector ( FILE *  handle,
const Epetra_Vector A 
)

Definition at line 59 of file EpetraExt_VectorOut.cpp.

int EpetraExt::VectorToHandle ( std::FILE *  handle,
const Epetra_Vector A 
)

Writes an Epetra_Vector object to a format file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_Vector interface and writes it to the specified file handle. The matrix can be distributed or serial. This function is a convenience wrapper around VectorToMatrixMarketFile.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Vector Object containing the user matrix to be dumped to file. Any object that implements the Epetra_Vector interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.
int EpetraExt::writeVector ( std::FILE *  handle,
const Epetra_Vector A 
)
std::string EpetraExt::toString ( ModelEvaluator::EDerivativeMultiVectorOrientation  orientation  ) 

Definition at line 742 of file EpetraExt_ModelEvaluator.cpp.

std::string EpetraExt::toString ( ModelEvaluator::EInArgsMembers  inArg  ) 

Definition at line 758 of file EpetraExt_ModelEvaluator.cpp.

std::string EpetraExt::toString ( ModelEvaluator::EOutArgsMembers  outArg  ) 

Definition at line 782 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::getLinearOp ( const std::string &  modelEvalDescription,
const ModelEvaluator::Derivative &  deriv,
const std::string &  derivName 
)

Definition at line 805 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_MultiVector > EpetraExt::getMultiVector ( const std::string &  modelEvalDescription,
const ModelEvaluator::Derivative &  deriv,
const std::string &  derivName,
const ModelEvaluator::EDerivativeMultiVectorOrientation  mvOrientation 
)

Definition at line 821 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_Operator > EpetraExt::get_DfDp_op ( const int  l,
const ModelEvaluator::OutArgs &  outArgs 
)

Definition at line 848 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_MultiVector > EpetraExt::get_DfDp_mv ( const int  l,
const ModelEvaluator::OutArgs &  outArgs 
)

Definition at line 863 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_MultiVector > EpetraExt::get_DgDx_dot_mv ( const int  j,
const ModelEvaluator::OutArgs &  outArgs,
const ModelEvaluator::EDerivativeMultiVectorOrientation  mvOrientation 
)

Definition at line 879 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_MultiVector > EpetraExt::get_DgDx_mv ( const int  j,
const ModelEvaluator::OutArgs &  outArgs,
const ModelEvaluator::EDerivativeMultiVectorOrientation  mvOrientation 
)

Definition at line 896 of file EpetraExt_ModelEvaluator.cpp.

Teuchos::RefCountPtr< Epetra_MultiVector > EpetraExt::get_DgDp_mv ( const int  j,
const int  l,
const ModelEvaluator::OutArgs &  outArgs,
const ModelEvaluator::EDerivativeMultiVectorOrientation  mvOrientation 
)

Definition at line 913 of file EpetraExt_ModelEvaluator.cpp.

int EpetraExt::compare_ints ( const void *  a,
const void *  b 
)

Given an Epetra_CrsGraph that has block structure, an adjacency graph is constructed representing the block connectivity of the original graph.

Authors:
David Day, Heidi Thornquist
int EpetraExt::ceil31log2 ( int  n  ) 

Definition at line 46 of file EpetraExt_BlockAdjacencyGraph.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 09:57:55 2011 for EpetraExt by  doxygen 1.6.3