EpetraExt  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
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
 
class  CrsGraph_MapColoringIndex64
 
class  TCrsGraph_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  LightweightMapData
 
class  LightweightMap
 
class  RemoteOnlyImport
 
class  LightweightCrsMatrix
 
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_dotdot
 Class that gets and sets x_dotdot 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  TPermutation
 Permutation stores and describes a permutation matrix P. More...
 
class  Permutation
 
class  Permutation64
 
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  LinearProblem_Reindex2
 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  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. More...
 
template<typename T >
bool IsSorted (T &container)
 Checks if data in a container is sorted. More...
 
template<int >
int import_only (const Epetra_CrsMatrix &M, const Epetra_Map &targetMap, CrsMatrixStruct &Mview, const Epetra_Import *prototypeImporter)
 
template<typename int_type >
double sparsedot (double *u, int_type *u_ind, int u_len, double *v, int_type *v_ind, int v_len)
 Method for internal use... More...
 
template<typename int_type >
int mult_A_Btrans (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, CrsWrapper &C, bool keep_all_hard_zeros)
 
template<typename int_type >
int mult_Atrans_B (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, CrsWrapper &C)
 
template<typename int_type >
int mult_Atrans_Btrans (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, CrsWrapper &C, bool keep_all_hard_zeros)
 
template<typename int_type >
int import_and_extract_views (const Epetra_CrsMatrix &M, const Epetra_Map &targetMap, CrsMatrixStruct &Mview, const Epetra_Import *prototypeImporter=0)
 
template<typename int_type >
int form_map_union (const Epetra_Map *map1, const Epetra_Map *map2, const Epetra_Map *&mapunion)
 
template<typename int_type >
Epetra_MapTfind_rows_containing_cols (const Epetra_CrsMatrix &M, const Epetra_Map &column_map)
 
Epetra_Mapfind_rows_containing_cols (const Epetra_CrsMatrix &M, const Epetra_Map &column_map)
 
static int C_estimate_nnz (const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B)
 
template<typename int_type >
int aztecoo_and_ml_compatible_map_union (const Epetra_CrsMatrix &B, const LightweightCrsMatrix &Bimport, Epetra_Map *&unionmap, std::vector< int > &Cremotepids, std::vector< int > &Bcols2Ccols, std::vector< int > &Icols2Ccols)
 
void resize_doubles (int nold, int nnew, double *&d)
 
template<typename int_type >
int mult_A_B_newmatrix (const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, const CrsMatrixStruct &Bview, std::vector< int > &Bcol2Ccol, std::vector< int > &Bimportcol2Ccol, std::vector< int > &Cremotepids, Epetra_CrsMatrix &C, bool keep_all_hard_zeros)
 
template<typename int_type >
int mult_A_B_reuse (const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, std::vector< int > &Bcol2Ccol, std::vector< int > &Bimportcol2Ccol, Epetra_CrsMatrix &C, bool keep_all_hard_zeros)
 
template<typename int_type >
int mult_A_B_general (const Epetra_CrsMatrix &A, CrsMatrixStruct &Aview, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C, bool call_FillComplete_on_result, bool keep_all_hard_zeros)
 
template<typename int_type >
int jacobi_A_B_reuse (double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, std::vector< int > &Bcol2Ccol, std::vector< int > &Bimportcol2Ccol, Epetra_CrsMatrix &C)
 
template<typename int_type >
int jacobi_A_B_newmatrix (double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, std::vector< int > &Bcol2Ccol, std::vector< int > &Bimportcol2Ccol, std::vector< int > &Cremotepids, Epetra_CrsMatrix &C)
 
void debug_print_distor (const char *label, const Epetra_Distributor *Distor, const Epetra_Comm &Comm)
 
void debug_compare_import (const Epetra_Import *Import1, const Epetra_Import *Import2)
 
int dumpCrsMatrixStruct (const CrsMatrixStruct &M)
 
template<typename int_type >
void insert_matrix_locations (CrsWrapper_GraphBuilder< int_type > &graphbuilder, Epetra_CrsMatrix &C)
 
template<typename int_type >
void Tpack_outgoing_rows (const Epetra_CrsMatrix &mtx, const std::vector< int_type > &proc_col_ranges, std::vector< int_type > &send_rows, std::vector< int > &rows_per_send_proc)
 
void pack_outgoing_rows (const Epetra_CrsMatrix &mtx, const std::vector< int > &proc_col_ranges, std::vector< int > &send_rows, std::vector< int > &rows_per_send_proc)
 
void pack_outgoing_rows (const Epetra_CrsMatrix &mtx, const std::vector< long long > &proc_col_ranges, std::vector< long long > &send_rows, std::vector< int > &rows_per_send_proc)
 
template<>
std::pair< int, int > get_col_range< int > (const Epetra_Map &emap)
 
template<>
std::pair< long long, long long > get_col_range< long long > (const Epetra_Map &emap)
 
template<typename int_type >
std::pair< int_type, int_type > Tget_col_range (const Epetra_CrsMatrix &mtx)
 
template<>
std::pair< int, int > get_col_range< int > (const Epetra_CrsMatrix &mtx)
 
template<>
std::pair< long long, long long > get_col_range< long long > (const Epetra_CrsMatrix &mtx)
 
template<class GO >
void MakeColMapAndReindexSort (int &NumRemoteColGIDs, GO *&RemoteColindices, std::vector< int > &RemotePermuteIDs, std::vector< int > &RemoteOwningPIDs, bool SortGhostsAssociatedWithEachProcessor_)
 
template<>
void MakeColMapAndReindexSort< int > (int &NumRemoteColGIDs, int *&RemoteColindices, std::vector< int > &RemotePermuteIDs, std::vector< int > &RemoteOwningPIDs, bool SortGhostsAssociatedWithEachProcessor_)
 
