100 unsigned int RandomInt();
103 double RandomDouble();
109 unsigned int Seed()
const;
118 int SetSeed(
unsigned int Seed_in);
147 static void Sort(
bool SortAscending,
int NumKeys, T * Keys,
148 int NumDoubleCompanions,
double ** DoubleCompanions,
149 int NumIntCompanions,
int ** IntCompanions,
150 int NumLongLongCompanions,
long long ** LongLongCompanions);
152 static void Sort(
bool SortAscending,
int NumKeys,
int * Keys,
153 int NumDoubleCompanions,
double ** DoubleCompanions,
154 int NumIntCompanions,
int ** IntCompanions,
155 int NumLongLongCompanions,
long long ** LongLongCompanions);
157 static void Sort(
bool SortAscending,
int NumKeys,
long long * Keys,
158 int NumDoubleCompanions,
double ** DoubleCompanions,
159 int NumIntCompanions,
int ** IntCompanions,
160 int NumLongLongCompanions,
long long ** LongLongCompanions);
162 static void Sort(
bool SortAscending,
int NumKeys,
int * Keys,
163 int NumDoubleCompanions,
double ** DoubleCompanions,
164 int NumIntCompanions,
int ** IntCompanions);
166 static void Sort(
bool SortAscending,
int NumKeys,
double * Keys,
167 int NumDoubleCompanions,
double ** DoubleCompanions,
168 int NumIntCompanions,
int ** IntCompanions,
169 int NumLongLongCompanions,
long long ** LongLongCompanions);
187 bool high_rank_proc_owns_shared=
false);
195 bool high_rank_proc_owns_shared=
false);
202 static int SortCrsEntries(
int NumRows,
const int *CRS_rowptr,
int *CRS_colind,
double *CRS_vals);
207 static int SortCrsEntries(
int NumRows,
const size_t *CRS_rowptr,
int *CRS_colind,
double *CRS_vals);
212 static int SortAndMergeCrsEntries(
int NumRows,
int *CRS_rowptr,
int *CRS_colind,
double *CRS_vals);
217 static int SortAndMergeCrsEntries(
int NumRows,
size_t *CRS_rowptr,
int *CRS_colind,
double *CRS_vals);
227 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 228 static int GetPidGidPairs(
const Epetra_Import & Importer,std::vector< std::pair<int,int> > & gpids,
bool use_minus_one_for_local);
230 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 231 static int GetPidGidPairs(
const Epetra_Import & Importer,std::vector< std::pair<int,long long> > & gpids,
bool use_minus_one_for_local);
238 static int GetPids(
const Epetra_Import & Importer, std::vector<int> &pids,
bool use_minus_one_for_local);
243 static int GetRemotePIDs(
const Epetra_Import & Importer, std::vector<int> &RemotePIDs);
247 static double Chop(
const double & Value);
291 const long long* list,
323 const long long* aux_list,
333 int& allocatedLength,
334 int insertOffset,
int numPositions,
335 int allocChunkSize=32)
337 if (insertOffset < 0 || insertOffset > usedLength ||
338 usedLength > allocatedLength) {
342 if ((usedLength+numPositions) < allocatedLength) {
343 for(
int i=usedLength-1; i>=insertOffset; --i) {
344 array[i+numPositions] = array[i];
346 usedLength += numPositions;
350 allocatedLength += allocChunkSize;
353 while(allocatedLength < usedLength+numPositions) {
354 allocatedLength += allocChunkSize;
357 T* newlist =
new T[allocatedLength];
359 for(
int i=0; i<insertOffset; ++i) {
360 newlist[i] = array[i];
363 for(
int i=insertOffset; i<usedLength; ++i) {
364 newlist[i+numPositions] = array[i];
367 usedLength += numPositions;
391 int& allocatedLength,
392 int allocChunkSize=32)
394 int code = Epetra_Util_insert_empty_positions<T>(list, usedLength,
395 allocatedLength, offset, 1,
463 int & M,
int & N,
int & nz,
int * & ptr,
464 int * & ind,
double * & val,
int & Nrhs,
465 double * & rhs,
int & ldrhs,
466 double * & lhs,
int & ldlhs);
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
Epetra_Map: A class for partitioning vectors and matrices.
int Epetra_Util_binary_search_aux(T item, const int *list, const T *aux_list, int len, int &insertPoint)
Utility function to perform a binary-search on a list of data.
static const double chopVal_
T * Epetra_Util_data_ptr(std::vector< T > &vec)
Function that returns either a pointer to the first entry in the vector or, if the vector is empty...
Epetra_Util()
Epetra_Util Constructor.
virtual ~Epetra_Util()
Epetra_Util Destructor.
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
Epetra_Util: The Epetra Util Wrapper Class.
int Epetra_Util_ExtractHbData(Epetra_CrsMatrix *A, Epetra_MultiVector *LHS, Epetra_MultiVector *RHS, int &M, int &N, int &nz, int *&ptr, int *&ind, double *&val, int &Nrhs, double *&rhs, int &ldrhs, double *&lhs, int &ldlhs)
Harwell-Boeing data extraction routine.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int Epetra_Util_binary_search(T item, const T *list, int len, int &insertPoint)
Utility function to perform a binary-search on a list of data.
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
int Epetra_Util_insert_empty_positions(T *&array, int &usedLength, int &allocatedLength, int insertOffset, int numPositions, int allocChunkSize=32)
int Epetra_Util_insert(T item, int offset, T *&list, int &usedLength, int &allocatedLength, int allocChunkSize=32)
Function to insert an item in a list, at a specified offset.