template<>
void MakeColMapAndReindexSort< long long > (int &NumRemoteColGIDs, long long *&RemoteColindices, std::vector< int > &RemotePermuteIDs, std::vector< int > &RemoteOwningPIDs, bool SortGhostsAssociatedWithEachProcessor_)
 
template<typename int_type >
void build_type3_exports_sort (std::vector< int_type > &ExportGID3, std::vector< int > &ExportPID3, int total_length3)
 
template<>
void build_type3_exports_sort< int > (std::vector< int > &ExportGID3, std::vector< int > &ExportPID3, int total_length3)
 
template<>
void build_type3_exports_sort< long long > (std::vector< long long > &ExportGID3, std::vector< int > &ExportPID3, int total_length3)
 
template<typename int_type >
int build_type3_exports (int MyPID, int Nrecv, Epetra_BlockMap &DomainMap, std::vector< int > &ReverseRecvSizes, const int_type *ReverseRecvBuffer, std::vector< int > &ExportLID3, std::vector< int > &ExportPID3)
 
template<typename ImportType , typename int_type >
int build_type2_exports (const Epetra_CrsMatrix &SourceMatrix, ImportType &MyImporter, std::vector< int > &ExportLID2, std::vector< int > &ExportPID2)
 
template<typename int_type >
void build_type1_exports_sort (std::vector< int > &ExportLID1, std::vector< int > &ExportPID1, std::vector< int_type > &ExportGID1, int total_length1)
 
template<>
void build_type1_exports_sort< int > (std::vector< int > &ExportLID1, std::vector< int > &ExportPID1, std::vector< int > &ExportGID1, int total_length1)
 
template<>
void build_type1_exports_sort< long long > (std::vector< int > &ExportLID1, std::vector< int > &ExportPID1, std::vector< long long > &ExportGID1, int total_length1)
 
template<typename int_type >
int build_type1_exports (const Epetra_Import *Importer1, std::vector< int > &ExportLID1, std::vector< int > &ExportPID1)
 
template<class TransferType >
void TPrintMultiplicationStatistics (TransferType *Transfer, const std::string &label)
 
void printMultiplicationStatistics (Epetra_Import *Transfer, const std::string &label)
 
void printMultiplicationStatistics (Epetra_Export *Transfer, const std::string &label)
 
template<typename int_type >
std::pair< int_type, int_type > get_col_range (const Epetra_Map &emap)
 
template<typename int_type >
std::pair< int_type, int_type > get_col_range (const Epetra_CrsMatrix &mtx)
 
template<typename int_type >
int import_only (const Epetra_CrsMatrix &M, const Epetra_Map &targetMap, CrsMatrixStruct &Mview, const Epetra_Import *prototypeImporter=0, bool SortGhosts=false, const char *label=0)
 
void PrintMultiplicationStatistics (Epetra_Import *Transfer, const std::string &label)
 
void PrintMultiplicationStatistics (Epetra_Export *Transfer, const std::string &label)
 
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. More...
 
int MatrixMarketFileToMap64 (const char *filename, const Epetra_Comm &comm, Epetra_Map *&map)
 
int MatrixMarketFileToBlockMap (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&blockMap)
 Constructs an Epetra_BlockMap object from a Matrix Market format file. More...
 
int MatrixMarketFileToBlockMap64 (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&map)
 
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. More...
 
int MatrixMarketFileToBlockMaps64 (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. More...
 
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. More...
 
template<typename int_type >
int TBlockMapToHandle (FILE *handle, const Epetra_BlockMap &map)
 
int BlockMapToHandle (FILE *handle, const Epetra_BlockMap &map)
 
int writeBlockMap (FILE *handle, long long length, const int *v1, const int *v2, bool doSizes)
 
int writeBlockMap (FILE *handle, long long length, const long long *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. More...
 
int writeBlockMap (std::FILE *handle, long long length, const int *v1, const int *v2, bool doSizes)
 
int writeBlockMap (std::FILE *handle, long long length, const long long *v1, const int *v2, bool doSizes)
 
template<typename int_type >
static void sort_three (int_type *list, int_type *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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int MatrixMarketFileToCrsMatrix64 (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A)
 
int MatrixMarketFileToCrsMatrix64 (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A, const bool transpose)
 
int MatrixMarketFileToCrsMatrix64 (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A, const bool transpose, const bool verbose)
 
int MatrixMarketFileToCrsMatrix64 (const char *filename, const Epetra_Map &rowMap, const Epetra_Map &rangeMap, const Epetra_Map &domainMap, Epetra_CrsMatrix *&A, const bool transpose, const bool verbose)
 
int MatrixMarketFileToCrsMatrix64 (const char *filename, const Epetra_Map &rowMap, Epetra_CrsMatrix *&A, const bool transpose, const bool verbose)
 
int MatrixMarketFileToCrsMatrix64 (const char *filename, const Epetra_Map &rowMap, const Epetra_Map &colMap, Epetra_CrsMatrix *&A, const bool transpose, const bool verbose)
 
int MatrixMarketFileToCrsMatrix64 (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, const bool verbose)
 
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)
 
int MatrixMarketFileToCrsMatrixHandle64 (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)
 
template<typename int_type >
static void quickpart_list_inc_int (int_type *list, int_type *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. More...
 
int MatlabFileToCrsMatrix64 (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&A)
 
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. More...
 
int HypreFileToCrsMatrix64 (const char *filename, const Epetra_Comm &comm, Epetra_CrsMatrix *&Matrix)
 
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, long long M, long long N, long long nz)
 
int mm_read_mtx_crd_size (FILE *f, int *M, int *N, int *nz)
 
int mm_read_mtx_crd_size (FILE *f, long long *M, long long *N, long long *nz)
 
int mm_read_mtx_array_size (FILE *f, int *M, int *N)
 
int mm_write_mtx_array_size (FILE *f, long long M, long long N)
 
int mm_read_mtx_crd_data (FILE *f, int, int, 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_entry (FILE *f, long long *I, long long *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 mm_read_banner (std::FILE *f, MM_typecode *matcode)
 
int mm_read_mtx_crd_size (std::FILE *f, int *M, int *N, int *nz)
 
int mm_read_mtx_crd_size (std::FILE *f, long long *M, long long *N, long long *nz)
 
int mm_read_mtx_array_size (std::FILE *f, int *M, int *N)
 
int mm_write_banner (std::FILE *f, MM_typecode matcode)
 
int mm_write_mtx_crd_size (std::FILE *f, long long M, long long N, long long nz)
 
int mm_write_mtx_array_size (std::FILE *f, long long M, long long N)
 
int mm_read_mtx_crd_data (std::FILE *f, int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
 
int mm_read_mtx_crd_entry (std::FILE *f, int *I, int *J, double *real, double *img, MM_typecode matcode)
 
int mm_read_mtx_crd_entry (std::FILE *f, long long *I, long long *J, double *real, double *img, MM_typecode matcode)
 
int MatrixMarketFileToMultiVector (const char *filename, const Epetra_BlockMap &map, Epetra_MultiVector *&A)
 Constructs an Epetra_MultiVector object from a Matrix Market format file. More...
 
int MultiVectorToMatlabFile (const char *filename, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object to a file that is compatible with Matlab. More...
 
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. More...
 
int MultiVectorToMatlabHandle (FILE *handle, const Epetra_MultiVector &A)
 
int MultiVectorToMatrixMarketHandle (FILE *handle, const Epetra_MultiVector &A)
 
template<typename int_type >
int TMultiVectorToHandle (FILE *handle, const Epetra_MultiVector &A, bool mmFormat)
 
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. More...
 
int MultiVectorToMatlabHandle (std::FILE *handle, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object that is compatible with Matlab to a file handle. More...
 
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. More...
 
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. More...
 
int OperatorToHandle (FILE *handle, const Epetra_Operator &A)
 
int writeOperatorStrip (FILE *handle, const Epetra_MultiVector &y, const Epetra_Map &rootDomainMap, const Epetra_Map &rootRangeMap, long long startColumn)
 
int get_nz (const Epetra_Operator &A, long long &nz)
 
int OperatorToHandle (std::FILE *handle, const Epetra_Operator &A)
 Writes an Epetra_Operator object to a format file that is compatible with Matlab. More...
 
int writeOperatorStrip (std::FILE *handle, const Epetra_MultiVector &y, const Epetra_Map &rootDomainMap, const Epetra_Map &rootRangeMap, long long startColumn)
 
void readEpetraLinearSystem (const std::string &fileName, const Epetra_Comm &comm, Teuchos::RCP< Epetra_CrsMatrix > *A=NULL, Teuchos::RCP< Epetra_Map > *map=NULL, Teuchos::RCP< Epetra_Vector > *x=NULL, Teuchos::RCP< Epetra_Vector > *b=NULL, Teuchos::RCP< Epetra_Vector > *xExact=NULL)
 Read in an Epetra linear system from a file. More...
 
void readEpetraLinearSystem64 (const std::string &fileName, const Epetra_Comm &comm, Teuchos::RCP< Epetra_CrsMatrix > *A=NULL, Teuchos::RCP< Epetra_Map > *map=NULL, Teuchos::RCP< Epetra_Vector > *x=NULL, Teuchos::RCP< Epetra_Vector > *b=NULL, Teuchos::RCP< Epetra_Vector > *xExact=NULL)
 
int RowMatrixToMatlabFile (const char *filename, const Epetra_RowMatrix &A)
 Writes an Epetra_RowMatrix object to a file that is compatible with Matlab. More...
 
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. More...
 
template<typename int_type >
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. More...
 
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. More...
 
int VectorToMatlabFile (const char *filename, const Epetra_Vector &A)
 Writes an Epetra_Vector object to a file that is compatible with Matlab. More...
 
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. More...
 
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. More...
 
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::RCP< Epetra_OperatorgetLinearOp (const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName)
 
Teuchos::RCP< Epetra_MultiVectorgetMultiVector (const std::string &modelEvalDescription, const ModelEvaluator::Derivative &deriv, const std::string &derivName, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
Teuchos::RCP< Epetra_Operatorget_DfDp_op (const int l, const ModelEvaluator::OutArgs &outArgs)
 
Teuchos::RCP< Epetra_MultiVectorget_DfDp_mv (const int l, const ModelEvaluator::OutArgs &outArgs)
 
Teuchos::RCP< Epetra_MultiVectorget_DgDx_dot_mv (const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
Teuchos::RCP< Epetra_MultiVectorget_DgDx_dotdot_mv (const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
Teuchos::RCP< Epetra_MultiVectorget_DgDx_mv (const int j, const ModelEvaluator::OutArgs &outArgs, const ModelEvaluator::EDerivativeMultiVectorOrientation mvOrientation)
 
Teuchos::RCP< Epetra_MultiVectorget_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. More...
 
void gatherModelBounds (const ModelEvaluator &model, ModelEvaluator::InArgs *lowerBounds, ModelEvaluator::InArgs *upperBounds)
 Gather the lower and upper bounds from a model evaluator. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
Teuchos::RCP< const Epetra_VectorcreateInverseModelScalingVector (Teuchos::RCP< const Epetra_Vector > const &scalingVector)
 Create an inverse scaling vector. More...
 
void scaleModelVarsGivenInverseScaling (const Epetra_Vector &origVars, const Epetra_Vector &invVarScaling, Epetra_Vector *scaledVars)
 Scale a vector given its inverse scaling vector. More...
 
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. More...
 
void unscaleModelVarsGivenInverseScaling (const Epetra_Vector &origVars, const Epetra_Vector &invVarScaling, Epetra_Vector *scaledVars)
 Unscale a vector given its inverse scaling vector. More...
 
void scaleModelFuncGivenForwardScaling (const Epetra_Vector &fwdFuncScaling, Epetra_Vector *funcs)
 Scale (in place) an output function vector given its forward scaling vector. More...
 
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. More...
 
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. More...
 
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. More...
 
int ceil31log2 (int n)
 

Variables

template<typename T >
Transform< T, T >::NewTypeRef
Transform_Composite< T >
typename Transform< T, T >
::OriginalTypeRef orig this 
origObj_ = &orig
 
this newObj_ = &orig
 
TransListIter iter = transList_.begin()
 
TransListIter end = transList_.end()
 

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 
)

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

's

Definition at line 171 of file EpetraExt_Directory.h.

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

Checks if data in a container is sorted.

Definition at line 202 of file EpetraExt_Directory.h.

template<int >
int EpetraExt::import_only ( const Epetra_CrsMatrix M,
const Epetra_Map targetMap,
CrsMatrixStruct &  Mview,
const Epetra_Import prototypeImporter 
)
template<typename int_type >
double EpetraExt::sparsedot ( double *  u,
int_type *  u_ind,
int  u_len,
double *  v,
int_type *  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.

Definition at line 90 of file EpetraExt_MatrixMatrix.cpp.

template<typename int_type >
int EpetraExt::mult_A_Btrans ( CrsMatrixStruct &  Aview,
CrsMatrixStruct &  Bview,
CrsWrapper &  C,
bool  keep_all_hard_zeros 
)

Definition at line 119 of file EpetraExt_MatrixMatrix.cpp.

template<typename int_type >
int EpetraExt::mult_Atrans_B ( CrsMatrixStruct &  Aview,
CrsMatrixStruct &  Bview,
CrsWrapper &  C 
)

Definition at line 350 of file EpetraExt_MatrixMatrix.cpp.

template<typename int_type >
int EpetraExt::mult_Atrans_Btrans ( CrsMatrixStruct &  Aview,
CrsMatrixStruct &  Bview,
CrsWrapper &  C,
bool  keep_all_hard_zeros 
)

Definition at line 513 of file EpetraExt_MatrixMatrix.cpp.

template<typename int_type >
int EpetraExt::import_and_extract_views ( const Epetra_CrsMatrix M,
const Epetra_Map targetMap,
CrsMatrixStruct &  Mview,
const Epetra_Import prototypeImporter = 0 
)

Definition at line 678 of file EpetraExt_MatrixMatrix.cpp.

template<typename int_type >
int EpetraExt::form_map_union ( const Epetra_Map map1,
const Epetra_Map map2,
const Epetra_Map *&  mapunion 
)

Definition at line 905 of file EpetraExt_MatrixMatrix.cpp.

template<typename int_type >
Epetra_Map* EpetraExt::Tfind_rows_containing_cols ( const Epetra_CrsMatrix M,
const Epetra_Map column_map 
)

Definition at line 970 of file EpetraExt_MatrixMatrix.cpp.

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

Definition at line 1062 of file EpetraExt_MatrixMatrix.cpp.

static int EpetraExt::C_estimate_nnz ( const Epetra_CrsMatrix A,
const Epetra_CrsMatrix B 
)
inlinestatic

Definition at line 77 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

template<typename int_type >
int EpetraExt::aztecoo_and_ml_compatible_map_union ( const Epetra_CrsMatrix B,
const LightweightCrsMatrix &  Bimport,
Epetra_Map *&  unionmap,
std::vector< int > &  Cremotepids,
std::vector< int > &  Bcols2Ccols,
std::vector< int > &  Icols2Ccols 
)

Definition at line 104 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

void EpetraExt::resize_doubles ( int  nold,
int  nnew,
double *&  d 
)
inline

Definition at line 369 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

template<typename int_type >
int EpetraExt::mult_A_B_newmatrix ( const Epetra_CrsMatrix A,
const Epetra_CrsMatrix B,
const CrsMatrixStruct &  Bview,
std::vector< int > &  Bcol2Ccol,
std::vector< int > &  Bimportcol2Ccol,
std::vector< int > &  Cremotepids,
Epetra_CrsMatrix C,
bool  keep_all_hard_zeros 
)

Definition at line 384 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

template<typename int_type >
int EpetraExt::mult_A_B_reuse ( const Epetra_CrsMatrix A,
const Epetra_CrsMatrix B,
CrsMatrixStruct &  Bview,
std::vector< int > &  Bcol2Ccol,
std::vector< int > &  Bimportcol2Ccol,
Epetra_CrsMatrix C,
bool  keep_all_hard_zeros 
)

Definition at line 567 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

template<typename int_type >
int EpetraExt::mult_A_B_general ( const Epetra_CrsMatrix A,
CrsMatrixStruct &  Aview,
const Epetra_CrsMatrix B,
CrsMatrixStruct &  Bview,
Epetra_CrsMatrix C,
bool  call_FillComplete_on_result,
bool  keep_all_hard_zeros 
)

Definition at line 687 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

template<typename int_type >
int EpetraExt::jacobi_A_B_reuse ( double  omega,
const Epetra_Vector Dinv,
const Epetra_CrsMatrix A,
const Epetra_CrsMatrix B,
CrsMatrixStruct &  Bview,
std::vector< int > &  Bcol2Ccol,
std::vector< int > &  Bimportcol2Ccol,
Epetra_CrsMatrix C 
)

Definition at line 1069 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

template<typename int_type >
int EpetraExt::jacobi_A_B_newmatrix ( double  omega,
const Epetra_Vector Dinv,
const Epetra_CrsMatrix A,
const Epetra_CrsMatrix B,
CrsMatrixStruct &  Bview,
std::vector< int > &  Bcol2Ccol,
std::vector< int > &  Bimportcol2Ccol,
std::vector< int > &  Cremotepids,
Epetra_CrsMatrix C 
)

Definition at line 1207 of file EpetraExt_MatrixMatrix_mult_A_B.cpp.

void EpetraExt::debug_print_distor ( const char *  label,
const Epetra_Distributor Distor,
const Epetra_Comm Comm 
)

Definition at line 69 of file EpetraExt_MMHelpers.cpp.

void EpetraExt::debug_compare_import ( const Epetra_Import Import1,
const Epetra_Import Import2 
)

Definition at line 87 of file EpetraExt_MMHelpers.cpp.

int EpetraExt::dumpCrsMatrixStruct ( const CrsMatrixStruct &  M)

Definition at line 148 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
void EpetraExt::insert_matrix_locations ( CrsWrapper_GraphBuilder< int_type > &  graphbuilder,
Epetra_CrsMatrix C 
)

Definition at line 287 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
void EpetraExt::Tpack_outgoing_rows ( const Epetra_CrsMatrix mtx,
const std::vector< int_type > &  proc_col_ranges,
std::vector< int_type > &  send_rows,
std::vector< int > &  rows_per_send_proc 
)

Definition at line 319 of file EpetraExt_MMHelpers.cpp.

void EpetraExt::pack_outgoing_rows ( const Epetra_CrsMatrix mtx,
const std::vector< int > &  proc_col_ranges,
std::vector< int > &  send_rows,
std::vector< int > &  rows_per_send_proc 
)

Definition at line 367 of file EpetraExt_MMHelpers.cpp.

void EpetraExt::pack_outgoing_rows ( const Epetra_CrsMatrix mtx,
const std::vector< long long > &  proc_col_ranges,
std::vector< long long > &  send_rows,
std::vector< int > &  rows_per_send_proc 
)

Definition at line 382 of file EpetraExt_MMHelpers.cpp.

template<>
std::pair<int,int> EpetraExt::get_col_range< int > ( const Epetra_Map emap)

Definition at line 398 of file EpetraExt_MMHelpers.cpp.

template<>
std::pair<long long,long long> EpetraExt::get_col_range< long long > ( const Epetra_Map emap)

Definition at line 409 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
std::pair<int_type,int_type> EpetraExt::Tget_col_range ( const Epetra_CrsMatrix mtx)

Definition at line 419 of file EpetraExt_MMHelpers.cpp.

template<>
std::pair<int,int> EpetraExt::get_col_range< int > ( const Epetra_CrsMatrix mtx)

Definition at line 446 of file EpetraExt_MMHelpers.cpp.

template<>
std::pair<long long,long long> EpetraExt::get_col_range< long long > ( const Epetra_CrsMatrix mtx)

Definition at line 457 of file EpetraExt_MMHelpers.cpp.

template<class GO >
void EpetraExt::MakeColMapAndReindexSort ( int &  NumRemoteColGIDs,
GO *&  RemoteColindices,
std::vector< int > &  RemotePermuteIDs,
std::vector< int > &  RemoteOwningPIDs,
bool  SortGhostsAssociatedWithEachProcessor_ 
)
template<>
void EpetraExt::MakeColMapAndReindexSort< int > ( int &  NumRemoteColGIDs,
int *&  RemoteColindices,
std::vector< int > &  RemotePermuteIDs,
std::vector< int > &  RemoteOwningPIDs,
bool  SortGhostsAssociatedWithEachProcessor_ 
)

Definition at line 866 of file EpetraExt_MMHelpers.cpp.

template<>
void EpetraExt::MakeColMapAndReindexSort< long long > ( int &  NumRemoteColGIDs,
long long *&  RemoteColindices,
std::vector< int > &  RemotePermuteIDs,
std::vector< int > &  RemoteOwningPIDs,
bool  SortGhostsAssociatedWithEachProcessor_ 
)

Definition at line 902 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
void EpetraExt::build_type3_exports_sort ( std::vector< int_type > &  ExportGID3,
std::vector< int > &  ExportPID3,
int  total_length3 
)
template<>
void EpetraExt::build_type3_exports_sort< int > ( std::vector< int > &  ExportGID3,
std::vector< int > &  ExportPID3,
int  total_length3 
)

Definition at line 1202 of file EpetraExt_MMHelpers.cpp.

template<>
void EpetraExt::build_type3_exports_sort< long long > ( std::vector< long long > &  ExportGID3,
std::vector< int > &  ExportPID3,
int  total_length3 
)

Definition at line 1209 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
int EpetraExt::build_type3_exports ( int  MyPID,
int  Nrecv,
Epetra_BlockMap DomainMap,
std::vector< int > &  ReverseRecvSizes,
const int_type *  ReverseRecvBuffer,
std::vector< int > &  ExportLID3,
std::vector< int > &  ExportPID3 
)

Definition at line 1216 of file EpetraExt_MMHelpers.cpp.

template<typename ImportType , typename int_type >
int EpetraExt::build_type2_exports ( const Epetra_CrsMatrix SourceMatrix,
ImportType &  MyImporter,
std::vector< int > &  ExportLID2,
std::vector< int > &  ExportPID2 
)

Definition at line 1299 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
void EpetraExt::build_type1_exports_sort ( std::vector< int > &  ExportLID1,
std::vector< int > &  ExportPID1,
std::vector< int_type > &  ExportGID1,
int  total_length1 
)
template<>
void EpetraExt::build_type1_exports_sort< int > ( std::vector< int > &  ExportLID1,
std::vector< int > &  ExportPID1,
std::vector< int > &  ExportGID1,
int  total_length1 
)

Definition at line 1391 of file EpetraExt_MMHelpers.cpp.

template<>
void EpetraExt::build_type1_exports_sort< long long > ( std::vector< int > &  ExportLID1,
std::vector< int > &  ExportPID1,
std::vector< long long > &  ExportGID1,
int  total_length1 
)

Definition at line 1397 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
int EpetraExt::build_type1_exports ( const Epetra_Import Importer1,
std::vector< int > &  ExportLID1,
std::vector< int > &  ExportPID1 
)

Definition at line 1404 of file EpetraExt_MMHelpers.cpp.

template<class TransferType >
void EpetraExt::TPrintMultiplicationStatistics ( TransferType *  Transfer,
const std::string &  label 
)

Definition at line 1927 of file EpetraExt_MMHelpers.cpp.

void EpetraExt::printMultiplicationStatistics ( Epetra_Import Transfer,
const std::string &  label 
)

Definition at line 1975 of file EpetraExt_MMHelpers.cpp.

void EpetraExt::printMultiplicationStatistics ( Epetra_Export Transfer,
const std::string &  label 
)

Definition at line 1979 of file EpetraExt_MMHelpers.cpp.

template<typename int_type >
std::pair<int_type,int_type> EpetraExt::get_col_range ( const Epetra_Map emap)
template<typename int_type >
std::pair<int_type,int_type> EpetraExt::get_col_range ( const Epetra_CrsMatrix mtx)
template<typename int_type >
int EpetraExt::import_only ( const Epetra_CrsMatrix M,
const Epetra_Map targetMap,
CrsMatrixStruct &  Mview,
const Epetra_Import prototypeImporter = 0,
bool  SortGhosts = false,
const char *  label = 0 
)

Definition at line 406 of file EpetraExt_MMHelpers.h.

void EpetraExt::PrintMultiplicationStatistics ( Epetra_Import Transfer,
const std::string &  label 
)
void EpetraExt::PrintMultiplicationStatistics ( Epetra_Export Transfer,
const std::string &  label 
)
std::string EpetraExt::EpetraExt_Version ( )

Definition at line 50 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.

Definition at line 56 of file EpetraExt_BlockMapIn.cpp.

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

Definition at line 66 of file EpetraExt_BlockMapIn.cpp.

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.

Definition at line 76 of file EpetraExt_BlockMapIn.cpp.

int EpetraExt::MatrixMarketFileToBlockMap64 ( const char *  filename,
const Epetra_Comm comm,
Epetra_BlockMap *&  map 
)

Definition at line 186 of file EpetraExt_BlockMapIn.cpp.

int EpetraExt::MatrixMarketFileToRowMap ( const char *  filename,
const Epetra_Comm comm,
Epetra_BlockMap *&  rowmap 
)

Definition at line 297 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.

Definition at line 324 of file EpetraExt_BlockMapIn.cpp.

int EpetraExt::MatrixMarketFileToBlockMaps64 ( 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.

Definition at line 399 of file EpetraExt_BlockMapIn.cpp.

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.

Definition at line 58 of file EpetraExt_BlockMapOut.cpp.

template<typename int_type >
int EpetraExt::TBlockMapToHandle ( FILE *  handle,
const Epetra_BlockMap map 
)

Definition at line 130 of file EpetraExt_BlockMapOut.cpp.

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

Definition at line 194 of file EpetraExt_BlockMapOut.cpp.

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

Definition at line 210 of file EpetraExt_BlockMapOut.cpp.

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

Definition at line 220 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,
long long  length,
const int *  v1,
const int *  v2,
bool  doSizes 
)
int EpetraExt::writeBlockMap ( std::FILE *  handle,
long long  length,
const long long *  v1,
const int *  v2,
bool  doSizes 
)
template<typename int_type >
static void EpetraExt::sort_three ( int_type *  list,
int_type *  parlista,
double *  parlistb,
int  start,
int  end 
)
static

Definition at line 864 of file EpetraExt_CrsMatrixIn.cpp.

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

Definition at line 86 of file EpetraExt_CrsMatrixIn.cpp.

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

Definition at line 94 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.

  \param filename (In) A filename, including path if desired.  The matrix to be read should be in this file in 
                       Matrix Market coordinate format.
  \param comm (In) An Epetra_Comm object.
  \param transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A.  (default = 0).
  \param verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout.  (default = 0).
  \param A (Out) An Epetra_CrsMatrix object constructed from file contents.  
  \warning User must delete!!.

  \return Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)

Definition at line 103 of file EpetraExt_CrsMatrixIn.cpp.

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.

  \param filename (In) A filename, including path if desired.  The matrix to be read should be in this file in 
                       Matrix Market coordinate format.

  \param rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
  \param rangeMap (In) An Epetra_Map object describing the distribution of range vectors that will be used with this matrix, must be 1-to-1.
  \param domainMap (In) An Epetra_Map object describing the distribution of domain vectors that will be used with this matrix, must be 1-to-1.

  \param transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A.  (default = 0).
  \param verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout.  (default = 0).
  \param A (Out) An Epetra_CrsMatrix object constructed from file contents.  
  \warning User must delete!!.

  \return Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)

Definition at line 114 of file EpetraExt_CrsMatrixIn.cpp.

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.

  \param filename (In) A filename, including path if desired.  The matrix to be read should be in this file in 
                       Matrix Market coordinate format.
  \param rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
  \param transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A.  (default = 0).
  \param verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout.  (default = 0).
  \param A (Out) An Epetra_CrsMatrix object constructed from file contents.  
  \warning User must delete!!.

  \return Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)

Definition at line 128 of file EpetraExt_CrsMatrixIn.cpp.

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.

  \param filename (In) A filename, including path if desired.  The matrix to be read should be in this file in 
                       Matrix Market coordinate format.

  \param rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
  \param colMap (In) An Epetra_Map object describing the desired column distribution of the matrix.

  \param transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A.  (default = 0).
  \param verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout.  (default = 0).
  \param A (Out) An Epetra_CrsMatrix object constructed from file contents.  
  \warning User must delete!!.

  \return Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)

Definition at line 140 of file EpetraExt_CrsMatrixIn.cpp.

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.

  \param filename (In) A filename, including path if desired.  The matrix to be read should be in this file in 
                       Matrix Market coordinate format.

  \param rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
  \param colMap (In) An Epetra_Map object describing the desired column distribution of the matrix.
  \param rangeMap (In) An Epetra_Map object describing the distribution of range vectors that will be used with this matrix, must be 1-to-1.
  \param domainMap (In) An Epetra_Map object describing the distribution of domain vectors that will be used with this matrix, must be 1-to-1.
  \param transpose (In) A boolean value indicating whether the reader should transpose the matrix as it is read into matrix A.  (default = 0).
  \param verbose (In) A boolean value indicating whether the reader should print diagnostic statements to stdout.  (default = 0).

  \param A (Out) An Epetra_CrsMatrix object constructed from file contents.  
  \warning User must delete!!.

  \return Returns 0 if no error, -1 if any problems with file system.
(See the Matrix Market home page for details.)

Definition at line 153 of file EpetraExt_CrsMatrixIn.cpp.

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

Definition at line 169 of file EpetraExt_CrsMatrixIn.cpp.

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

Definition at line 177 of file EpetraExt_CrsMatrixIn.cpp.

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

Definition at line 186 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrix64 ( const char *  filename,
const Epetra_Map rowMap,
const Epetra_Map rangeMap,
const Epetra_Map domainMap,
Epetra_CrsMatrix *&  A,
const bool  transpose,
const bool  verbose 
)

Definition at line 197 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrix64 ( const char *  filename,
const Epetra_Map rowMap,
Epetra_CrsMatrix *&  A,
const bool  transpose,
const bool  verbose 
)

Definition at line 211 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrix64 ( const char *  filename,
const Epetra_Map rowMap,
const Epetra_Map colMap,
Epetra_CrsMatrix *&  A,
const bool  transpose,
const bool  verbose 
)

Definition at line 223 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrix64 ( 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,
const bool  verbose 
)

Definition at line 236 of file EpetraExt_CrsMatrixIn.cpp.

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 
)

Definition at line 253 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::MatrixMarketFileToCrsMatrixHandle64 ( 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 
)

Definition at line 533 of file EpetraExt_CrsMatrixIn.cpp.

template<typename int_type >
static void EpetraExt::quickpart_list_inc_int ( int_type *  list,
int_type *  parlista,
double *  parlistb,
int  start,
int  end,
int *  equal,
int *  larger 
)
static

Definition at line 824 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.

  \param filename (In) A filename, including path if desired.  The matrix to be read should be in this file in 
                       Matlab coordinate format.
  \param comm (In) An Epetra_Comm object.  The matrix will have its rows distributed evenly by row-count across the parallel machine.
  \param 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!!.

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

Definition at line 879 of file EpetraExt_CrsMatrixIn.cpp.

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

Definition at line 933 of file EpetraExt_CrsMatrixIn.cpp.

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.

Definition at line 987 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::HypreFileToCrsMatrix64 ( const char *  filename,
const Epetra_Comm comm,
Epetra_CrsMatrix *&  Matrix 
)

Definition at line 1053 of file EpetraExt_CrsMatrixIn.cpp.

int EpetraExt::mm_read_unsymmetric_sparse ( const char *  fname,
int *  M_,
int *  N_,
int *  nz_,
double **  val_,
int **  I_,
int **  J_ 
)

Definition at line 66 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_is_valid ( MM_typecode  matcode)

Definition at line 140 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_banner ( FILE *  f,
MM_typecode matcode 
)

Definition at line 150 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_write_mtx_crd_size ( FILE *  f,
long long  M,
long long  N,
long long  nz 
)

Definition at line 235 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_mtx_crd_size ( FILE *  f,
int *  M,
int *  N,
int *  nz 
)

Definition at line 241 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_mtx_crd_size ( FILE *  f,
long long *  M,
long long *  N,
long long *  nz 
)

Definition at line 271 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_mtx_array_size ( FILE *  f,
int *  M,
int *  N 
)

Definition at line 301 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_write_mtx_array_size ( FILE *  f,
long long  M,
long long  N 
)

Definition at line 330 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_mtx_crd_data ( FILE *  f,
int  ,
int  ,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)

Definition at line 344 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_mtx_crd_entry ( FILE *  f,
int *  I,
int *  J,
double *  real,
double *  imag,
MM_typecode  matcode 
)

Definition at line 377 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_mtx_crd_entry ( FILE *  f,
long long *  I,
long long *  J,
double *  real,
double *  imag,
MM_typecode  matcode 
)

Definition at line 403 of file EpetraExt_mmio.cpp.

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 437 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_write_banner ( FILE *  f,
MM_typecode  matcode 
)

Definition at line 496 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_write_mtx_crd ( char  fname[],
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)

Definition at line 510 of file EpetraExt_mmio.cpp.

void EpetraExt::mm_typecode_to_str ( MM_typecode  matcode,
char *  buffer 
)

Definition at line 556 of file EpetraExt_mmio.cpp.

int EpetraExt::mm_read_banner ( std::FILE *  f,
MM_typecode matcode 
)
int EpetraExt::mm_read_mtx_crd_size ( std::FILE *  f,
int *  M,
int *  N,
int *  nz 
)
int EpetraExt::mm_read_mtx_crd_size ( std::FILE *  f,
long long *  M,
long long *  N,
long long *  nz 
)
int EpetraExt::mm_read_mtx_array_size ( std::FILE *  f,
int *  M,
int *  N 
)
int EpetraExt::mm_write_banner ( std::FILE *  f,
MM_typecode  matcode 
)
int EpetraExt::mm_write_mtx_crd_size ( std::FILE *  f,
long long  M,
long long  N,
long long  nz 
)
int EpetraExt::mm_write_mtx_array_size ( std::FILE *  f,
long long  M,
long long  N 
)
int EpetraExt::mm_read_mtx_crd_data ( std::FILE *  f,
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)
int EpetraExt::mm_read_mtx_crd_entry ( std::FILE *  f,
int *  I,
int *  J,
double *  real,
double *  img,
MM_typecode  matcode 
)
int EpetraExt::mm_read_mtx_crd_entry ( std::FILE *  f,
long long *  I,
long long *  J,
double *  real,
double *  img,
MM_typecode  matcode 
)
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.

Definition at line 50 of file EpetraExt_MultiVectorIn.cpp.

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.

Definition at line 60 of file EpetraExt_MultiVectorOut.cpp.

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.

Definition at line 74 of file EpetraExt_MultiVectorOut.cpp.

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

Definition at line 111 of file EpetraExt_MultiVectorOut.cpp.

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

Definition at line 114 of file EpetraExt_MultiVectorOut.cpp.

template<typename int_type >
int EpetraExt::TMultiVectorToHandle ( FILE *  handle,
const Epetra_MultiVector A,
bool  mmFormat 
)

Definition at line 119 of file EpetraExt_MultiVectorOut.cpp.

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

Definition at line 187 of file EpetraExt_MultiVectorOut.cpp.

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

Definition at line 203 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.

Definition at line 56 of file EpetraExt_OperatorOut.cpp.

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.

Definition at line 63 of file EpetraExt_OperatorOut.cpp.

int EpetraExt::OperatorToHandle ( FILE *  handle,
const Epetra_Operator A 
)

Definition at line 111 of file EpetraExt_OperatorOut.cpp.

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

Definition at line 174 of file EpetraExt_OperatorOut.cpp.

int EpetraExt::get_nz ( const Epetra_Operator A,
long long &  nz 
)

Definition at line 198 of file EpetraExt_OperatorOut.cpp.

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,
long long  startColumn 
)
void EpetraExt::readEpetraLinearSystem ( const std::string &  fileName,
const Epetra_Comm comm,
Teuchos::RCP< Epetra_CrsMatrix > *  A = NULL,
Teuchos::RCP< Epetra_Map > *  map = NULL,
Teuchos::RCP< Epetra_Vector > *  x = NULL,
Teuchos::RCP< Epetra_Vector > *  b = NULL,
Teuchos::RCP< 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 47 of file EpetraExt_readEpetraLinearSystem.cpp.

void EpetraExt::readEpetraLinearSystem64 ( const std::string &  fileName,
const Epetra_Comm comm,
Teuchos::RCP< Epetra_CrsMatrix > *  A = NULL,
Teuchos::RCP< Epetra_Map > *  map = NULL,
Teuchos::RCP< Epetra_Vector > *  x = NULL,
Teuchos::RCP< Epetra_Vector > *  b = NULL,
Teuchos::RCP< Epetra_Vector > *  xExact = NULL 
)

Definition at line 127 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.

Definition at line 60 of file EpetraExt_RowMatrixOut.cpp.

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.

Definition at line 66 of file EpetraExt_RowMatrixOut.cpp.

template<typename int_type >
int EpetraExt::RowMatrixToHandle ( FILE *  handle,
const Epetra_RowMatrix A 
)

Definition at line 105 of file EpetraExt_RowMatrixOut.cpp.

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

Definition at line 177 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 48 of file EpetraExt_Utils.cpp.

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

Definition at line 56 of file EpetraExt_Utils.cpp.

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

Definition at line 63 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.

Definition at line 50 of file EpetraExt_VectorIn.cpp.

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.

Definition at line 57 of file EpetraExt_VectorOut.cpp.

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.

Definition at line 61 of file EpetraExt_VectorOut.cpp.

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

Definition at line 68 of file EpetraExt_VectorOut.cpp.

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

Definition at line 72 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 1046 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1062 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1108 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1135 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1151 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1178 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1193 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1209 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1226 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1243 of file EpetraExt_ModelEvaluator.cpp.

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

Definition at line 1260 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

Definition at line 54 of file EpetraExt_BlockAdjacencyGraph.cpp.

int EpetraExt::ceil31log2 ( int  n)

Definition at line 59 of file EpetraExt_BlockAdjacencyGraph.cpp.

Variable Documentation

template<typename T >
Transform<T,T>::NewTypeRef Transform_Composite<T>typename Transform<T,T>::OriginalTypeRef orig this EpetraExt::origObj_ = &orig

Definition at line 139 of file EpetraExt_Transform_Composite.h.

return *this EpetraExt::newObj_ = &orig

Definition at line 140 of file EpetraExt_Transform_Composite.h.

TransListIter EpetraExt::iter = transList_.begin()

Definition at line 142 of file EpetraExt_Transform_Composite.h.

TransListIter EpetraExt::end = transList_.end()

Definition at line 143 of file EpetraExt_Transform_Composite.h.